Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ import numpy as np
|
|
| 25 |
|
| 26 |
# ✅ Whisper ASR
|
| 27 |
print("Loading Whisper...")
|
| 28 |
-
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-
|
| 29 |
|
| 30 |
# ✅ Accent model
|
| 31 |
print("Loading Accent Classifier (ylacombe)...")
|
|
@@ -68,7 +68,7 @@ def trim_silence(input_audio="audio.wav", output_audio="trimmed.wav"):
|
|
| 68 |
# ✅ Transcription
|
| 69 |
def transcribe_audio(audio_path):
|
| 70 |
print("📝 Transcribing...")
|
| 71 |
-
result = transcriber(audio_path, return_timestamps=True)
|
| 72 |
return result["text"]
|
| 73 |
|
| 74 |
# ✅ Real accent classification
|
|
|
|
| 25 |
|
| 26 |
# ✅ Whisper ASR
|
| 27 |
print("Loading Whisper...")
|
| 28 |
+
transcriber = pipeline("automatic-speech-recognition", model="openai/whisper-tiny")
|
| 29 |
|
| 30 |
# ✅ Accent model
|
| 31 |
print("Loading Accent Classifier (ylacombe)...")
|
|
|
|
| 68 |
# ✅ Transcription
|
| 69 |
def transcribe_audio(audio_path):
|
| 70 |
print("📝 Transcribing...")
|
| 71 |
+
result = transcriber(audio_path, return_timestamps=True, language="en")
|
| 72 |
return result["text"]
|
| 73 |
|
| 74 |
# ✅ Real accent classification
|