Tlanextli commited on
Commit
a0291f0
1 Parent(s): 1ecdce2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,9 +14,9 @@ def transcribeFile(inputlang, audio_path : str) -> str:
14
  #transcription = asr_pipe_audio2Text_Ge(audio_path)
15
  #transcription = asr_pipe_whisper(audio_path, max_new_tokens=256, generate_kwargs={"task":"transcribe"})
16
  if inputlang == "Auto Detect":
17
- transcription = asr_pipe_whisper(audio_path, chunk_length_s=10, stride_length_s=(4, 2), generate_kwargs={"task":"transcribe"})
18
  elif inputlang == "German":
19
- transcription = asr_pipe_audio2Text_Ge(audio_path, chunk_length_s=10, stride_length_s=(4, 2))
20
  return transcription["text"]
21
 
22
  def translateAudio(audio_path):
 
14
  #transcription = asr_pipe_audio2Text_Ge(audio_path)
15
  #transcription = asr_pipe_whisper(audio_path, max_new_tokens=256, generate_kwargs={"task":"transcribe"})
16
  if inputlang == "Auto Detect":
17
+ transcription = asr_pipe_whisper(audio_path, chunk_length_s=10, stride_length_s=(4, 2), generate_kwargs={"task":"transcribe"}, batch_size=32)
18
  elif inputlang == "German":
19
+ transcription = asr_pipe_audio2Text_Ge(audio_path, chunk_length_s=10, stride_length_s=(4, 2), batch_size=32)
20
  return transcription["text"]
21
 
22
  def translateAudio(audio_path):