import sounddevice
from scipy.io.wavfile import write

sr = 44100  # Sample rate
seconds = 5  # Audio recorded for 10 seconds


def start_rec(sr=sr, seconds=seconds):
    print("Recording...")
    record_voice = sounddevice.rec(int(seconds * sr), samplerate=sr, channels=1)
    sounddevice.wait()
    write("static/output/test_input.wav", sr, record_voice)
4ddd20848e2a6849a50bfb40540963015f35d3ed
<mask token>

<mask token>


def start_rec(sr=sr, seconds=seconds):
    print('Recording...')
    record_voice = sounddevice.rec(int(seconds * sr), samplerate=sr, channels=1
        )
    sounddevice.wait()
    write('static/output/test_input.wav', sr, record_voice)

<mask token>
sr = 44100
seconds = 5


def start_rec(sr=sr, seconds=seconds):
    print('Recording...')
    record_voice = sounddevice.rec(int(seconds * sr), samplerate=sr, channels=1
        )
    sounddevice.wait()
    write('static/output/test_input.wav', sr, record_voice)

import sounddevice
from scipy.io.wavfile import write
sr = 44100
seconds = 5


def start_rec(sr=sr, seconds=seconds):
    print('Recording...')
    record_voice = sounddevice.rec(int(seconds * sr), samplerate=sr, channels=1
        )
    sounddevice.wait()
    write('static/output/test_input.wav', sr, record_voice)

import sounddevice
from scipy.io.wavfile import write

sr = 44100  # Sample rate
seconds = 5  # Audio recorded for 10 seconds


def start_rec(sr=sr, seconds=seconds):
    print("Recording...")
    record_voice = sounddevice.rec(int(seconds * sr), samplerate=sr, channels=1)
    sounddevice.wait()
    write("static/output/test_input.wav", sr, record_voice)