[SOLVED] Wake word not working

What error are you getting? Can you check your card# alloted in asoundrc.

I’m not on an RPi, using a desktop with a USB camera with audio. I’ve identified the audio card as #3 to PyAudio using

import pyaudio 
p = pyaudio.PyAudio()
info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
    if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
        print "Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name')`

I’ve set Mycroft to use this card using the following in mycroft.conf

{
   "listener": {
    "device_index": 3,
    "sample_rate": 44100,
    "channels": 1,
   "record_wake_words": false,
   "record_utterances": true,
   "wake_word_upload": {
     "enable": false,
     "server": "mycroft.wickedbroadband.com",
     "port": 1776,
     "user": "precise",
     "folder": "/home/precise/wakewords"
  },
  "phoneme_duration": 120,
  "multiplier": 1.0,
  "energy_ratio": 1.5,
  "wake_word": "hey mycroft",
  "stand_up_word": "wake up"
  }
}

That is, using the default mycroft.conf values but adding in the device_index as 3. I’ve independently tested device 3 as working with the Microphone class

r = sr.Recognizer()
with sr.Microphone(device_index = 3) as source:
   print("Say something!")
   audio = r.listen(source)

# write audio to a RAW file
with open("microphone-results.raw", "wb") as f:
   f.write(audio.get_raw_data())
   r = sr.Recognizer()
with sr.Microphone(device_index = 3) as source:
  print("Say something!")
  audio = r.listen(source)

# write audio to a RAW file
with open("microphone-results.raw", "wb") as f:
    f.write(audio.get_raw_data())

Audio-log and speech-log show nothing. So I’m kind of stuck as to how to debug further. I seem to have the right audio device, can record from it and detect bounded speech using Microphone, but am not sure how to debug further to find out what it happening to any speech. The cli works fine.

Having eliminated the microphone as the problem, having tried on multiple platforms (RPi, PC) without success, I tried simplifying the wakeup phrase to just “Hey!”. Finally, it worked. Now I have to figure out how to say “Mycroft” (or any other word I choose) so that it understands my largely British but partly Australian accent.

Hi @jannewmarch,

If you need to change your Wake Word, you will need an understanding of phonemes.
There’s some documentation on this over at;

Kind regards,
Kathy (Aussie)