Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
304 B
2
Indexable
Never
import sounddevice
import scipy.io.wavfile import write
fps = 44100
duration = 5 
print('Recording...')
recording = sounddevice.rec(int(duration*fps),samplerate = fps , channels = 2)
sounddevice.wait()
print('Done!')
write("Output.wav" , fps, recording)     # for saving our recording in wav file