pyaudio_portaudio icon indicating copy to clipboard operation
pyaudio_portaudio copied to clipboard

Speaker output looping back into EVERY input device's left audio channel when using Stereo Mix

Open CaptainXLAB opened this issue 4 years ago • 1 comments

I'm using this with Python3.7 (used the .msi installer) and after the audio stream goes on for a while (as_loopback = true), speaker output starts inputting itself into microphone's left channel and it stays that way until I restart my system.

The script is using system audio output as input to do frequency cutoffs (scipy butterworth), some analysis and write results onto a file. Script has nothing to do with microphone. Only device used is Speakers with (as_loopback=true) parameter.

Signing out and back in again, stopping the python script, unplugging and plugging mic back in, nothing else helps. It's quite annoying since I use my mic for meetings and all, and all speaker output can be heard in left channel of my mic. At times I'm doing rendering/encoding in background that takes a few hours each time and restarting over and over isn't a good solution.

Happens consistently, every time I run the script longer than a few minutes. Fixes consistently when I restart.

CaptainXLAB avatar Sep 12 '20 20:09 CaptainXLAB

Update: This issue happens specifically when using "Stereo Mix" as the input device on Win64

To reproduce: Start an audio stream and just print audio values (using np.linalg.norm), wait for 5-10 minutes. The audio levels will be high even when no audio is playing through speakers, in every input device that is enabled. That also includes devices that only have a physical wire plugged in but with no actual device attached.

Even after killing the script, Stereo Mix and EVERY INPUT DEVICE's audio levels stay the same.

Working fine with as_loopback=true when using with Speakers as the input device.

CaptainXLAB avatar Nov 02 '20 18:11 CaptainXLAB