I am getting the following error when I run google-assistant-demo, but arecord
works fine with ALSA
capture file
type:
error:
(env)pi:~$ google-assistant-demo
ALSA lib pcm.c:7918:(snd_pcm_set_params) Sample format not available for CAPTURE: Invalid argument
[3329:3347:ERROR:audio_input_processor.cc(755)] Input error
ON_MUTED_CHANGED:
{u'is_muted': False}
ON_START_FINISHED
ON_ASSISTANT_ERROR:
{u'is_fatal': True}
[3329:3348:ERROR:audio_input_processor.cc(755)] Input error
ON_ASSISTANT_ERROR:
{u'is_fatal': True}
asoundrc config:
pcm.!default
{
type asym
playback.pcm {
type hw
card 0
device 0
}
capture.pcm {
type file
file "/tmp/matrix_micarray_channel_8"
infile "/tmp/matrix_micarray_channel_8"
format "raw"
slave {
pcm dummy
}
}
}
The next lines works fine:
arecord --format=S16_LE --duration=5 --rate=16k --file-type=raw out.raw
aplay --format=S16_LE --rate=16k out.raw
Copy asoundrc to root as well. Worked in my case. Good luck.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.