Menu

keyphrase detection with pocketsphinx and gstreamer

Help
Ben
2017-10-10
2017-10-10
  • Ben

    Ben - 2017-10-10

    I am trying to use pocketsphinx for a personal virtual assistant and would like to configure it to detect a keyphrase in python. I found this article explaining the solution, but I dont understand it. Any explanation or other soultion would be appreciated.

    pipeline = Gst.parse_launch('autoaudiosrc ! audioconvert !  audioresample '
                                             + '! pocketsphinx name=asr ! fakesink')
    
    asr = pipeline.get_by_name("asr")
    asr.set_property('keyphrase', 'Hello') # This doesnt work
    

    The code above produces the error:

    TypeError: object of type `GstPocketSphinx' does not have property `keyphrase'
    
     
    • Nickolay V. Shmyrev

      Plain Python non-gstreamer example is here:

      https://github.com/cmusphinx/pocketsphinx/blob/master/swig/python/test/kws_test.py

      If you still want to use gstreamer, you have to to use keyphrase file instead of a phrase and '-kws' property. You can also modify gstreamer plugin source code to introduce required property.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.