Spaces:
Sleeping
Sleeping
u v
Browse files
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):
|