Update audio_processor.py
Browse files- audio_processor.py +2 -1
audio_processor.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from gtts import gTTS
|
2 |
import io
|
3 |
|
|
|
4 |
def text_to_speech(text, target_lang):
|
5 |
try:
|
6 |
if not text:
|
@@ -15,5 +16,5 @@ def text_to_speech(text, target_lang):
|
|
15 |
return audio_buffer
|
16 |
return None
|
17 |
except Exception as e:
|
18 |
-
print(f"Audio error: {e}")
|
19 |
return None
|
|
|
1 |
from gtts import gTTS
|
2 |
import io
|
3 |
|
4 |
+
# Function to convert translated text to speech
|
5 |
def text_to_speech(text, target_lang):
|
6 |
try:
|
7 |
if not text:
|
|
|
16 |
return audio_buffer
|
17 |
return None
|
18 |
except Exception as e:
|
19 |
+
print(f"Audio error: {e}") # Debug print
|
20 |
return None
|