diff --git a/speech-recorder.py b/speech-recorder.py deleted file mode 100644 index c4aed9e..0000000 --- a/speech-recorder.py +++ /dev/null @@ -1,49 +0,0 @@ -import wave -from pyaudio import PyAudio,paInt16 - -framerate=16000 -NUM_SAMPLES=2000 -channels=1 -sampwidth=2 -TIME=10 -def save_wave_file(filename,data): - '''save the date to the wavfile''' - wf=wave.open(filename,'wb') - wf.setnchannels(channels) - wf.setsampwidth(sampwidth) - wf.setframerate(framerate) - wf.writeframes(b"".join(data)) - wf.close() - -def my_record(): - pa=PyAudio() - stream=pa.open(format = paInt16,channels=1, - rate=framerate,input=True, - frames_per_buffer=NUM_SAMPLES) - my_buf=[] - count=0 - while count