sounddevice.PortAudioError: Error opening RawStream: Invalid sample rate [PaErrorCode -9997] #382
Comments
Looks like a sample rate issue between the code and your hardware device. |
Is there any way to fix that? These are my devices: |
Hi. Try add "rate" in asound config, like here:
|
@SrDayne still having the same problem |
Try different speach-to-text software. For example, Snowboy. But, I'm on 98% sure, that problem in microfone settings. And when you recorded by arecord, what frequency did you use? |
i have the same issue :/ INFO:root:Connecting to embeddedassistant.googleapis.com |
Hi. First of all, what is your microfone model? Second, same problem = same solution. Try this, but I'm not sure about correct frequency:
|
I have the same problem, please give me solution this but when I write down like "googlesamples-assistant-pushtotalk --project-id friday-xxxxx --device-model-id friday-aed12-friday-xxxxxx" |
Hi. Tell me, please, your hardware model, your os and your .asoundrc config. |
|
Ensure that your microfone support 16kHz frequency of sound. If no, try to find out what frequency it supports. |
Yes, my mic support to frequency 100-16kHz and I also insert rate 16000 in .asound but still have problem. |
Problem can be also with speaker. For example, I'm using bluetooth speaker, and when it turned off, assistant gives me the same error. Show your whole error log. |
(env) pi@raspberrypi:~ $ googlesamples-assistant-pushtotalk --project-id friday-aed12 --device-model-id friday-aed12-friday-c6hnxt |
just add "rate 16000" for output like below |
sangdonyeom, I'm glad to hear that:) I think, we can close this issue? |
I'm having the same issue. I cant figure it out. I've tried everything.. Error: |
Redblock6YT, show your .audiorc config |
Same problem? Platform: Raspberry Pi 3B+ All steps up to Step 5 under the heading "Authorizing your Raspberry Pi for the Google Assistant" work smoothly. The ~/.asoundrc file allows the speaker and microphone testing outlined in the URL above to work properly.
Upon entering this line inside a python environment in the terminal (replacing
I get the following error:
I have attempted to modify my .asoundrc file by adding the 'rate 16000' bit as described throughout this thread. Not only do I get the same error when running Updated ~/.asoundrc file:
Then (not in Python environment now), I run this command: |
hco125, Hi. Looks like this is hardware issue. Show, please, your arecord -l output. |
@SrDayne
My .asoundrc: |
SrDayne, thanks! here is my output of
|
hco125, that's very starnge issue. I copied your config and tried to run it on my PI3, but had the same issue. Than I corrected your config like mine, so they looks similar. And had the same issue. I copied both to check them by online compairing and it showed no difference. I don't now what exactly cause the issue but it is definitely in your config. Try mine:
|
Thanks, sangdonyeom's way works for me.
|
i am give to same error Expression 'alsa_snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3983 |
Ubuntu works. Raspberry PI OS should install pulseaudio and reboot first. sudo apt-get install pulseaudio |
I keep getting that message everytime i try to run googlesamples-assistant-pushtotalk
And i have correctly configured ~/.asoundrc because the speaker and the microphone works when i run speaker-test, arecord and aplay.
This is the ~/.asoundrc file if you need it...
The text was updated successfully, but these errors were encountered: