mgokg commited on
Commit
8b75b9d
·
verified ·
1 Parent(s): 09a8f83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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('tmp/gradio', f'output_{timestamp}.mp3')
75
  # Ensure the tmp directory exists
76
- if not os.path.exists('tmp/gradio'):
77
- os.makedirs('tmp/gradio')
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)