Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
39 |
-
transcript = asr_pipe("interval_audio.
|
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"
|
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",
|