Baghdad99 commited on
Commit
99295a5
1 Parent(s): 76321d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ tts = pipeline("text-to-speech", model="Baghdad99/english_voice_tts")
13
  # Define the function to translate speech
14
  def translate_speech(audio):
15
  # Use the speech recognition pipeline to transcribe the audio
16
- transcription = pipe(audio)["transcription"]
17
 
18
  # Use the translation pipeline to translate the transcription
19
  translated_text = translator(transcription, return_tensors="pt", padding=True)
 
13
  # Define the function to translate speech
14
  def translate_speech(audio):
15
  # Use the speech recognition pipeline to transcribe the audio
16
+ transcription = pipe(audio)[0]["transcription"]
17
 
18
  # Use the translation pipeline to translate the transcription
19
  translated_text = translator(transcription, return_tensors="pt", padding=True)