Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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(
|
17 |
-
print(f"Type of audio: {type(
|
|
|
|
|
|
|
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)
|