1

I was searching for a way to read the sound playing on the system. I have already found a way to record audio data from my microphone via pyaudio:

import numpy as np
import pyaudio

p = pyaudio.PyAudio()
stream = p.open(format=pyaudio.paInt16, channels=1, rate=RATE, input=True, 
frames_per_buffer=CHUNKSIZE)

soundData = np.frombuffer(data, dtype=np.int16)

My problem is: I don't want to record my microphone sounds but my system sounds (if I have any music running etc.)

Are there any possibilities to achieve this? Or do I have to grab the sound data via an external device?

Lone Lunatic
  • 805
  • 8
  • 20
  • See https://stackoverflow.com/questions/26573556/record-speakers-output-with-pyaudio – glhr Apr 05 '19 at 17:59
  • 1
    Oh thank you so much. I wonder why I never found this post, I had expected to have found something after 3 hrs of researching. It is now working, thanks! – Lone Lunatic Apr 05 '19 at 18:18

0 Answers0