Tlanextli commited on
Commit
ad7b84d
·
1 Parent(s): ff8667c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -10,7 +10,8 @@ asr_pipe_audio2Text_Ge = pipeline(task="automatic-speech-recognition", model="jo
10
  asr_pipe_whisper = pipeline(task="automatic-speech-recognition", model="openai/whisper-base", device=device)
11
 
12
  def transcribeFile(audio_path : str) -> str:
13
- transcription = asr_pipe_audio2Text_Ge(audio_path)
 
14
  return transcription["text"]
15
 
16
  def translateAudio(audio_path):
 
10
  asr_pipe_whisper = pipeline(task="automatic-speech-recognition", model="openai/whisper-base", device=device)
11
 
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):