sreepathi-ravikumar commited on
Commit
21b9651
·
verified ·
1 Parent(s): ff2dc5e

Update video2.py

Browse files
Files changed (1) hide show
  1. video2.py +2 -2
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].strip()
37
  langvoice = listf[1].strip()
38
  else:
39
  text=lines[id]
40
- communicate = edge_tts.Communicate(text=text, voice=voice, rate="+0%")
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)