on1onmangoes commited on
Commit
e42b300
1 Parent(s): 8f1972b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -4
app.py CHANGED
@@ -16,8 +16,13 @@ audio=st.file_uploader("Upload Your Audio File", type=['mp3','wav','m4a'])
16
 
17
  if audio:
18
  audio_segment= AudioSegment.from_file(audio)
19
- chunks=silence.split_on_silence(audio_segment, min_silence_len=500, silence_thresh= audio_segment.dBFS-20,keep_silence=100)
20
- for index, chunk in enumerate (chunks):
21
- chunk.export(str(index)+".wav", format="wav")
22
- print(chunk)
 
 
 
 
 
23
 
 
16
 
17
  if audio:
18
  audio_segment= AudioSegment.from_file(audio)
19
+ asr = pipeline('automatic-speech-recognition')
20
+ asr_out = asr (audio_segment)
21
+ st.json(asr_out)
22
+
23
+
24
+ # chunks=silence.split_on_silence(audio_segment, min_silence_len=500, silence_thresh= audio_segment.dBFS-20,keep_silence=100)
25
+ # for index, chunk in enumerate (chunks):
26
+ # chunk.export(str(index)+".wav", format="wav")
27
+ # print(chunk)
28