[Audio Server] reported an error on site default : An error happened while trying to play some audio

I’ll try to reproduce this one tomorrow

I could reproduce also an issue with the raspi audio card playing part of the sound.

All my board does not behave the same way. One of them works perfectly (out of 3). This will need a bit of work to track the difference tomorrow. Keep you posted

1 Like

Thank you, already got used to it haha! :+1::v:

Hi,

any news on this? :slight_smile:

My wife is missing Snips already… :smiley: :frowning:

I downgraded the snips-satellite package to 0.63.3. For some reason it cannot speak, but it can play the tone and accept my commands again.

I never upgraded the satellites so they are still working, but they don’t speak anymore, too as they use the audio server on the base for it and that errors ^^ but not always, sometimes I get an answer.

I also thought of downgrading the base by flashing a backup image but I assume the new assistant will not work then so I can use it as it is but not develope my assistant further…

From the Platform Update thread I see that Sakana has a tough time with these issues.

@paulvt

TTS now use PlayBytesStreaming instead of PlayBytes. Unless you downgrade the TTS as well it will not work.

@HorizonKane,

While I’m trying to find an acceptable workaround, you could follow @paulvt trick.

sudo apt install snips-audio-server=0.63.3
sudo apt install snips-tts=0.63.3

It should nail it hopefully.

Okay, and will that work with current assitants? I noticed there was an update, too. When I first updated my agent BEFORE updating snips, it complained about that. Don’t remember the accurate message.

I just give it a try :slight_smile:

I don’t know what is an agent, is it a part of a domotic framework?

I meant assistant of course, sorry.

Yay, works great, thank you!

1 Like

Should be ok, only snips-nlu, snips-asr and snips-injection are impacted with latest changes on the console side.

1 Like

@HorizonKane,

Just another question related to the streaming issues (first chunk missing in the TTS streaming)

Do you use the picoTTS standard implementation or another TTS solution?

I am using Polly through this one to rule them all tts script. I tried a fallback to the standard, I don’t remember those chunk errors there but still the other error with the audio server.

On trying this, i get the following error:
What can i do?

pi@J4-K4:~ $ sudo apt install snips-audio-server=0.63.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Version ‘0.63.3’ for ‘snips-audio-server’ was not found

pi@J4-K4:~ $ sudo apt install snips-tts=0.63.3
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Version ‘0.63.3’ for ‘snips-tts’ was not found

Yes, that fixes it (as in, workaround). I was already suspecting that not being able to speak was due to some other components using other things in 0.64.
My server (using snips-tss 0.63.3 now), can let the satellites (using snips-satellite 0.63.3) speak again. Thanks!

Thanks for the quick response; I spent a ton of time on this tonight and couldn’t figure anything out - just different ways to break it… :sweat_smile:

Also, can you provide the output of cat /etc/asound.conf

pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm "speaker"
}

pcm.mic {
   type softvol
   slave {
     pcm "array"
   }
   control {
     name "MicArray Master"
        card "MATRIXIOSOUND"
   }
}

pcm.speaker {
  type plug
  slave {
    pcm "hw:0,0"
  }
}

pcm.array {
  type plug
  slave {
    pcm "hw:MATRIXIOSOUND"
  }
}

aplay -lL

null
    Discard all samples (playback) or generate zero samples (capture)
default
mic
speaker
array
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
dmix:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample mixing device
dmix:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample mixing device
dmix:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Direct sample mixing device
dsnoop:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct sample snooping device
dsnoop:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Direct sample snooping device
hw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Direct hardware device without any conversions
hw:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Direct hardware device without any conversions
plughw:CARD=ALSA,DEV=0
    bcm2835 ALSA, bcm2835 ALSA
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=1
    bcm2835 ALSA, bcm2835 IEC958/HDMI
    Hardware device with all software conversions
plughw:CARD=ALSA,DEV=2
    bcm2835 ALSA, bcm2835 IEC958/HDMI1
    Hardware device with all software conversions
sysdefault:CARD=Dummy
    Dummy, Dummy PCM
    Default Audio Device
dmix:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct sample mixing device
dsnoop:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct sample snooping device
hw:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct hardware device without any conversions
plughw:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Hardware device with all software conversions
dmix:CARD=MATRIXIOSOUND,DEV=1
    MATRIXIO-SOUND, 
    Direct sample mixing device
dsnoop:CARD=MATRIXIOSOUND,DEV=1
    MATRIXIO-SOUND, 
    Direct sample snooping device
hw:CARD=MATRIXIOSOUND,DEV=1
    MATRIXIO-SOUND, 
    Direct hardware device without any conversions
plughw:CARD=MATRIXIOSOUND,DEV=1
    MATRIXIO-SOUND, 
    Hardware device with all software conversions
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  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
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
  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 2: MATRIXIOSOUND [MATRIXIO-SOUND], device 1: matrixio.pcm-out.0 snd-soc-dummy-dai-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and arecord -lL .

null
    Discard all samples (playback) or generate zero samples (capture)
default
mic
speaker
array
sysdefault:CARD=Dummy
    Dummy, Dummy PCM
    Default Audio Device
dmix:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct sample mixing device
dsnoop:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct sample snooping device
hw:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Direct hardware device without any conversions
plughw:CARD=Dummy,DEV=0
    Dummy, Dummy PCM
    Hardware device with all software conversions
sysdefault:CARD=MATRIXIOSOUND
    MATRIXIO-SOUND, 
    Default Audio Device
dmix:CARD=MATRIXIOSOUND,DEV=0
    MATRIXIO-SOUND, 
    Direct sample mixing device
dsnoop:CARD=MATRIXIOSOUND,DEV=0
    MATRIXIO-SOUND, 
    Direct sample snooping device
hw:CARD=MATRIXIOSOUND,DEV=0
    MATRIXIO-SOUND, 
    Direct hardware device without any conversions
plughw:CARD=MATRIXIOSOUND,DEV=0
    MATRIXIO-SOUND, 
    Hardware device with all software conversions
**** List of CAPTURE Hardware Devices ****
card 1: Dummy [Dummy], device 0: Dummy PCM [Dummy PCM]
  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 2: MATRIXIOSOUND [MATRIXIO-SOUND], device 0: matrixio.mic.0 snd-soc-dummy-dai-0 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0

To test that out quickly you can use the following command (assuming that your playback output is on “default”)

sudo -u _snips snips-audio-server -v --portaudio_playback="default"

[00:37:31.184546] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.no_exit_on_all_panics -> Ok(None)
[00:37:31.185195] DEBUG:snips_common_cli::cli: conf lookup: snips-common.no_exit_on_all_panics -> Ok(None)
[00:37:31.185298] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bus -> Ok(None)
[00:37:31.185378] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bus -> Ok(None)
[00:37:31.185465] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt -> Ok(None)
[00:37:31.185541] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt -> Ok(None)
[00:37:31.185754] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_username -> Ok(None)
[00:37:31.185840] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_username -> Ok(None)
[00:37:31.185928] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_password -> Ok(None)
[00:37:31.186009] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_password -> Ok(None)
[00:37:31.186099] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_tls_hostname -> Ok(None)
[00:37:31.186184] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_tls_hostname -> Ok(None)
[00:37:31.190054] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_playback -> Ok(None)
[00:37:31.190213] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_playback -> Ok(None)
[00:37:31.190308] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_playback -> Ok(None)
[00:37:31.190392] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_playback -> Ok(None)
[00:37:31.190540] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.portaudio_playback -> Ok(None)
[00:37:31.190631] DEBUG:snips_common_cli::cli: conf lookup: snips-common.portaudio_playback -> Ok(None)
[00:37:31.190718] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.output -> Ok(None)
[00:37:31.190797] DEBUG:snips_common_cli::cli: conf lookup: snips-common.output -> Ok(None)
[00:37:31.190887] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.frame -> Ok(None)
[00:37:31.190967] DEBUG:snips_common_cli::cli: conf lookup: snips-common.frame -> Ok(None)
[00:37:31.191056] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_capture -> Ok(None)
[00:37:31.191139] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_capture -> Ok(None)
[00:37:31.191222] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.nomike -> Ok(None)
[00:37:31.191298] DEBUG:snips_common_cli::cli: conf lookup: snips-common.nomike -> Ok(None)
[00:37:31.191384] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.portaudio_capture -> Ok(None)
[00:37:31.191468] DEBUG:snips_common_cli::cli: conf lookup: snips-common.portaudio_capture -> Ok(None)
[00:37:31.191553] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mike -> Ok(Some("MATRIXIO-SOUND: - (hw:2,0)"))
[00:37:31.191658] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_capture -> Ok(None)
[00:37:31.191740] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_capture -> Ok(None)
[00:37:31.191798] WARN :snips_audio_server_cli: Using the mike argument is deprecated, use portaudio_capture instead
[00:37:31.191883] DEBUG:snips_common_cli::cli : conf lookup: snips-audio-server.hijack -> Ok(None)
[00:37:31.191960] DEBUG:snips_common_cli::cli : conf lookup: snips-common.hijack -> Ok(None)
[00:37:31.192043] DEBUG:snips_common_cli::cli : conf lookup: snips-audio-server.bind -> Ok(None)
[00:37:31.192119] DEBUG:snips_common_cli::cli : conf lookup: snips-common.bind -> Ok(None)
[00:37:31.192207] DEBUG:snips_common_cli::cli : conf lookup: snips-audio-server.bind -> Ok(None)
[00:37:31.192284] DEBUG:snips_common_cli::cli : conf lookup: snips-common.bind -> Ok(None)
[00:37:31.192397] INFO :snips_audio_server_cli: Starting audio server on mqtt for site default
[00:37:31.192715] DEBUG:snips_audio_portaudio : Attempt 0
[00:37:31.192880] DEBUG:snips_audio_portaudio : Mike source capture started
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.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 pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
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 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
[00:37:31.229286] DEBUG:snips_audio_portaudio : Portaudio: Ok("PortAudio V19-devel (built Sep 26 2019 13:54:27)")
[00:37:31.229753] DEBUG:snips_audio_portaudio : Mike source capture ended
[00:37:31.292864] DEBUG:snips_audio_portaudio : Attempt 1
[00:37:31.293037] ERROR:snips_audio_server    : an error occured in the audio pipeline: ErrorMessage { msg: "Couldn\'t find a PortAudio device with the name MATRIXIO-SOUND: - (hw:2,0)" }
 -> caused by: Couldn't find a PortAudio device with the name MATRIXIO-SOUND: - (hw:2,0)

[00:37:31.293077] ERROR:rumqtt::client        : snips-audio-server|8749-one-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
[00:37:31.293137] ERROR:snips_common_cli::cli : Unable to reconnect to the mqtt broker, ending the program.

Also tried downgrading:

sudo apt install snips-audio-server=0.63.3
sudo apt install snips-tts=0.63.3

but:

sam install demo
sam watch

[00:51:35] Watching on localhost:1883 (MQTT)
[00:51:40] [Hotword] detected on site default, for model hey_snips
[00:51:40] [Asr] was asked to stop listening on site default
[00:51:40] [Hotword] was asked to toggle itself 'off' on site default
[00:51:40] [Dialogue] session with id 'f830d483-8efb-45c7-bfc8-5aefce9e98c0' was started on site default
[00:51:40] [AudioServer] was asked to play a wav of 41.1 kB with id '1111221a-b955-4787-bc72-426dbb42153a' on site default
[00:51:56] [Dialogue] session with id 'f830d483-8efb-45c7-bfc8-5aefce9e98c0' was ended on site default. The session timed out because the Audio Server component did not respond in a timely manner. Please ensure that the snips audio server is started and running correctly.
[00:51:56] [Asr] was asked to stop listening on site default
[00:51:56] [Hotword] was asked to toggle itself 'on' on site default
[00:52:01] [Hotword] detected on site default, for model hey_snips
[00:52:01] [Asr] was asked to stop listening on site default
[00:52:01] [Hotword] was asked to toggle itself 'off' on site default
[00:52:01] [Dialogue] session with id '0e3c9c0c-7c21-4e97-a2b4-4f357c6c8120' was started on site default
[00:52:01] [AudioServer] was asked to play a wav of 41.1 kB with id 'b3af1b22-8b30-4c31-8ab5-9311cc43922d' on site default
[00:52:17] [Dialogue] session with id '0e3c9c0c-7c21-4e97-a2b4-4f357c6c8120' was ended on site default. The session timed out because the Audio Server component did not respond in a timely manner. Please ensure that the snips audio server is started and running correctly.
[00:52:17] [Asr] was asked to stop listening on site default
[00:52:17] [Hotword] was asked to toggle itself 'on' on site default
sudo -u _snips snips-audio-server -v
[00:53:10.388448] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bus -> Ok(None)
[00:53:10.388972] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bus -> Ok(None)
[00:53:10.389114] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt -> Ok(None)
[00:53:10.389237] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt -> Ok(None)
[00:53:10.389514] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_username -> Ok(None)
[00:53:10.389736] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_username -> Ok(None)
[00:53:10.389906] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_password -> Ok(None)
[00:53:10.390034] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_password -> Ok(None)
[00:53:10.390170] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_tls_hostname -> Ok(None)
[00:53:10.390301] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_tls_hostname -> Ok(None)
[00:53:10.394473] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_playback -> Ok(None)
[00:53:10.394710] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_playback -> Ok(None)
[00:53:10.394892] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_playback -> Ok(None)
[00:53:10.395030] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_playback -> Ok(None)
[00:53:10.395163] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.output -> Ok(None)
[00:53:10.395289] DEBUG:snips_common_cli::cli: conf lookup: snips-common.output -> Ok(None)
[00:53:10.395424] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.frame -> Ok(None)
[00:53:10.395548] DEBUG:snips_common_cli::cli: conf lookup: snips-common.frame -> Ok(None)
[00:53:10.395680] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.nomike -> Ok(None)
[00:53:10.395803] DEBUG:snips_common_cli::cli: conf lookup: snips-common.nomike -> Ok(None)
[00:53:10.395934] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mike -> Ok(Some("MATRIXIO-SOUND: - (hw:2,0)"))
[00:53:10.396250] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_capture -> Ok(None)
[00:53:10.396384] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_capture -> Ok(None)
[00:53:10.396517] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_capture -> Ok(None)
[00:53:10.396644] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_capture -> Ok(None)
[00:53:10.396778] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.hijack -> Ok(None)
[00:53:10.396899] DEBUG:snips_common_cli::cli: conf lookup: snips-common.hijack -> Ok(None)
[00:53:10.397030] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bind -> Ok(None)
[00:53:10.397152] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bind -> Ok(None)
[00:53:10.397287] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bind -> Ok(None)
[00:53:10.397409] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bind -> Ok(None)
[00:53:10.397564] INFO :snips_audio_server_cli: Starting audio server on mqtt for site default
[00:53:10.397902] DEBUG:snips_audio_portaudio : Attempt 0
[00:53:10.398317] DEBUG:snips_audio_portaudio : Mike source capture started
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.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 pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
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 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 923
[00:53:10.464351] DEBUG:snips_audio_portaudio : Portaudio: Ok("PortAudio V19-devel (built Jul  9 2019 18:34:00)")
[00:53:10.464557] DEBUG:snips_audio_portaudio : Looking for input device called MATRIXIO-SOUND: - (hw:2,0)
[00:53:10.464667] DEBUG:snips_audio_portaudio : Consider: bcm2835 ALSA: IEC958/HDMI (hw:0,1)
[00:53:10.464770] DEBUG:snips_audio_portaudio : Consider: bcm2835 ALSA: IEC958/HDMI1 (hw:0,2)
[00:53:10.465458] DEBUG:snips_audio_portaudio : Consider: Dummy: PCM (hw:1,0)
[00:53:10.465576] DEBUG:snips_audio_portaudio : Consider: MATRIXIO-SOUND: - (hw:2,1)
[00:53:10.465676] DEBUG:snips_audio_portaudio : Consider: dmix
[00:53:10.466599] DEBUG:snips_audio_portaudio : Mike source capture ended
[00:53:10.498098] DEBUG:snips_audio_portaudio : Attempt 1
[00:53:10.498312] ERROR:snips_audio_server    : Could not find required input device

[00:53:10.498354] ERROR:rumqtt::client        : snips-audio-server|9488-one-1 Disconnected: (Error(SyncMpsc(Disconnected), State { next_error: None, backtrace: None }))
[00:53:10.498403] ERROR:snips_common_cli::cli : Unable to reconnect to the mqtt broker, ending the program.

(and still, after restart)

sam status

Connected to device 192.168.1.30

OS version ................... Raspbian GNU/Linux 9 (stretch)
Installed assistant .......... SnipsDemoWeatherAssistant
Language ..................... en
Hotword ...................... hey_snips
ASR engine ................... snips
Status ....................... Live

Service status:

snips-analytics .............. (not running)
snips-asr .................... 0.64.0 (running)
snips-audio-server ........... 0.63.3 (running)
snips-dialogue ............... 0.64.0 (running)
snips-hotword ................ 0.64.0 (running)
snips-nlu .................... 0.64.0 (running)
snips-skill-server ........... 0.64.0 (running)
snips-tts .................... 0.63.3 (running)
sam test speaker
sam test microphone

both still fine

Tried sam init - same…

Next:

sudo systemctl stop snips-audio-server
sudo -u _snips snips-audio-server -v
.
.
.
[01:44:42.451823] DEBUG:snips_audio_portaudio : Attempt 1
[01:44:42.552032] DEBUG:snips_audio_portaudio : Attempt 2
[01:44:42.652211] DEBUG:snips_audio_portaudio : Attempt 3
[01:44:42.652306] DEBUG:snips_audio_portaudio : Mike initialization looking good
[01:44:42.652816] INFO :snips_broadcast_mqtt_server: Starting broadcasting audio on hermes for site "default"
[01:49:44.383170] INFO :snips_audio_portaudio      : Playing "47285b7a-f7bd-4611-9607-e882678c68f8" using output "bcm2835 ALSA: IEC958/HDMI (hw:0,1)", wav spec: WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2043
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->playback, outParams, self->primeBuffers, hwParamsPlayback, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2717
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2838
thread 'portaudio.player' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:49:44.385339] ERROR:snips_audio_server_hermes  : could not play "47285b7a-f7bd-4611-9607-e882678c68f8"
 -> caused by: InvalidSampleRate

Finally:

sudo systemctl stop snips-audio-server
sudo -u _snips snips-audio-server -v --alsa_playback default
[01:54:37.495341] DEBUG:snips_audio_portaudio : Attempt 1
[01:54:37.595788] DEBUG:snips_audio_portaudio : Attempt 2
[01:54:37.595877] DEBUG:snips_audio_portaudio : Mike initialization looking good
[01:54:37.596562] INFO :snips_broadcast_mqtt_server: Starting broadcasting audio on hermes for site "default"
[01:55:24.923318] INFO :snips_audio_alsa::playback : Using ALSA output Some("default") ("bcm2835 ALSA") for "9bd2bdc3-ace3-4564-a0e9-b2b020ffa303", WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
[01:55:35.049521] ERROR:snips_audio_server_hermes  : could not play "9bd2bdc3-ace3-4564-a0e9-b2b020ffa303"
 -> caused by: ALSA function 'snd_pcm_drain' failed with error 'EIO: I/O error'

[01:56:21.008258] INFO :snips_audio_alsa::playback : Using ALSA output Some("default") ("bcm2835 ALSA") for "1e2ad382-791b-42a6-8bde-7d3b43135b60", WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
[01:56:31.369314] ERROR:snips_audio_server_hermes  : could not play "1e2ad382-791b-42a6-8bde-7d3b43135b60"
 -> caused by: ALSA function 'snd_pcm_drain' failed with error 'EIO: I/O error'

I’m just started out with all this stuff and not really sure how to diagnose…I’m also happy to do a brand new install, or … . . anything to get this working; it’s for the Hackster contest due in 3 weeks, and right now I’m worried about even having the demo running by then… :sweat_smile: Thanks in advance for any help/ideas! :blue_heart:

Downgrading snips-audio-server and snips-tts to 0.63.3 works for me. I’m on rpi3 + matrix voice.

1 Like

@ishotjr,

You can try to add pcm.rate 48000 in your playback hw slave definition
(should work using portaudio back end on version 0.64.0 and 0.63.3)

pcm.!default {
  type asym
  capture.pcm "mic"
  playback.pcm {
        type plug
        slave.pcm "hw:0,0"
        slave.rate 48000  # Does not work if this is removed.
    }
}

pcm.mic {
   type softvol
   slave {
     pcm "array"
   }
   control {
     name "MicArray Master"
     card "MATRIXIOSOUND"
   }
}

pcm.array {
  type plug
  slave {
    pcm "hw:MATRIXIOSOUND"
  }
}

=> it is the workaround 3 for the bcm2835 stated on snips-issues#203

=> I could test it with a matrix creator. Seems OK (don’t forget to use portaudio backend)

1 Like

Thanks - but to clarify, how do I use/install portaudio? In my earlier message when I tried the “quick” portaudio test, portaudio wouldn’t work; I couldn’t find anything out about it online other than some complicated docs about compiling it from source? :sweat_smile: