-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Hide ALSA error output #182
Comments
Hi @chrisspen, You can use the technique described in this StackOverflow answer to do what you want: with noalsaerr() as n, Microphone() as source:
... I wouldn't recommend using this (it would be better to make the ALSA configuration correct instead), but in a pinch, this should work fine. |
I also found removing the |
import sounddevice if you have to install it |
Wow, that helped. |
this is the answer. I don't know why, but it's the answer. was getting alsa errors, jack errors, all sorts of errors, all errors gone. if you're struggling on the raspi this is the answer. |
import sounddevice solved it for me as well. Thanks @Trickery710! |
Wow @Trickery710, how does importing a lib fix all these stupid errors on the raspi?! |
Using the exact same os and pi board, @OpenAyEye ! |
anybody found an answer, I'd be very interested |
I installed and imported the sounddevice library and the same output messages also stopped appearing. Just clarify that it is not an error, just messages that worry. |
Every creation of
Microphone()
orlisten()
seems to generate the output:which clutter my output and makes it difficult to read other output. Otherwise, the recognition code works flawlessly. I've tried swapping out
sys.stdout
andsys.stderr
, but this is still output, implying it's happening from a system call. Is there an easy way to suppress these errors?The text was updated successfully, but these errors were encountered: