Resolve *almost* all pylint complaints and setup pylint
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user