Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
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 |
-
|
|
|
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 |
|