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:objectoftype`GstPocketSphinx' does not have property `keyphrase'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
The code above produces the error:
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.