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.