Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ whisper_model = whisper.load_model("large")
|
|
| 10 |
translator = pipeline("translation", model="facebook/nllb-200-distilled-600M", src_lang="ben_Beng", tgt_lang="eng_Latn")
|
| 11 |
|
| 12 |
def transcribe_audio(audio_file):
|
| 13 |
-
result = whisper_model.transcribe(audio_file
|
| 14 |
return result['segments']
|
| 15 |
|
| 16 |
def translate_segments(segments):
|
|
|
|
| 10 |
translator = pipeline("translation", model="facebook/nllb-200-distilled-600M", src_lang="ben_Beng", tgt_lang="eng_Latn")
|
| 11 |
|
| 12 |
def transcribe_audio(audio_file):
|
| 13 |
+
result = whisper_model.transcribe(audio_file, language="bn", task="transcribe")
|
| 14 |
return result['segments']
|
| 15 |
|
| 16 |
def translate_segments(segments):
|