Update video2.py
Browse files
video2.py
CHANGED
|
@@ -33,11 +33,11 @@ async def generate_tts(id,lines,lang):
|
|
| 33 |
audio_path = os.path.join(AUDIO_DIR, audio_name)
|
| 34 |
if len(lang)>1:
|
| 35 |
listf = lang.split("&&&")
|
| 36 |
-
text = listf[0]
|
| 37 |
langvoice = listf[1].strip()
|
| 38 |
else:
|
| 39 |
text=lines[id]
|
| 40 |
-
communicate = edge_tts.Communicate(text=
|
| 41 |
await communicate.save(audio_path)
|
| 42 |
if os.path.exists(audio_path):
|
| 43 |
audio = MP3(audio_path)
|
|
|
|
| 33 |
audio_path = os.path.join(AUDIO_DIR, audio_name)
|
| 34 |
if len(lang)>1:
|
| 35 |
listf = lang.split("&&&")
|
| 36 |
+
text = listf[0]
|
| 37 |
langvoice = listf[1].strip()
|
| 38 |
else:
|
| 39 |
text=lines[id]
|
| 40 |
+
communicate = edge_tts.Communicate(text=lang, voice=voice, rate="+0%")
|
| 41 |
await communicate.save(audio_path)
|
| 42 |
if os.path.exists(audio_path):
|
| 43 |
audio = MP3(audio_path)
|