I am working on a genre identification project and trying to utilize sounddevice to input the audio. I have attempted using sample code from their website as well as stack overflow but am unable to get the codes to run without finishing with exit code 0. I've seen where people have said this is a device identification issue but even with declaring the input/output im am still not recording any audio. Here is the code below
import sounddevice as sd
from scipy.io.wavfile import write
sd.default.device = 1,3;
fs = 44100 #sample rate
duration = 5
myrecording = sd.rec(int(duration*fs), samplerate=fs, channels=2)
sd.wait()
write('output.wav,fs myrecording)