Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -71,10 +71,10 @@ def transcribe_audio(audio):
|
|
71 |
result_text = result # assuming result is the text response
|
72 |
# Generate a unique file name with timestamp
|
73 |
timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
74 |
-
output_file = os.path.join('
|
75 |
# Ensure the tmp directory exists
|
76 |
-
if not os.path.exists('
|
77 |
-
os.makedirs('
|
78 |
# Convert text to speech
|
79 |
tts = gTTS(text=result_text, lang='de', slow=False)
|
80 |
tts.save(output_file)
|
|
|
71 |
result_text = result # assuming result is the text response
|
72 |
# Generate a unique file name with timestamp
|
73 |
timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
74 |
+
output_file = os.path.join('./chroma', f'output_{timestamp}.mp3')
|
75 |
# Ensure the tmp directory exists
|
76 |
+
if not os.path.exists('./chroma'):
|
77 |
+
os.makedirs('./chroma')
|
78 |
# Convert text to speech
|
79 |
tts = gTTS(text=result_text, lang='de', slow=False)
|
80 |
tts.save(output_file)
|