mlokendra commited on
Commit
95937f9
·
verified ·
1 Parent(s): 53d1828
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -109,8 +109,10 @@ def generate_podcast_script(section_name, section_text):
109
  response = generator(messages, max_new_tokens=300, do_sample=True, temperature=0.7)
110
  return response[0]["generated_text"]
111
 
112
- async def generate_voice_line(text, voice, filename):
113
  communicate = edge_tts.Communicate(text, voice)
 
 
114
  await communicate.save(filename)
115
 
116
  async def tts_edge_line_by_line(script):
 
109
  response = generator(messages, max_new_tokens=300, do_sample=True, temperature=0.7)
110
  return response[0]["generated_text"]
111
 
112
+ async def generate_voice_line(text, voice, filename, rate="+0%", pitch="+0Hz"):
113
  communicate = edge_tts.Communicate(text, voice)
114
+ communicate.rate = rate
115
+ communicate.pitch = pitch
116
  await communicate.save(filename)
117
 
118
  async def tts_edge_line_by_line(script):