spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
1.02k stars 149 forks source link

Record both microphone and desktop audio in one stream #453

Closed PraxTube closed 1 year ago

PraxTube commented 1 year ago

My goal

Record both my microphone and my desktop audio in one stream. To clarify, with desktop audio I mean the audio the gets output on my speakers, i.e. if I had music on, then the music should be recorded.

My problem

I can't seem to figure out how to record desktop audio at all. There also seems nothing to be about that topic in the docs. Is the library not meant to be able to do this (Though it seems like it should be possible #359 although it was a bug here)?

Notes

I tried using the examples to record my desktop audio, but no matter which device (which channel=x) I used it would always only record my microphone.

Any help would be greatly appreciated.

HaHeho commented 1 year ago

Short answer, no this package cannot do this. See https://github.com/spatialaudio/python-sounddevice/issues/287 or one of the many other linked issues for ways to make it potentially work with other tools, depending on your operating system.