I am trying to create a .wav file by recording from a USB microphone connected to my computer. I am trying to accomplish this using Python. I keep seeing the following example (or something similar) to record, but I am having trouble understanding where the audio device is specified here? If there are multiple microphones, which one would it be recording from? Thanks!
duration = 10 # seconds
myrecording = sd.rec(duration * fs, samplerate=fs, channels=2)
Paraphrasing the documentation for
sounddevice:IOW,
could do if your microphone shows up as e.g. "USB Audio Device".
You can see
devicehere in the docs forInputStream;sounddevice.rec()'s docs refer to that for the other**kwargs.