[Python] How to record system audio in python

Discussão em 'Python' iniciado por Stack, Janeiro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I tried to record audio with this code:

    import sounddevice
    from scipy.io.wavfile import write
    fs = 44100
    second = 3
    file = sounddevice.rec(int(second * fs), samplerate=fs, channels=2)
    sounddevice.wait()
    write('output.wav', fs, file)


    but it only records output of mic while i want to record system media sound

    Continue reading...

Compartilhe esta Página