🔅 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")