Hunzla commited on
Commit
fa31f81
1 Parent(s): 2ee0f99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,8 +35,8 @@ def transcribe_with_diarization(audio_path):
35
  print(waveform)
36
  interval_audio = waveform[:,start_sample:end_sample]
37
  # Export the interval audio as a temporary WAV file
38
- torchaudio.save("interval_audio.wav", interval_audio,sample_rate)
39
- transcript = asr_pipe("interval_audio.wav")
40
  print(transcript)
41
  start_time = segment.start
42
  end_time = segment.end
@@ -53,7 +53,7 @@ iface = gr.Interface(
53
  fn=transcribe_with_diarization,
54
  inputs=[
55
  gr.File(label="Audio File"),
56
- gr.Audio(source="microphone", type="filepath", filetype="wav")
57
  ],
58
  outputs="text",
59
  title="Whisper small Hindi with Speaker Diarization",
 
35
  print(waveform)
36
  interval_audio = waveform[:,start_sample:end_sample]
37
  # Export the interval audio as a temporary WAV file
38
+ torchaudio.save("interval_audio.mp3", interval_audio,sample_rate)
39
+ transcript = asr_pipe("interval_audio.mp3")
40
  print(transcript)
41
  start_time = segment.start
42
  end_time = segment.end
 
53
  fn=transcribe_with_diarization,
54
  inputs=[
55
  gr.File(label="Audio File"),
56
+ gr.Audio(source="microphone", type="filepath")
57
  ],
58
  outputs="text",
59
  title="Whisper small Hindi with Speaker Diarization",