Baghdad99 commited on
Commit
3431153
1 Parent(s): f0d7e02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -13,8 +13,11 @@ translator = pipeline("text2text-generation", model="Baghdad99/saad-hausa-text-t
13
  tts = pipeline("text-to-speech", model="Baghdad99/english_voice_tts")
14
 
15
  # Define the function to translate speech
16
- def translate_speech(audio_data):
17
- print(f"Type of audio: {type(audio_data)}, Value of audio: {audio_data}") # Debug line
 
 
 
18
 
19
  # Use the speech recognition pipeline to transcribe the audio
20
  output = pipe(audio_data)
 
13
  tts = pipeline("text-to-speech", model="Baghdad99/english_voice_tts")
14
 
15
  # Define the function to translate speech
16
+ def translate_speech(audio_data_tuple):
17
+ print(f"Type of audio: {type(audio_data_tuple)}, Value of audio: {audio_data_tuple}") # Debug line
18
+
19
+ # Extract the audio data from the tuple
20
+ sample_rate, audio_data = audio_data_tuple
21
 
22
  # Use the speech recognition pipeline to transcribe the audio
23
  output = pipe(audio_data)