Open yujie-tao opened 1 year ago
Can you paste the error you get? If it’s just one audio stream you shouldn’t be running into bus issues. Maybe the channels and samples are transposed in streaming and so the algorithm thinks there’s 16k channels
Thanks for the response!
In the terminal, the only error message I got was [1] 57294 bus error python3 stream-noise-cancel.py
I also got more detail reports here after the error:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Python [57342]
Path: /opt/homebrew/*/Python.framework/Versions/3.9/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 3.9.13 (3.9.13)
Code Type: ARM-64 (Native)
Parent Process: zsh [35530]
Responsible: iTerm2 [620]
User ID: 501
Date/Time: 2023-07-26 14:50:44.0138 -0600
OS Version: macOS 12.5 (21G72)
Report Version: 12
Time Awake Since Boot: 260000 seconds
Time Since Wake: 3428 seconds
System Integrity Protection: enabled
Crashed Thread: 20 com.apple.audio.IOThread.client
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000001701e3ff8
Exception Codes: 0x0000000000000002, 0x00000001701e3ff8
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 10 Bus error: 10
Terminating Process: exc handler [57342]
Also, I found it seem to be a Mac issue? I run the same code on a Windows laptop and it works.
Hm... do you get the same error when you remove noisereduce entirely from the callback? If so you would want to cross post this to pyaudio
I don't get this error when moving noisereduce outside of the callback function.
When you say moving noisereduce outside of the callback function, do you mean, (1) running noisereduce independently outside of the callback function or (2) running the callback function independently of noisereduce (e.g replacing noisereduce with an identity function)
On Wed, Jul 26, 2023 at 18:43 Yujie Tao @.***> wrote:
I don't get this error when moving noisereduce outside of the callback function.
— Reply to this email directly, view it on GitHub https://github.com/timsainb/noisereduce/issues/87#issuecomment-1652637581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJYKBX72FDMJOL7LK222QLXSGMQZANCNFSM6AAAAAA2VBEKNI . You are receiving this because you commented.Message ID: @.***>
-- Tim Sainburg https://timsainburg.com/ Postdoctoral Fellow Harvard Medical School 814.574.7780, @.***
Sorry about the confusion!
In both cases you mentioned: (1) running noisereduce independently outside of the callback function
(2) running the callback function without noisereduce in the code at all
It doesn't run into bus errors.
Ok, this suggests that this is an issue with the streaming library and not noisereduce, i recommend crossposting there
On Wed, Jul 26, 2023 at 19:37 Yujie Tao @.***> wrote:
Sorry about the confusion!
In both cases you mentioned: (1) running noisereduce independently outside of the callback function
(2) running the callback function without noisereduce in the code at all
It doesn't run into bus errors.
— Reply to this email directly, view it on GitHub https://github.com/timsainb/noisereduce/issues/87#issuecomment-1652686270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJYKBTMBGQJHLKYNDYYNS3XSGS43ANCNFSM6AAAAAA2VBEKNI . You are receiving this because you commented.Message ID: @.***>
-- Tim Sainburg https://timsainburg.com/ Postdoctoral Fellow Harvard Medical School 814.574.7780, @.***
Hello,
I've run into same issue, but using sounddevice library instead of pyaudio. I guess there's some conflict with portaudio because both libraries provide bindings for it.
My environment and error are equal to the ones mentioned by Yujie.
Hi
I hope to do real-time de-noising of microphone input, and when running the reduce_noise function (v2 and v3), I am experiencing bus error (on the Mac M1 system). Do we have any pointers on why this is happening?
The function works smoothly when processing a local file or moving the function outside of the callback function.