Resolve *almost* all pylint complaints and setup pylint
This commit is contained in:
@@ -15,12 +15,12 @@ import asyncio
|
||||
|
||||
import edge_tts
|
||||
|
||||
TEXT = "Hello World!"
|
||||
VOICE = "en-GB-SoniaNeural"
|
||||
OUTPUT_FILE = "test.mp3"
|
||||
|
||||
async def main() -> None:
|
||||
TEXT = "Hello World!"
|
||||
VOICE = "en-GB-SoniaNeural"
|
||||
OUTPUT_FILE = "test.mp3"
|
||||
|
||||
async def _main() -> None:
|
||||
communicate = edge_tts.Communicate(TEXT, VOICE)
|
||||
with open(OUTPUT_FILE, "wb") as file:
|
||||
async for chunk in communicate.stream():
|
||||
@@ -31,4 +31,4 @@ async def main() -> None:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.get_event_loop().run_until_complete(main())
|
||||
asyncio.get_event_loop().run_until_complete(_main())
|
||||
|
||||
@@ -8,15 +8,15 @@ import asyncio
|
||||
|
||||
import edge_tts
|
||||
|
||||
TEXT = "Hello World!"
|
||||
VOICE = "en-GB-SoniaNeural"
|
||||
OUTPUT_FILE = "test.mp3"
|
||||
|
||||
async def main() -> None:
|
||||
TEXT = "Hello World!"
|
||||
VOICE = "en-GB-SoniaNeural"
|
||||
OUTPUT_FILE = "test.mp3"
|
||||
|
||||
async def _main() -> None:
|
||||
communicate = edge_tts.Communicate(TEXT, VOICE)
|
||||
await communicate.save(OUTPUT_FILE)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.get_event_loop().run_until_complete(main())
|
||||
asyncio.get_event_loop().run_until_complete(_main())
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -11,13 +11,13 @@ import asyncio
|
||||
|
||||
import edge_tts
|
||||
|
||||
TEXT = "Hello World!"
|
||||
VOICE = "en-GB-SoniaNeural"
|
||||
OUTPUT_FILE = "test.mp3"
|
||||
WEBVTT_FILE = "test.vtt"
|
||||
|
||||
async def main() -> None:
|
||||
TEXT = "Hello World!"
|
||||
VOICE = "en-GB-SoniaNeural"
|
||||
OUTPUT_FILE = "test.mp3"
|
||||
WEBVTT_FILE = "test.vtt"
|
||||
|
||||
async def _main() -> None:
|
||||
communicate = edge_tts.Communicate(TEXT, VOICE)
|
||||
submaker = edge_tts.SubMaker()
|
||||
with open(OUTPUT_FILE, "wb") as file:
|
||||
@@ -32,4 +32,4 @@ async def main() -> None:
|
||||
|
||||
|
||||
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