wake word engine problem #277

Closed
mohaggag opened this Issue Oct 7, 2016 · 32 comments

Comments

Projects
None yet
@mohaggag

mohaggag commented Oct 7, 2016

i dont know what is the problem but i am using a usb upnp sound card and every thong is working whin i click on the listen button but there is no voice detection because of this error :
cd ~/Desktop/alexa-avs-sample-app/samples

cd wakeWordAgent/src && ./wakeWordAgent -e kitt_ai

INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2043
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2714
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2838
ERROR:Failed to open PortAudio stream.Invalid sample rate
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent

@ajot ajot added the Wake Word label Oct 7, 2016

@YaminMalkawi

This comment has been minimized.

Show comment
Hide comment
@YaminMalkawi

YaminMalkawi Oct 7, 2016

Can you use the command "arecord -l" to check if the microphone been recognized in your Pi?

Can you use the command "arecord -l" to check if the microphone been recognized in your Pi?

@mohaggag

This comment has been minimized.

Show comment
Hide comment
@mohaggag

mohaggag Oct 7, 2016

Yes i did the mic is working and alexa working well but with the listen button its just the wake word engin is not working

mohaggag commented Oct 7, 2016

Yes i did the mic is working and alexa working well but with the listen button its just the wake word engin is not working

@ndphu

This comment has been minimized.

Show comment
Hide comment
@ndphu

ndphu Oct 7, 2016

did you try with sensory?

ndphu commented Oct 7, 2016

did you try with sensory?

@mohaggag

This comment has been minimized.

Show comment
Hide comment
@mohaggag

mohaggag Oct 7, 2016

Yes. I did and its not working

mohaggag commented Oct 7, 2016

Yes. I did and its not working

@mihaiyoo6

This comment has been minimized.

Show comment
Hide comment
@mihaiyoo6

mihaiyoo6 Oct 7, 2016

Same here.. and the weird part is that when I setup all on my desk was working fine. I shutdown the PI move it to other place. start everything up all good but alexa doesn't wake.

Same here.. and the weird part is that when I setup all on my desk was working fine. I shutdown the PI move it to other place. start everything up all good but alexa doesn't wake.

@acidhax

This comment has been minimized.

Show comment
Hide comment
@acidhax

acidhax Oct 8, 2016

Pi Zero is having the same issue.

acidhax commented Oct 8, 2016

Pi Zero is having the same issue.

@lukyluke112

This comment has been minimized.

Show comment
Hide comment
@lukyluke112

lukyluke112 Oct 9, 2016

I have the same problem on my pi3 but i dont use a usb soundcard

lukyluke112 commented Oct 9, 2016

I have the same problem on my pi3 but i dont use a usb soundcard

@keleric

This comment has been minimized.

Show comment
Hide comment
@keleric

keleric Oct 10, 2016

Collaborator

What's your speaker set up? USB speaker? Can you try testing it with the 3.5 headphone jack?

Collaborator

keleric commented Oct 10, 2016

What's your speaker set up? USB speaker? Can you try testing it with the 3.5 headphone jack?

@lukyluke112

This comment has been minimized.

Show comment
Hide comment
@lukyluke112

lukyluke112 Oct 11, 2016

mine is a 3.5mm headphone jack with 2 speaker going through a cambridge amp

mine is a 3.5mm headphone jack with 2 speaker going through a cambridge amp

@YaminMalkawi

This comment has been minimized.

Show comment
Hide comment
@YaminMalkawi

YaminMalkawi Oct 11, 2016

To me it looks like an audio routing/configuration issue. The "automated_install.sh" script generates an ALSA configuration file (~/.asoundrc) which works under the following conditions:

  1. Fresh Raspbian image.
  2. Mic is connected through USB and shows up as card 1 and subdevice 0 using "arecord -l"
  3. Speakers are through HDMI or Audio Jack (to change between the two notice the amixer command in the script)

On the these websites:
Sensory-FAQ and Kitt-Ai-Docs they talk about how to test if your audio routing is working and the configuration file you need to change to fix audio routing issues.

To me it looks like an audio routing/configuration issue. The "automated_install.sh" script generates an ALSA configuration file (~/.asoundrc) which works under the following conditions:

  1. Fresh Raspbian image.
  2. Mic is connected through USB and shows up as card 1 and subdevice 0 using "arecord -l"
  3. Speakers are through HDMI or Audio Jack (to change between the two notice the amixer command in the script)

On the these websites:
Sensory-FAQ and Kitt-Ai-Docs they talk about how to test if your audio routing is working and the configuration file you need to change to fix audio routing issues.

@mohaggag

This comment has been minimized.

Show comment
Hide comment
@mohaggag

mohaggag Oct 12, 2016

Solved by this :
sudo nano ~/.asoundrc

change your ~/.asoundrc file to:
pcm.!default { type asym playback.pcm { type plug slave.pcm "hw:0" } capture.pcm { type plug slave.pcm "hw:1" } }
sudo nano ~/.asoundrc

and work with Sensory
cd ~/Desktop/alexa-avs-sample-app/samples cd wakeWordAgent/src && ./wakeWordAgent -e sensory

just let me know if this solve your problem
but i cannt make i work with snowboy , snowboy is working now but not listening

Solved by this :
sudo nano ~/.asoundrc

change your ~/.asoundrc file to:
pcm.!default { type asym playback.pcm { type plug slave.pcm "hw:0" } capture.pcm { type plug slave.pcm "hw:1" } }
sudo nano ~/.asoundrc

and work with Sensory
cd ~/Desktop/alexa-avs-sample-app/samples cd wakeWordAgent/src && ./wakeWordAgent -e sensory

just let me know if this solve your problem
but i cannt make i work with snowboy , snowboy is working now but not listening

@kerryog

This comment has been minimized.

Show comment
Hide comment
@kerryog

kerryog Oct 13, 2016

I was seeing this error and I got this to work by using a fresh install from NOOBS and following the instructions. Be sure to update everything with sudo apt-get update

kerryog commented Oct 13, 2016

I was seeing this error and I got this to work by using a fresh install from NOOBS and following the instructions. Be sure to update everything with sudo apt-get update

@ndphu

This comment has been minimized.

Show comment
Hide comment
@ndphu

ndphu Oct 14, 2016

Got error on Pi Zero:
./wakeWordAgent -e sensory INFO:main: Starting Wake Word Agent INFO:WakeWordAgent: State set to IDLE(2) INFO:Initializing Sensory library | library name: TrulyHandsfree | library version: 5.0.0-avs.1 | model file: ../ext/resources/spot-alexa-rpi.snsr Illegal instruction

ndphu commented Oct 14, 2016

Got error on Pi Zero:
./wakeWordAgent -e sensory INFO:main: Starting Wake Word Agent INFO:WakeWordAgent: State set to IDLE(2) INFO:Initializing Sensory library | library name: TrulyHandsfree | library version: 5.0.0-avs.1 | model file: ../ext/resources/spot-alexa-rpi.snsr Illegal instruction

@acidhax

This comment has been minimized.

Show comment
Hide comment
@acidhax

acidhax Oct 15, 2016

I've updated my Pi Zero to latest and still getting the same errors.

acidhax commented Oct 15, 2016

I've updated my Pi Zero to latest and still getting the same errors.

@Ayysir

This comment has been minimized.

Show comment
Hide comment
@Ayysir

Ayysir Oct 16, 2016

i think this line affects pi zero
https://github.com/alexa/alexa-avs-sample-app/blob/9c6294f58b52fd9d16ea1f99d5ba45b5cccc4dd4/samples/javaclient/src/main/java/com/amazon/alexa/avs/AudioStateOutputStream.java#L72

Ayysir commented Oct 16, 2016

i think this line affects pi zero
https://github.com/alexa/alexa-avs-sample-app/blob/9c6294f58b52fd9d16ea1f99d5ba45b5cccc4dd4/samples/javaclient/src/main/java/com/amazon/alexa/avs/AudioStateOutputStream.java#L72

@Nitee

This comment has been minimized.

Show comment
Hide comment
@Nitee

Nitee Oct 18, 2016

I'm currently going through a fresh install due to this. Everything was working my setup was as follows:

1 USB Microphone and 1 3.5mm audio jack

However, I wanted to get better audio so I got a USB sound card ($5 Sabrent 3D sound) and was trying to use the USB microphone as well, but to no avail and wake word was now broken. I tried many different solutions that didn't solve anything. I even plugged in a microphone into the sound card and removed the USB microphone but that didn't work. I'm now reinstalling and hoping if I set it up with the USB Soundcard only, it will work again.

Nitee commented Oct 18, 2016

I'm currently going through a fresh install due to this. Everything was working my setup was as follows:

1 USB Microphone and 1 3.5mm audio jack

However, I wanted to get better audio so I got a USB sound card ($5 Sabrent 3D sound) and was trying to use the USB microphone as well, but to no avail and wake word was now broken. I tried many different solutions that didn't solve anything. I even plugged in a microphone into the sound card and removed the USB microphone but that didn't work. I'm now reinstalling and hoping if I set it up with the USB Soundcard only, it will work again.

@JHdeVilliers

This comment has been minimized.

Show comment
Hide comment
@JHdeVilliers

JHdeVilliers Oct 19, 2016

The Sensory TrulyHandsfree library is compiled for the ARMv7 instruction set. The Raspberry Pi Zero is not supported. Please see the FAQ.

The Sensory TrulyHandsfree library is compiled for the ARMv7 instruction set. The Raspberry Pi Zero is not supported. Please see the FAQ.

@erikhopf-amzn

This comment has been minimized.

Show comment
Hide comment
@erikhopf-amzn

erikhopf-amzn Oct 19, 2016

Contributor

Pi Zero is supported by the KITT.AI WW engine: http://docs.kitt.ai/snowboy/#faq

Contributor

erikhopf-amzn commented Oct 19, 2016

Pi Zero is supported by the KITT.AI WW engine: http://docs.kitt.ai/snowboy/#faq

@Ayysir

This comment has been minimized.

Show comment
Hide comment
@Ayysir

Ayysir Oct 19, 2016

@erik were you able to get kitt working on pi zero?

On Oct 19, 2016 5:35 PM, "Erik" notifications@github.com wrote:

Pi Zero is supported by the KITT.AI WW engine:
http://docs.kitt.ai/snowboy/#faq


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#277 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3SM0fDg50vGNCJ8uclhXHRLZw3d571ks5q1o0GgaJpZM4KQ7CJ
.

Ayysir commented Oct 19, 2016

@erik were you able to get kitt working on pi zero?

On Oct 19, 2016 5:35 PM, "Erik" notifications@github.com wrote:

Pi Zero is supported by the KITT.AI WW engine:
http://docs.kitt.ai/snowboy/#faq


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#277 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3SM0fDg50vGNCJ8uclhXHRLZw3d571ks5q1o0GgaJpZM4KQ7CJ
.

@ajot

This comment has been minimized.

Show comment
Hide comment
@ajot

ajot Nov 15, 2016

Contributor

We're closing this Issue since the original poster (or another commenter) hasn't yet responded to the question or request made to them 14 days ago. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the Issue.

Thanks!

Contributor

ajot commented Nov 15, 2016

We're closing this Issue since the original poster (or another commenter) hasn't yet responded to the question or request made to them 14 days ago. We therefore assume that the user has lost interest or resolved the problem on their own.

Don't worry though; if this is an error, let us know with a comment and we'll be happy to reopen the Issue.

Thanks!

@ajot ajot closed this Nov 15, 2016

@acidhax

This comment has been minimized.

Show comment
Hide comment
@acidhax

acidhax Nov 18, 2016

This auto closing bot is giving me cancer

acidhax commented Nov 18, 2016

This auto closing bot is giving me cancer

@crazy100

This comment has been minimized.

Show comment
Hide comment
@crazy100

crazy100 Nov 24, 2016

I solve this problem by adding one line(format S16_LE) in .asound file as below.
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "plughw:0,0"
format S16_LE
}
capture.pcm {
type plug
slave.pcm "plughw:1,0"
}
}

I solve this problem by adding one line(format S16_LE) in .asound file as below.
pcm.!default {
type asym
playback.pcm {
type plug
slave.pcm "plughw:0,0"
format S16_LE
}
capture.pcm {
type plug
slave.pcm "plughw:1,0"
}
}

@keithpjolley

This comment has been minimized.

Show comment
Hide comment
@keithpjolley

keithpjolley Dec 24, 2016

I noticed i got very different messages between these two invocations. I'm ssh'd in from another machine w/ X forwarded.

% cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && sudo ./wakeWordAgent -e kitt_ai
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
...
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2043
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2714
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2838
ERROR:Failed to open PortAudio stream.Invalid sample rate
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent
%
% echo "notice the '-E' arg for sudo"
notice the '-E' arg for sudo
%
% cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && sudo -E ./wakeWordAgent -e kitt_ai
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
...
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

INFO:KittAiSnowboyWakeWordEngine: thread started
INFO:WakeWordIPCSocket::mainLoop thread started
INFO:WakeWordIPCSocket: init socket on port:5123
INFO:WakeWordAgent: thread started
INFO:===> Connected to AVS client <===

keithpjolley commented Dec 24, 2016

I noticed i got very different messages between these two invocations. I'm ssh'd in from another machine w/ X forwarded.

% cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && sudo ./wakeWordAgent -e kitt_ai
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
...
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2043
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2714
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2838
ERROR:Failed to open PortAudio stream.Invalid sample rate
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent
%
% echo "notice the '-E' arg for sudo"
notice the '-E' arg for sudo
%
% cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && sudo -E ./wakeWordAgent -e kitt_ai
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
...
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

INFO:KittAiSnowboyWakeWordEngine: thread started
INFO:WakeWordIPCSocket::mainLoop thread started
INFO:WakeWordIPCSocket: init socket on port:5123
INFO:WakeWordAgent: thread started
INFO:===> Connected to AVS client <===

@deriidf

This comment has been minimized.

Show comment
Hide comment
@deriidf

deriidf Jan 4, 2017

got the same problem and fixed
try this

sudo apt-get install python-pyaudio python3-pyaudio sox
pcm.!default
{
  type asym
  playback.pcm {
    type hw
    card 0
    device 0
  }
  capture.pcm {
    type plug
    slave {
      pcm {
        type hw
        card 1
        device 0
      }
    }
  }
}

deriidf commented Jan 4, 2017

got the same problem and fixed
try this

sudo apt-get install python-pyaudio python3-pyaudio sox
pcm.!default
{
  type asym
  playback.pcm {
    type hw
    card 0
    device 0
  }
  capture.pcm {
    type plug
    slave {
      pcm {
        type hw
        card 1
        device 0
      }
    }
  }
}
@Aezwen

This comment has been minimized.

Show comment
Hide comment
@Aezwen

Aezwen Jan 25, 2017

I have the same problem. It works using the java button but not the voice activation.

INFO:WakeWordAgent: thread started
INFO:WakeWordIPCSocket::mainLoop thread started
INFO:WakeWordIPCSocket: init socket on port:5123
INFO:KittAiSnowboyWakeWordEngine: thread started
INFO:===> Connected to AVS client <===

Aezwen commented Jan 25, 2017

I have the same problem. It works using the java button but not the voice activation.

INFO:WakeWordAgent: thread started
INFO:WakeWordIPCSocket::mainLoop thread started
INFO:WakeWordIPCSocket: init socket on port:5123
INFO:KittAiSnowboyWakeWordEngine: thread started
INFO:===> Connected to AVS client <===

@ChazTuna

This comment has been minimized.

Show comment
Hide comment
@ChazTuna

ChazTuna Jan 27, 2017

.asoundrc gets affected if you use the RPi window audio controller.
@deriidf had the solution for the correct file contents. I replaced the whole contents with his example and it works. (No need for the apt-get install ...)

.asoundrc gets affected if you use the RPi window audio controller.
@deriidf had the solution for the correct file contents. I replaced the whole contents with his example and it works. (No need for the apt-get install ...)

@szaske

This comment has been minimized.

Show comment
Hide comment
@szaske

szaske Mar 6, 2017

mohaggag's response above solved my problem.

szaske commented Mar 6, 2017

mohaggag's response above solved my problem.

@thedroidbuilder

This comment has been minimized.

Show comment
Hide comment
@thedroidbuilder

thedroidbuilder Mar 25, 2017

I've been trying to figure out how to get this to work and have narrowed it down to the error similar to the post at the top.

cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && ./wakeWordAgent -e kitt_ai
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ERROR:Failed to open PortAudio stream.Device unavailable
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent

So I've been reading all I can find on the error at the top of this.
Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'

I've been reading through all the info relating to this error and have yet to find a solution.

Obviously when I click on the Yes to "Login to Register/Authenticate your device
Amazon says:

We're sorry!
An error occurred when we tried to process your request. Rest assured, we're already working on the problem and expect to resolve it shortly.

So I'm pretty sure its related to the line:
**ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'

I've checked to make sure the alsa sound and alsamixer is installed and working. It seems to work just fine.

Here is my device list after using the command
aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Headset [Cyber Acoustics USB Headset], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

So what do I do from here?

I've been trying to figure out how to get this to work and have narrowed it down to the error similar to the post at the top.

cd /home/pi/Desktop/alexa-avs-sample-app/samples/wakeWordAgent/src && ./wakeWordAgent -e kitt_ai
INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ERROR:Failed to open PortAudio stream.Device unavailable
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent

So I've been reading all I can find on the error at the top of this.
Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'

I've been reading through all the info relating to this error and have yet to find a solution.

Obviously when I click on the Yes to "Login to Register/Authenticate your device
Amazon says:

We're sorry!
An error occurred when we tried to process your request. Rest assured, we're already working on the problem and expect to resolve it shortly.

So I'm pretty sure its related to the line:
**ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'

I've checked to make sure the alsa sound and alsamixer is installed and working. It seems to work just fine.

Here is my device list after using the command
aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Headset [Cyber Acoustics USB Headset], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

So what do I do from here?

@wzone001

This comment has been minimized.

Show comment
Hide comment
@wzone001

wzone001 Sep 20, 2017

I also have this problem, how to solve it ? i change the .asoundrc file also also no function.

I also have this problem, how to solve it ? i change the .asoundrc file also also no function.

@DamonClark

This comment has been minimized.

Show comment
Hide comment
@DamonClark

DamonClark Sep 22, 2017

Having same problem and also changed .asoundrc file and still no function

Having same problem and also changed .asoundrc file and still no function

@HarveySkye

This comment has been minimized.

Show comment
Hide comment
@HarveySkye

HarveySkye Nov 19, 2017

Been having the same problems as above and, not being super-techie, was very frustrated that either the above solutions did not work or were too complex for me to follow.
Decided to have my (20th) final(!!) try at the installation before giving up so did a complete install of Raspian and everything onto a blank SD card.
When I did the automated_install, while drinking the obligatory cup of coffee, I happened to see a message flash up the screen that I had not noticed before. It was too fast to read entirely but referred to a file or process that had just gone through and said that this would require a reboot to make it work and that "an early reboot was recommended". I had not noticed this before and have not seen it since but the pace of the whole process is so fast I am not surprised
After I completed the install process, and before I ran the final three sections, I rebooted the Pi and then completed the installation.
Alexa then worked perfectly with the e-sensory installation and has continued to work since.
I have experimented with several installations since, some with the intermediate reboot and some without. When the reboot is missed out, the AVS service sometimes works but more often doesn't and, when it does, it soon seems to fail on the second or third session of use.
When the reboot is used, it works every time for e-sensory and remains working for as many subsequent sessions as I have tried.
I am afraid I still cannot get the kitt-ai version to work, though.

I think it worth others trying this simple solution which works for me on the Pi3 and hope it solves some other peoples' problems

Been having the same problems as above and, not being super-techie, was very frustrated that either the above solutions did not work or were too complex for me to follow.
Decided to have my (20th) final(!!) try at the installation before giving up so did a complete install of Raspian and everything onto a blank SD card.
When I did the automated_install, while drinking the obligatory cup of coffee, I happened to see a message flash up the screen that I had not noticed before. It was too fast to read entirely but referred to a file or process that had just gone through and said that this would require a reboot to make it work and that "an early reboot was recommended". I had not noticed this before and have not seen it since but the pace of the whole process is so fast I am not surprised
After I completed the install process, and before I ran the final three sections, I rebooted the Pi and then completed the installation.
Alexa then worked perfectly with the e-sensory installation and has continued to work since.
I have experimented with several installations since, some with the intermediate reboot and some without. When the reboot is missed out, the AVS service sometimes works but more often doesn't and, when it does, it soon seems to fail on the second or third session of use.
When the reboot is used, it works every time for e-sensory and remains working for as many subsequent sessions as I have tried.
I am afraid I still cannot get the kitt-ai version to work, though.

I think it worth others trying this simple solution which works for me on the Pi3 and hope it solves some other peoples' problems

@mattbey

This comment has been minimized.

Show comment
Hide comment
@mattbey

mattbey Dec 14, 2017

Having a similar problem trying to setup an Echo on my Pi.

I used this line:

./wakeWordAgent -e kitt_ai

And getting this error. Can someone please help?

INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2043
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2714
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2838
ERROR:Failed to open PortAudio stream.Invalid sample rate
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent

mattbey commented Dec 14, 2017

Having a similar problem trying to setup an Echo on my Pi.

I used this line:

./wakeWordAgent -e kitt_ai

And getting this error. Can someone please help?

INFO:main: Starting Wake Word Agent
INFO:WakeWordAgent: State set to IDLE(2)
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2043
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2714
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2838
ERROR:Failed to open PortAudio stream.Invalid sample rate
ERROR:KittAiSnowboyWakeWordEngine: Initialization error:Failed to open PortAudio stream.
ERROR:WakeWordAgent: exception in constructor: Failed to open PortAudio stream.
ERROR:main: Exception happened: Failed to open PortAudio stream.
INFO:Shutting down Wake Word Agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment