varshamishra commited on
Commit
fe21998
·
verified ·
1 Parent(s): cea3436

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -8,7 +8,7 @@ stt_pipeline = pipeline("automatic-speech-recognition", model=model_name)
8
  def transcribe(audio_path):
9
  """Transcribe speech to text using Whisper."""
10
  if audio_path is None:
11
- return "⚠️ Please upload an audio file."
12
 
13
  try:
14
  # Pass the file path directly to the Whisper pipeline
@@ -24,13 +24,13 @@ with gr.Blocks(theme="default") as demo:
24
  gr.Markdown(
25
  """
26
  # 🎤 **Whisper Speech-to-Text**
27
- **Upload an audio file** and this tool will convert your speech into text using **AventIQ-AI Whisper Model**.
28
  Supports **MP3, WAV, FLAC** formats.
29
  """
30
  )
31
 
32
  with gr.Row():
33
- audio_input = gr.File(label="🎙️ Upload an Audio File", type="filepath") # Corrected `type`
34
 
35
  transcribed_text = gr.Textbox(label="📝 Transcription", interactive=False)
36
 
 
8
  def transcribe(audio_path):
9
  """Transcribe speech to text using Whisper."""
10
  if audio_path is None:
11
+ return "⚠️ Please upload or record an audio file."
12
 
13
  try:
14
  # Pass the file path directly to the Whisper pipeline
 
24
  gr.Markdown(
25
  """
26
  # 🎤 **Whisper Speech-to-Text**
27
+ **Upload or record an audio file** and this tool will convert your speech into text using **AventIQ-AI Whisper Model**.
28
  Supports **MP3, WAV, FLAC** formats.
29
  """
30
  )
31
 
32
  with gr.Row():
33
+ audio_input = gr.Audio(type="filepath", label="🎙️ Upload or Record Your Voice")
34
 
35
  transcribed_text = gr.Textbox(label="📝 Transcription", interactive=False)
36