Python Projects & Free Books
38.1K subscribers
611 photos
93 files
307 links
Python Interview Projects & Free Courses

Admin: @Coderfun
Download Telegram
🔅 Voice Recorder in Python
pip install sounddevice


import sounddevice
from scipy.io.wavfile import write
#sample_rate
fs=44100
#Ask to enter the recording time
second = int(input("Enter the Recording Time in second: "))
print("Recording…\n")
record_voice = sounddevice.rec(int(second * fs),samplerate=fs,channels=2)
sounddevice.wait()
write("MyRecording.wav",fs,record_voice)
print("Recording is done Please check you folder to listen recording")


Join us for more -
https://t.iss.one/pythonfreebootcamp
👍3