1

I'm developing an app just for me which should act like a speaker in my Windows computer and record the data being sent to it. Here's the code so far:

import soundcard as sc
import numpy


outputLib = sc.all_speakers()

speakers = outputLib[3]   

data = speakers.record(samplerate=48000, numframes=480000)

speakers.play(data/numpy.max(data), samplerate=48000)

but I don't think this makes sense because the outputLib class doesn't have a record function (I don't find) in the soundcard library. Hopefully my questions makes sense.

Lamb Sauce
  • 81
  • 9
  • A purely userland Python application can't act as a "virtual soundcard", if that's what you're going for. – AKX Jun 29 '23 at 13:01
  • Are you saying that you want to basically scrape sound from your soundcard? If so, you will have to write the record feature. – OneMadGypsy Jun 29 '23 at 13:37
  • Yes, Essentially, I need to scrape the sound from my soundcard. Do you have any resources on how I'd go about that? – Lamb Sauce Jun 30 '23 at 02:27

0 Answers0