Skip to content

Instantly share code, notes, and snippets.

Created Oct 31, 2021
What would you like to do?
import sounddevice
from import write
def voice_recorder(seconds, file):
print("Recording Started...")
recording = sounddevice.rec((seconds * 44100), samplerate= 44100, channels=2)
write(file, 44100, recording)
print("Recording Finished")
voice_recorder(10, "record.wav")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment