Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ asr_pipe_whisper = pipeline(task="automatic-speech-recognition", model="openai/w
|
|
12 |
def transcribeFile(audio_path : str) -> str:
|
13 |
#transcription = asr_pipe_audio2Text_Ge(audio_path)
|
14 |
transcription = asr_pipe_whisper(audio_path, max_new_tokens=256, generate_kwargs={"task":"transcribe"})
|
15 |
-
|
16 |
|
17 |
def translateAudio(audio_path):
|
18 |
translationOutput = asr_pipe_whisper(audio_path, max_new_tokens=256, generate_kwargs={"task":"translate"})
|
|
|
12 |
def transcribeFile(audio_path : str) -> str:
|
13 |
#transcription = asr_pipe_audio2Text_Ge(audio_path)
|
14 |
transcription = asr_pipe_whisper(audio_path, max_new_tokens=256, generate_kwargs={"task":"transcribe"})
|
15 |
+
return transcription["text"]
|
16 |
|
17 |
def translateAudio(audio_path):
|
18 |
translationOutput = asr_pipe_whisper(audio_path, max_new_tokens=256, generate_kwargs={"task":"translate"})
|