Mbonea commited on
Commit
fd939a8
·
1 Parent(s): fcec2f0

downloads are now concurrent

Browse files
Files changed (1) hide show
  1. App/TTS/utils/Descript.py +2 -2
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
- temp = await self.download_and_store_file(url)
367
- audio_paths.append(temp)
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