Search code examples
cqtspeech-recognitionspeech-to-textcmusphinx

Continuous speech recognition pocketsphinx from microphone


how to perform continuous speech recognition from microphone using pocketsphinx .how to use gstreamer plugin api in C ?


Solution

  • how to perform continuous speech recognition from microphone using pocketsphinx

    There are several APIs for that. One of them is plain pocketsphinx API. You can read pocketsphinx_continuous source in pocketsphinx/src/continuous.c to see how to use it. You can just include source code from continuous.c into your application.

    how to use gstreamer plugin api in C ?

    If you want to work with gstreamer, you first need to learn gstreamer basics. Here you can find some gstreamer documentation.

    http://docs.gstreamer.com/display/GstSDK/Basic+tutorials

    Unfortunately it's hard to cover everything in a single response, but the basic sequence of items is:

    1. Create pipeline with audio src, audio resampling, vader and pocketsphinx
    2. Connect to pocketsphinx plugin signals, the signals will provide you the recognized data
    3. Start the pipeline and the main loop.
    4. Wait for the recognized data signal and perform required action.

    It's not different from the python example in pocketsphinx/src/gst-plugin/livedemo.py except you need to call the same methods from C.