downloads are now concurrent
Browse files
App/TTS/utils/Descript.py
CHANGED
|
@@ -363,8 +363,8 @@ class DescriptTTS:
|
|
| 363 |
audio_paths = []
|
| 364 |
audio_path = ""
|
| 365 |
for url in query.audio_url:
|
| 366 |
-
|
| 367 |
-
|
| 368 |
audio_path = self.concatenate_wave_files(audio_paths)
|
| 369 |
data.add_field("audio", open(audio_path, "rb"))
|
| 370 |
|
|
|
|
| 363 |
audio_paths = []
|
| 364 |
audio_path = ""
|
| 365 |
for url in query.audio_url:
|
| 366 |
+
audio_paths.append(self.download_and_store_file(url))
|
| 367 |
+
audio_paths = await asyncio.gather(*audio_paths)
|
| 368 |
audio_path = self.concatenate_wave_files(audio_paths)
|
| 369 |
data.add_field("audio", open(audio_path, "rb"))
|
| 370 |
|