removed concatination for none wav files in transcripts
Browse files
App/TTS/utils/Descript.py
CHANGED
|
@@ -389,7 +389,10 @@ class DescriptTTS:
|
|
| 389 |
for url in query.audio_url:
|
| 390 |
audio_paths.append(self.download_and_store_file(url, query.file_extenstion))
|
| 391 |
audio_paths = await asyncio.gather(*audio_paths)
|
| 392 |
-
|
|
|
|
|
|
|
|
|
|
| 393 |
data.add_field("audio", open(audio_path, "rb"))
|
| 394 |
|
| 395 |
data.add_field("text", query.text)
|
|
|
|
| 389 |
for url in query.audio_url:
|
| 390 |
audio_paths.append(self.download_and_store_file(url, query.file_extenstion))
|
| 391 |
audio_paths = await asyncio.gather(*audio_paths)
|
| 392 |
+
if query.file_extenstion == ".wav":
|
| 393 |
+
audio_path = self.concatenate_wave_files(audio_paths)
|
| 394 |
+
else:
|
| 395 |
+
audio_path = audio_paths[0]
|
| 396 |
data.add_field("audio", open(audio_path, "rb"))
|
| 397 |
|
| 398 |
data.add_field("text", query.text)
|