ScrapExplorer - pipe.py
Home / misc / plxkit Lines: 2 | Size: 520 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1import sounddevice as sd 2 3def pipe_audio(input_device, output_device, sample_rate=44100, channels=(2, 2)): 4 """Stream audio from input_device to output_device.""" 5 def audio_callback(indata, outdata, frames, time, status): 6 if status: 7 print(status) 8 outdata[:] = indata 9 10 with sd.Stream( 11 device=(input_device, output_device), 12 samplerate=sample_rate, 13 channels=channels, 14 callback=audio_callback, 15 ): 16 input("Streaming... press Enter to stop\n") 17[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.