[beginner] getting started on Debian 9 VM - Audio playback problem

Hi,

I’m trying to do my first steps using Snips. I’ve started with the Quick Start Raspberry Pi guide and some fiddling around. I’m at the point where I get hey_snips recognized. Then, however, I get an audio playback error.

martin@debian-snips:~$ sam watch
[10:02:59] Watching on localhost:1883 (MQTT)
[10:03:03] [Hotword] detected on site default, for model hey_snips
[10:03:03] [Asr] was asked to stop listening on site default
[10:03:03] [Hotword] was asked to toggle itself 'off' on site default
[10:03:03] [Dialogue] session with id 'b0dd013c-10f0-47f8-a568-45645cc742d5' was started on site default
[10:03:03] [AudioServer] was asked to play a wav of 41.1 kB with id 'ac1bf674-1a79-4592-8223-95d3fa45e70a' on site default
[10:03:03] [Audio Server] reported an error on site default : An error happened while trying to play some audio
[10:03:18] [Dialogue] session with id 'b0dd013c-10f0-47f8-a568-45645cc742d5' 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.
[10:03:18] [Asr] was asked to stop listening on site default
[10:03:18] [Hotword] was asked to toggle itself 'on' on site default

Audio Server output:

[10:03:03.197826] ERROR:snips_audio_server_hermes::player: An error happened while trying to play some audio: could not play "ac1bf674-1a79-4592-8223-95d3fa45e70a"
 -> caused by: an error occured in the audio pipeline: Error("snd_pcm_hw_params_set_rate", Sys(EINVAL))
 -> caused by: ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument'

Any Idea how to fix this error? sam test speaker works fine.

Thanks!

further debugging stuff:

installed versions:

martin@debian-snips:~$ apt list snips*
Listing... Done
snips-analytics/unknown 0.64.0 amd64
snips-asr/unknown,now 0.64.0 amd64 [installed,automatic]
snips-asr-google/unknown 0.64.0 amd64
snips-asr-injection/unknown 0.58.3 amd64
snips-audio-server/unknown,now 0.64.0 amd64 [installed,automatic]
snips-dialogue/unknown,now 0.64.0 amd64 [installed,automatic]
snips-hotword/unknown,now 0.64.0 amd64 [installed,automatic]
snips-hotword-ffi/unknown 0.64.0 amd64
snips-hotword-model-heysnipsv4/unknown 0.64.0 amd64
snips-injection/unknown,now 0.64.0 amd64 [installed,automatic]
snips-kaldi-atlas/unknown,now 0.26.1 amd64 [installed,automatic]
snips-makers-tts/unknown 0.64.0 amd64
snips-megazord/unknown 0.64.0 amd64
snips-nlu/unknown,now 0.64.0 amd64 [installed,automatic]
snips-pegasus/unknown 0.64.0 amd64
snips-platform-common/unknown,now 0.64.0 amd64 [installed,automatic]
snips-platform-demo/unknown 0.64.0 amd64
snips-platform-voice/unknown,now 0.64.0 amd64 [installed]
snips-satellite/unknown 0.64.0 amd64
snips-skill-server/unknown,now 0.64.0 amd64 [installed]
snips-template/unknown,now 0.64.0 amd64 [installed]
snips-tts/unknown,now 0.64.0 amd64 [installed]
snips-watch/unknown,now 0.64.0 amd64 [installed]
  • Audio Server output

      martin@debian-snips:~$ sudo systemctl stop snips-audio-server                                                                                                                                                                                               
      martin@debian-snips:~$ sudo -u _snips snips-audio-server -v                                                                                                                                                                                                 
      [10:01:57.956847] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.no_exit_on_all_panics -> Ok(None)                                                                                                                                            
      [10:01:57.956961] DEBUG:snips_common_cli::cli: conf lookup: snips-common.no_exit_on_all_panics -> Ok(None)                                                                                                                                                  
      [10:01:57.956975] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bus -> Ok(None)                                                                                                                                                              
      [10:01:57.956984] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bus -> Ok(None)                                                                                                                                                                    
      [10:01:57.956994] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt -> Ok(None)                                                                                                                                                             
      [10:01:57.957003] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt -> Ok(None)                                                                                                                                                                   
      [10:01:57.957033] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_username -> Ok(None)                                                                                                                                                    
      [10:01:57.957044] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_username -> Ok(None)                                                                                                                                                          
      [10:01:57.957054] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_password -> Ok(None)                                                                                                                                                    
      [10:01:57.957063] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_password -> Ok(None)                                                                                                                                                          
      [10:01:57.957073] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mqtt_tls_hostname -> Ok(None)                                                                                                                                                
      [10:01:57.957082] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mqtt_tls_hostname -> Ok(None)                                                                                                                                                      
      [10:01:57.957891] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_playback -> Ok(None)                                                                                                                                                 
      [10:01:57.957967] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_playback -> Ok(None)                                                                                                                                                       
      [10:01:57.958014] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_playback -> Ok(None)                                                                                                                                                    
      [10:01:57.958026] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_playback -> Ok(None)                                                                                                                                                          
      [10:01:57.958036] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.portaudio_playback -> Ok(None)                                                                                                                                               
      [10:01:57.958046] DEBUG:snips_common_cli::cli: conf lookup: snips-common.portaudio_playback -> Ok(None)                                                                                                                                                     
      [10:01:57.958056] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.output -> Ok(None)                                                                                                                                                           
      [10:01:57.958065] DEBUG:snips_common_cli::cli: conf lookup: snips-common.output -> Ok(None)                                                                                                                                                                 
      [10:01:57.958075] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.frame -> Ok(None)                                                                                                                                                            
      [10:01:57.958084] DEBUG:snips_common_cli::cli: conf lookup: snips-common.frame -> Ok(None)                                                                                                                                                                  
      [10:01:57.958094] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.disable_capture -> Ok(None)                                                                                                                                                  
      [10:01:57.958104] DEBUG:snips_common_cli::cli: conf lookup: snips-common.disable_capture -> Ok(None)                                                                                                                         
      [10:01:57.958113] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.nomike -> Ok(None)                                                                                                                            
      [10:01:57.958122] DEBUG:snips_common_cli::cli: conf lookup: snips-common.nomike -> Ok(None)                                                                                                                                  
      [10:01:57.958132] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.portaudio_capture -> Ok(None)                                                                                                                 
      [10:01:57.958142] DEBUG:snips_common_cli::cli: conf lookup: snips-common.portaudio_capture -> Ok(None)                                                                                                                       
      [10:01:57.958152] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.mike -> Ok(None)                                                                                                                              
      [10:01:57.958160] DEBUG:snips_common_cli::cli: conf lookup: snips-common.mike -> Ok(None)                                                                                                                                    
      [10:01:57.958170] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.alsa_capture -> Ok(None)                                                                                                                      
      [10:01:57.958179] DEBUG:snips_common_cli::cli: conf lookup: snips-common.alsa_capture -> Ok(None)                                                                                                                            
      [10:01:57.958188] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.hijack -> Ok(None)                                                                                                                            
      [10:01:57.958197] DEBUG:snips_common_cli::cli: conf lookup: snips-common.hijack -> Ok(None)                                                                                                                                  
      [10:01:57.958207] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bind -> Ok(None)                                                                                                                              
      [10:01:57.958216] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bind -> Ok(None)                                                                                                                                    
      [10:01:57.958226] DEBUG:snips_common_cli::cli: conf lookup: snips-audio-server.bind -> Ok(None)                                                                                                                              
      [10:01:57.958235] DEBUG:snips_common_cli::cli: conf lookup: snips-common.bind -> Ok(None)                                                                                                                                    
      [10:01:57.958247] INFO :snips_audio_server_cli: Starting audio server on mqtt for site default                                                                                                                               
      [10:01:57.958298] DEBUG:snips_audio_alsa::capture: Attempt 0                                                                                                                                                                 
      [10:01:57.958349] DEBUG:snips_audio_alsa::capture: ALSA capture source started                                                                                                                                               
      [10:01:57.958386] DEBUG:snips_audio_alsa::capture: List ALSA capture devices                                                                                                                                                 
      No protocol specified                                                                                                                                                                                                        
      xcb_connection_has_error() returned true
      Failed to create secure directory (/var/empty/.config/pulse): No such file or directory
      No protocol specified
      No protocol specified
      xcb_connection_has_error() returned true
      Failed to create secure directory (/var/empty/.config/pulse): No such file or directory
      No protocol specified
      [10:01:58.037490] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("null"), desc: Some("Discard all samples (playback) or generate zero samples (capture)"), direction: None }
      [10:01:58.037584] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("default"), desc: None, direction: None }
      [10:01:58.037601] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("sysdefault:CARD=AudioPCI"), desc: Some("Ensoniq AudioPCI, ES1371 DAC2/ADC\nDefault Audio Device"), direction: None }
      [10:01:58.037620] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("front:CARD=AudioPCI,DEV=0"), desc: Some("Ensoniq AudioPCI, ES1371 DAC2/ADC\nFront speakers"), direction: None }
      [10:01:58.037640] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("iec958:CARD=AudioPCI,DEV=0"), desc: Some("Ensoniq AudioPCI, ES1371 DAC2/ADC\nIEC958 (S/PDIF) Digital Audio Output"), direction: None }
      [10:01:58.037659] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("dmix:CARD=AudioPCI,DEV=0"), desc: Some("Ensoniq AudioPCI, ES1371 DAC2/ADC\nDirect sample mixing device"), direction: None }
      [10:01:58.037676] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("dsnoop:CARD=AudioPCI,DEV=0"), desc: Some("Ensoniq AudioPCI, ES1371 DAC2/ADC\nDirect sample snooping device"), direction: None }
      [10:01:58.037695] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("hw:CARD=AudioPCI,DEV=0"), desc: Some("Ensoniq AudioPCI, ES1371 DAC2/ADC\nDirect hardware device without any conversions"), direction: None }
      [10:01:58.037713] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("plughw:CARD=AudioPCI,DEV=0"), desc: Some("Ensoniq AudioPCI, ES1371 DAC2/ADC\nHardware device with all software conversions"), direction: None }
      [10:01:58.037731] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("sysdefault:CARD=Device"), desc: Some("USB PnP Sound Device, USB Audio\nDefault Audio Device"), direction: Some(Capture) }
      [10:01:58.037748] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("front:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\nFront speakers"), direction: Some(Capture) }
      [10:01:58.037766] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("surround21:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\n2.1 Surround output to Front and Subwoofer speakers"), direction: Some
      [10:01:58.037783] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("surround40:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\n4.0 Surround output to Front and Rear speakers"), direction: Some(Capt
      [10:01:58.037801] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("surround41:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\n4.1 Surround output to Front, Rear and Subwoofer speakers"), direction
      [10:01:58.037819] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("surround50:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\n5.0 Surround output to Front, Center and Rear speakers"), direction: S
      [10:01:58.037838] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("surround51:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\n5.1 Surround output to Front, Center, Rear and Subwoofer speakers"), d
      [10:01:58.037855] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("surround71:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\n7.1 Surround output to Front, Center, Side, Rear and Woofer speakers")
      [10:01:58.037873] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("iec958:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\nIEC958 (S/PDIF) Digital Audio Output"), direction: Some(Capture) }
      [10:01:58.037890] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("dmix:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\nDirect sample mixing device"), direction: Some(Capture) }
      [10:01:58.037905] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("dsnoop:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\nDirect sample snooping device"), direction: Some(Capture) }
      [10:01:58.037921] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("hw:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\nDirect hardware device without any conversions"), direction: Some(Capture) }
      [10:01:58.037948] DEBUG:snips_audio_alsa::capture:  -  Hint { name: Some("plughw:CARD=Device,DEV=0"), desc: Some("USB PnP Sound Device, USB Audio\nHardware device with all software conversions"), direction: Some(Capture) 
      [10:01:58.037963] INFO :snips_audio_alsa::capture: Starting ALSA capture on device "default"
      [10:01:58.058482] DEBUG:snips_audio_alsa::capture: Attempt 1
      [10:01:58.158608] DEBUG:snips_audio_alsa::capture: Attempt 2
      [10:01:58.258755] DEBUG:snips_audio_alsa::capture: Attempt 3
      [10:01:58.358945] DEBUG:snips_audio_alsa::capture: Attempt 4
      [10:01:58.459167] DEBUG:snips_audio_alsa::capture: Attempt 5
      [10:01:58.559343] DEBUG:snips_audio_alsa::capture: Attempt 6
      [10:01:58.659509] DEBUG:snips_audio_alsa::capture: Attempt 7
      [10:01:58.759631] DEBUG:snips_audio_alsa::capture: Attempt 8
      [10:01:58.859822] DEBUG:snips_audio_alsa::capture: Attempt 9
      [10:01:58.959946] DEBUG:snips_audio_alsa::capture: Attempt 10
      [10:01:59.060061] DEBUG:snips_audio_alsa::capture: Attempt 11
      [10:01:59.160263] DEBUG:snips_audio_alsa::capture: Attempt 12
      [10:01:59.260491] DEBUG:snips_audio_alsa::capture: Attempt 13
      [10:01:59.360688] DEBUG:snips_audio_alsa::capture: Attempt 14
      [10:01:59.460897] DEBUG:snips_audio_alsa::capture: Attempt 15
      [10:01:59.561033] DEBUG:snips_audio_alsa::capture: Attempt 16
      [10:01:59.661219] DEBUG:snips_audio_alsa::capture: Attempt 17
      [10:01:59.661268] DEBUG:snips_audio_alsa::capture: Alsa initialization looking good
      [10:01:59.661728] INFO :snips_broadcast_mqtt_server: Starting broadcasting audio on hermes for site "default"
      [10:01:59.661986] INFO :snips_audio_server_hermes::player: started hermes audio player thread
      [10:03:03.197031] DEBUG:snips_audio_server_hermes::player: Playing bytes ac1bf674-1a79-4592-8223-95d3fa45e70a
      [10:03:03.197826] ERROR:snips_audio_server_hermes::player: An error happened while trying to play some audio: could not play "ac1bf674-1a79-4592-8223-95d3fa45e70a"
       -> caused by: an error occured in the audio pipeline: Error("snd_pcm_hw_params_set_rate", Sys(EINVAL))
       -> caused by: ALSA function 'snd_pcm_hw_params_set_rate' failed with error 'EINVAL: Invalid argument'

I would go for other options.

Snips is dead: Sonos Announces Acquisition of Snips: Is this the end of Snips for makers?