Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,11 +94,12 @@ def ui():
|
|
| 94 |
with container:
|
| 95 |
with st.form(key='my_form', clear_on_submit=True):
|
| 96 |
audio_file = audiorecorder("Click to record", "Recording...")
|
| 97 |
-
|
|
|
|
| 98 |
submit_button = st.form_submit_button(label='Send')
|
| 99 |
if submit_button and audio_file:
|
| 100 |
output_file_path = "./output_audio.mp3"
|
| 101 |
-
save_uploaded_file_as_mp3(audio_file,output_file_path )
|
| 102 |
hindi_input_audio,sample_rate=torchaudio.load(output_file_path)
|
| 103 |
#applying the audio recognition
|
| 104 |
hindi_transcription=parse_transcription('./output_audio.mp3')
|
|
|
|
| 94 |
with container:
|
| 95 |
with st.form(key='my_form', clear_on_submit=True):
|
| 96 |
audio_file = audiorecorder("Click to record", "Recording...")
|
| 97 |
+
wav_file = open("./output_audio.mp3", "wb")
|
| 98 |
+
wav_file.write(audio.tobytes())
|
| 99 |
submit_button = st.form_submit_button(label='Send')
|
| 100 |
if submit_button and audio_file:
|
| 101 |
output_file_path = "./output_audio.mp3"
|
| 102 |
+
# save_uploaded_file_as_mp3(audio_file,output_file_path )
|
| 103 |
hindi_input_audio,sample_rate=torchaudio.load(output_file_path)
|
| 104 |
#applying the audio recognition
|
| 105 |
hindi_transcription=parse_transcription('./output_audio.mp3')
|