-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PortAudioError: Error opening Stream: Invalid sample rate [PaErrorCode -9997] #40
Comments
@RXAldreezee facing same issue. can you help me with it? |
Prob you using a hw: device rather than plughw: plughw: is just the device with the auto resample and format running. create a /etc/asound.conf or ~/.asoundrc (i usually do system and wondering if the user one is right) something like this
Then use the play & cap pcms |
Hi Abhinav,
I have moved on from this project.
I have used this instead -
https://github.com/werman/noise-suppression-for-voice
Thank you and good luck in your endeavors!
…On Fri, May 6, 2022 at 10:48 AM StuartIanNaylor ***@***.***> wrote:
Prob you using a hw: device rather than plughw: plughw: is just the device
with the auto resample and format running.
create a /etc/asound.conf or ~/.asoundrc (i usually do system and
wondering if the user one is right)
something like this
#pcm default to allow auto software plughw converion
pcm.!default {
type asym
playback.pcm "play"
capture.pcm "cap"
}
#pcm is pluhw so auto software conversion can take place
#pcm hw: is direct and faster but likely will not support sampling rate
pcm.play {
type plug
slave {
pcm "plughw:1,0"
}
}
#pcm is pluhw so auto software conversion can take place
#pcm hw: is direct and faster but likely will not support sampling rate
pcm.cap {
type plug
slave {
pcm "plughw:1,0"
}
}
Then use the play & cap pcms
—
Reply to this email directly, view it on GitHub
<#40 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASN5V64IKDEXL6AYFTKZDC3VISB7XANCNFSM43SCE5KA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It works fine in Raspberry Pi 4. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm currently using a Raspberry Pi 4, I have installed the dependencies, I'm trying to make it work but I'm stuck on this error. Can you please help? Thank you.
pi@raspberrypi:~/Downloads/DTLN-master $ python3 real_time_dtln_audio.py --list-devices
0 bcm2835 HDMI 1: - (hw:0,0), ALSA (0 in, 8 out)
1 bcm2835 Headphones: - (hw:1,0), ALSA (0 in, 8 out)
2 USB PnP Sound Device: Audio (hw:2,0), ALSA (1 in, 2 out)
3 sysdefault, ALSA (0 in, 128 out)
4 lavrate, ALSA (0 in, 128 out)
5 samplerate, ALSA (0 in, 128 out)
6 speexrate, ALSA (0 in, 128 out)
7 pulse, ALSA (32 in, 32 out)
8 upmix, ALSA (0 in, 8 out)
9 vdownmix, ALSA (0 in, 6 out)
10 dmix, ALSA (0 in, 2 out)
pi@raspberrypi:~/Downloads/DTLN-master $ python3 real_time_dtln_audio.py -i 2 -o 2
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2719
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843
PortAudioError: Error opening Stream: Invalid sample rate [PaErrorCode -9997]
My USB headset with microphone is at 2 USB PnP Sound Device: Audio (hw:2,0), ALSA (1 in, 2 out)
Thank you very much!
The text was updated successfully, but these errors were encountered: