respeaker / respeaker_python_library

To build voice enabled objects/applications with Python and ReSpeaker
Apache License 2.0
149 stars 74 forks source link

offline example doesn't recognise speech #6

Open hamishfagg opened 7 years ago

hamishfagg commented 7 years ago

Hi there,

I have just received my respeaker and I am testing the example offline_voice_assistant.py script here. I have set the wake up word to alexa as a test but the same thing happens regardless. I have turned the mic volume up in alsa and I am still unable to get this script to recognise a single word - I've tried saying things ranging from "hello" to full scentences. Below is the output from the script:

root@ReSpeaker:~/respeaker_python_library/examples# python ./offline_voice_assistant.py
INFO:mic:Start detecting
INFO:mic:Detected alexa
Wake up
INFO:mic:Start listening
INFO:mic:Stop listening
1111+111111100000000-1111+11100000000-0000000000000000000000000000000000001111+11111111111111111111111111111111100000000-000000000000000000000000000000000000000000000000000
INFO:mic:Start detecting
INFO:mic:Too many delays, 17 in queue
INFO:mic:Too many delays, 16 in queue
INFO:mic:Too many delays, 15 in queue
INFO:mic:Too many delays, 14 in queue
INFO:mic:Too many delays, 13 in queue
INFO:mic:Too many delays, 12 in queue
INFO:mic:Too many delays, 11 in queue
INFO:mic:Too many delays, 10 in queue
INFO:mic:Too many delays, 9 in queue
INFO:mic:Too many delays, 8 in queue
INFO:mic:Too many delays, 7 in queue
INFO:mic:Too many delays, 6 in queue
INFO:mic:Too many delays, 5 in queue
INFO:mic:Too many delays, 6 in queue
INFO:mic:Too many delays, 5 in queue

Any ideas? Thanks

xiongyihui commented 7 years ago

The offline example only recognizes three keyword. It's in https://github.com/respeaker/respeaker_python_library/blob/master/respeaker/pocketsphinx-data/keywords.txt

You can add new words to keywords.txt and dictionary.txt. You can find the words in https://github.com/respeaker/pocketsphinx-data/blob/master/dictionary.txt

hamishfagg commented 7 years ago

Hi,

Are we able to get some documentation on exactly what is required for respeaker to recognise new words using microphone.recognise() ?

I have replaced the dictionary file with the one that comes with pocketphinx and mic.recognise() will still only recognise "play music".

jayavanth commented 2 years ago

@IVData you just have to install the package again