Update edge_tts to v6.1.3

* Sort voices in util's --list-voices
* Disable overlapping subtitles by default
* Try to fix subtitles for many hour long TTS generation
* Match Microsoft Edge connection behavior more
* Bump edge_tts version
This commit is contained in:
rany2
2023-01-25 18:29:40 +02:00
parent 85eef7d918
commit 58307ded26
6 changed files with 56 additions and 26 deletions

View File

@@ -14,7 +14,9 @@ from edge_tts import Communicate, SubMaker, list_voices
async def _print_voices(*, proxy: str) -> None:
"""Print all available voices."""
for idx, voice in enumerate(await list_voices(proxy=proxy)):
voices = await list_voices(proxy=proxy)
voices = sorted(voices, key=lambda voice: voice["ShortName"]) # type: ignore
for idx, voice in enumerate(voices):
if idx != 0:
print()
@@ -82,8 +84,8 @@ async def _async_main() -> None:
parser.add_argument(
"-O",
"--overlapping",
help="overlapping subtitles in seconds",
default=1,
help="overlapping subtitles in seconds. Default: 0.",
default=0,
type=float,
)
parser.add_argument(