Python serial library usb raspberry pi12/7/2023 append ( data ) print ( "finished recording" ) stream. read ( chunk, exception_on_overflow = False ) frames. open ( format = form_1, rate = samp_rate, channels = chans, input_device_index = dev_index, input = True, frames_per_buffer = chunk ) print ( "recording" ) frames = for ii in range ( 0, int (( samp_rate / chunk ) * record_secs )): data = stream. PyAudio () #setup audio input stream stream = audio. paInt16 chans = 1 samp_rate = 44100 chunk = 4096 record_secs = 1 #record time dev_index = 2 wav_output_filename = 'test1.wav' audio = pyaudio. Import pyaudio import wave import os #The following code comes from markjay4k as referenced below form_1 = pyaudio.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |