Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 28 |
-
with st.spinner("🧠 Transcribing
|
| 29 |
transcriber = pipeline(
|
| 30 |
-
"automatic-speech-recognition",
|
| 31 |
model="openai/whisper-small",
|
| 32 |
-
task="
|
| 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 |
|