46,186 questions
can i use edge tts package of python for my web application(how to create edge tts web app using edge tts) tutorial and If I am not capable why it is available for free in the internet.
TAYEB LAGHA
0
Reputation points
Hi microsoft can I use edge tts for web application demo tutorial on youtube(commercial use) using fastapi and this code
import asyncio
import edge_tts
VOICES = ['en-US-AndrewNeural','es-US-AlonsoNeural','en-GB-RyanNeural' ]
TEXT = "Hi Ladies and Gentleman"
VOICE = VOICES[0] # Choose a valid index from the VOICES list
OUTPUT_FILE = "test.mp3"
RATE = "-1%" # Decrease the speech rate by 25%
async def amain() -> None:
communicate = edge_tts.Communicate(TEXT, VOICE, rate=RATE)
await communicate.save(OUTPUT_FILE)
loop = asyncio.get_event_loop_policy().get_event_loop()
try:
loop.run_until_complete(amain())
finally:
loop.close()
Community Center Not monitored
Sign in to answer