Resolve *almost* all pylint complaints and setup pylint

This commit is contained in:
rany2
2023-01-05 07:48:40 +02:00
parent b5b7a42354
commit b68b27103f
12 changed files with 823 additions and 222 deletions

View File

@@ -10,19 +10,19 @@ import random
import edge_tts
from edge_tts import VoicesManager
TEXT = "Hoy es un buen día."
OUTPUT_FILE = "spanish.mp3"
async def main() -> None:
async def _main() -> None:
voices = await VoicesManager.create()
voice = voices.find(Gender="Male", Language="es")
# Also supports Locales
# voice = voices.find(Gender="Female", Locale="es-AR")
VOICE = random.choice(voice)["ShortName"]
TEXT = "Hoy es un buen día."
OUTPUT_FILE = "spanish.mp3"
communicate = edge_tts.Communicate(TEXT, VOICE)
communicate = edge_tts.Communicate(TEXT, random.choice(voice)["Name"])
await communicate.save(OUTPUT_FILE)
if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(main())
asyncio.get_event_loop().run_until_complete(_main())