awacke1 commited on
Commit
012a776
·
1 Parent(s): af07e65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -64,14 +64,17 @@ def main():
64
 
65
  filename = save_and_play_audio(audio_recorder)
66
  if filename is not None:
67
- transcription = transcribe_audio(filename)
 
68
 
69
- # Update the text area with new transcription
70
- updated_transcriptions = f"{previous_transcriptions}\n{transcription}"
71
- st.text_area("Transcriptions:", updated_transcriptions, height=400)
72
 
73
- # Save the new transcription to file
74
- save_transcription(transcription)
 
 
75
 
76
  if __name__ == "__main__":
77
  main()
 
64
 
65
  filename = save_and_play_audio(audio_recorder)
66
  if filename is not None:
67
+ try:
68
+ transcription = transcribe_audio(filename)
69
 
70
+ # Update the text area with new transcription
71
+ updated_transcriptions = f"{previous_transcriptions}\n{transcription}"
72
+ st.text_area("Transcriptions:", updated_transcriptions, height=400)
73
 
74
+ # Save the new transcription to file
75
+ save_transcription(transcription)
76
+ except:
77
+ st.write('Whisperer loading..')
78
 
79
  if __name__ == "__main__":
80
  main()