Hunzla commited on
Commit
37ad5f1
1 Parent(s): 7c81e92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -11,7 +11,7 @@ diarization_pipe = Pipeline.from_pretrained("pyannote/speaker-diarization@2.1",
11
 
12
 
13
  # Load the speech-to-text model (Whisper)
14
- asr_pipe = pipeline("automatic-speech-recognition", model="SyedAunZaidi/whisper-small-hi")
15
 
16
  def transcribe_with_diarization(audio_path):
17
  # Get speaker segments using the diarization model
@@ -51,9 +51,12 @@ def transcribe_with_diarization(audio_path):
51
 
52
  iface = gr.Interface(
53
  fn=transcribe_with_diarization,
54
- inputs=gr.Audio(source="microphone", type="filepath", filetype="wav"),
 
 
 
55
  outputs="text",
56
- title="Whisper Large Hindi with Speaker Diarization",
57
  description="Real-time demo for Hindi speech recognition using a fine-tuned Whisper large model with speaker diarization.",
58
  )
59
 
 
11
 
12
 
13
  # Load the speech-to-text model (Whisper)
14
+ asr_pipe = pipeline("automatic-speech-recognition", model="openai/whisper-tiny")
15
 
16
  def transcribe_with_diarization(audio_path):
17
  # Get speaker segments using the diarization model
 
51
 
52
  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",
60
  description="Real-time demo for Hindi speech recognition using a fine-tuned Whisper large model with speaker diarization.",
61
  )
62