avs-device-sdk icon indicating copy to clipboard operation
avs-device-sdk copied to clipboard

Wake word not working

Open ghost opened this issue 4 years ago • 7 comments

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.

Briefly summarize your issue:

I updated the avs to the latest version (I completely deleted the workspace) and since then the wake word doesn't work any more, but t+Enter does perfectly. I accepted the SENSORY-License-Agreements, but I just can't get it to work. "arecord -d 4 -f S16_LE -r 16000 test.wav" just records silence, not even any noises. The volume of my mic (USB: card 1 device 0) is turned to 100<>100 in the alsamixer.

arecord-l alsamixer

What is the expected behavior?

The wake word should be detected.

What behavior are you observing?

Nothing happens.

Provide the steps to reproduce the issue, if applicable:

Install the AVS using the setup script on a RaspberryPi.

Tell us about your environment:

What version of the AVS Device SDK are you using?

  <1.22.0>

Tell us what hardware you're using:

  • [ ] Desktop / Laptop
  • [X] Raspberry Pi (2)
  • [ ] Other - tell us more:

Tell us about your OS (Type & version):

  • [ ] Linux
  • [ ] MacOS
  • [x] Raspbian Stretch (9)
  • [ ] Raspbian Jessy
  • [ ] Other - tell us more:

ghost avatar Mar 24 '21 11:03 ghost

Hi @JustixDev, the fact that 't+enter' is working for you, it doesn't seem like it's a micophone issue. Could you please attach the DEBUG9 logs for further investigation. Thanks!

kclchan avatar Mar 24 '21 23:03 kclchan

Sure, here you go: debug9-log.txt

ghost avatar Mar 24 '21 23:03 ghost

Hi @JustixDev, I think this is the problem:


2021-03-24 23:37:34.145 [  1] E SensoryKeywordDetector:initFailed:reason=loadingSensoryModelFailed,error=snsrLoad()\: task\: No such file or directory (open "...lexa-rpi/models/spot-alexa-rpi-31000.snsr")
2021-03-24 23:37:34.146 [  1] E SensoryKeywordDetector:createFailed:reason=initDetectorFailed
2021-03-24 23:37:34.149 [  1] C SampleApplication:Failed to create keyword detector!

Please make sure the file '...lexa-rpi/models/spot-alexa-rpi-31000.snsr' exists. The alexa-rpi path should be under the same path where you specified -DSENSORY_KEY_WORD_DETECTOR_LIB_PATH in your cmake.

kclchan avatar Mar 24 '21 23:03 kclchan

Okay I reinstalled the sdk and installed it from source (other guide), but now even t+Enter doesn't work and the logs are getting spammed with readerTimeOut exceptions.

debug9-log-2.txt

Output still works perfectly. This is my ~/.asoundrc file:

pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm "speaker"
}
pcm.mic {
  type plug
  slave {
    pcm "hw:1,0"
  }
}
pcm.speaker {
  type plug
  slave {
    pcm "hw:0,0"
  }
}

and this is my sdk-folder/third-party/alexa-rpi/config/asound.conf file:

pcm.dsnooper {
    type dsnoop
    ipc_key 816357492
    ipc_key_add_uid 0
    ipc_perm 0666
    slave {
        pcm "hw:1,0"
        channels 1
    }
}
pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
        pcm "hw:0,0"
        period_time 0
        period_size 1024
        buffer_size 8192
        rate 44100
    }
}
pcm.!default {
    type asym
    playback.pcm {
        type plug
        slave.pcm "dmixer"
    }
    capture.pcm {
        type plug
        slave.pcm "dsnooper"
    }
}

I use a USB Logitech mic and a JBL Charge 3 as a speaker which is connected to the raspberry pi through the 3.5mm jack.

ghost avatar Mar 25 '21 15:03 ghost

Now the speaker sounds like Alexa sends the audio in an incorrect rate (see audio test).

audio-test.mp3.zip

ghost avatar Mar 25 '21 15:03 ghost

Hi @JustixDev thanks for posting

Following the steps here: https://developer.amazon.com/en-US/docs/alexa/avs-device-sdk/raspberry-pi.html

Can you update your ~/.asoundrc, your values for pcm.!default are incorrect pcm.!default { type asym playback.pcm { type plug slave.pcm "hw:0,0" } capture.pcm { type plug slave.pcm "hw:1,0" } }

Also can you run sudo apt-get install sox -y && rec test.wav to determine if the microphone works correctly?

Once that is done can you run the SampleApp with the following command cd /home/pi/sdk-folder/sdk-build PA_ALSA_PLUGHW=1 ./SampleApp/src/SampleApp ./Integration/AlexaClientSDKConfig.json ../third-party/alexa-rpi/models

womw avatar Apr 07 '21 18:04 womw

The audio still sounds like the one in the audio-test and now the mic isn't working at all (with the new .asoundrc and the "rec" command.

ghost avatar Apr 08 '21 14:04 ghost

This appears to be a configuration issue that is outside the scope of the SDK. I am closing this ticket, please open a new issue if you need more help.

kclchan avatar Sep 12 '22 15:09 kclchan