sounddevice provides Python functions for recording microphone input. A recording call sets the number of frames, sample rate, and channels; sounddevice.wait() lets capture finish. SciPy can save the result as a WAV file. section 7.3.3
recording = sounddevice.rec( #1
nr_frames, samplerate=sample_rate, channels=1)
sounddevice.wait() #2
See the recording call and wait step for a fixed-duration capture. section 7.3.3
A five-second voice query
At 44,100 samples per second, a five-second recording uses 220,500 frames. Saving the audio file can help diagnose silence or background noise. section 7.3.3 section 7.3.4
