tbaig1605 commited on
Commit
ffc62b9
·
verified ·
1 Parent(s): ae4e336

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -24,13 +24,11 @@ if audio_file is not None:
24
 
25
  st.success("✅ Audio converted to WAV format.")
26
 
27
- # Load Whisper pipeline (small version for CPU use)
28
- with st.spinner("🧠 Transcribing with Whisper..."):
29
  transcriber = pipeline(
30
- "automatic-speech-recognition",
31
  model="openai/whisper-small",
32
- task="transcribe",
33
- return_timestamps=False
34
  )
35
  output = transcriber(wav_path, generate_kwargs={"language": "arabic"})
36
 
 
24
 
25
  st.success("✅ Audio converted to WAV format.")
26
 
27
+ # Load Whisper pipeline (small model)
28
+ with st.spinner("🧠 Transcribing..."):
29
  transcriber = pipeline(
 
30
  model="openai/whisper-small",
31
+ task="automatic-speech-recognition"
 
32
  )
33
  output = transcriber(wav_path, generate_kwargs={"language": "arabic"})
34