Spaces:
Sleeping
Sleeping
Update conver.py
Browse files
conver.py
CHANGED
|
@@ -172,13 +172,13 @@ class URLToAudioConverter:
|
|
| 172 |
{"speaker": "Co-host", "text": "(Continuación del tema)"}
|
| 173 |
]
|
| 174 |
}
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
|
|
|
| 172 |
{"speaker": "Co-host", "text": "(Continuación del tema)"}
|
| 173 |
]
|
| 174 |
}
|
| 175 |
+
folder_name = await self.text_to_speech(conversation, voice_1, voice_2)
|
| 176 |
+
combined_audio = self.combine_audio_files(audio_files)
|
| 177 |
+
music_path = "musica.mp3" # Antes: "assets/musica.mp3" (solo quité "assets/")
|
| 178 |
+
tags_paths = ["tag.mp3", "tag2.mp3"] # Antes: "assets/tag.mp3" (solo quité "assets/")
|
| 179 |
+
final_audio = self.add_background_music_and_tags(combined_audio, music_path, tags_paths)
|
| 180 |
+
output_file = os.path.join(folder_name, "raw_podcast_with_music.mp3") # 👈 Se mantiene igual
|
| 181 |
+
final_audio.export(output_file, format="mp3")
|
| 182 |
+
for f in audio_files:
|
| 183 |
+
os.remove(f)
|
| 184 |
+
return text, output_file
|