Gregniuki commited on
Commit
23dca17
·
1 Parent(s): 0f4e6bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -145,15 +145,16 @@ async def main(
145
  temp_dir = tempfile.mkdtemp()
146
 
147
  # Create a temporary directory to store the audio files
148
- temp_dir = tempfile.mkdtemp()
149
 
150
  # Export the audio to an MP3 file in the temporary directory
151
- temp_audio_file = os.path.join(temp_dir, "generated_audio.mp3")
152
- audio.export(temp_audio_file, format="mp3")
153
 
154
  # Rename the audio file based on the text input
155
  renamed_audio_file = os.path.join(temp_dir, f"{text_input}.mp3")
156
- os.rename(temp_audio_file, renamed_audio_file)
 
157
  # Specify the path to your MP3 audio file
158
  # audio_file_path = "path/to/your/audio.mp3"
159
 
 
145
  temp_dir = tempfile.mkdtemp()
146
 
147
  # Create a temporary directory to store the audio files
148
+ #temp_dir = tempfile.mkdtemp()
149
 
150
  # Export the audio to an MP3 file in the temporary directory
151
+ # temp_audio_file = os.path.join(temp_dir, "generated_audio.mp3")
152
+
153
 
154
  # Rename the audio file based on the text input
155
  renamed_audio_file = os.path.join(temp_dir, f"{text_input}.mp3")
156
+ audio.export(renamed_audio_file, format="mp3")
157
+ # os.rename(temp_audio_file, renamed_audio_file)
158
  # Specify the path to your MP3 audio file
159
  # audio_file_path = "path/to/your/audio.mp3"
160