From 66d3e61c1a87bcdce751920c4dac74083dd35e51 Mon Sep 17 00:00:00 2001 From: rany2 Date: Thu, 5 Jan 2023 02:58:24 +0200 Subject: [PATCH] Hide more items in edge_tts util's --list-voices --- src/edge_tts/util.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/edge_tts/util.py b/src/edge_tts/util.py index 638a5dc..571ff37 100644 --- a/src/edge_tts/util.py +++ b/src/edge_tts/util.py @@ -19,10 +19,17 @@ async def _print_voices(*, proxy: str) -> None: print() for key in voice.keys(): - if key in ["SuggestedCodec", "FriendlyName", "Status"]: + if key in ( + "SuggestedCodec", + "FriendlyName", + "Status", + "VoiceTag", + "Name", + "Locale", + ): continue - # print ("%s: %s" % ("Name" if key == "ShortName" else key, voice[key])) - print(f"{key}: {voice[key]}") + pretty_key_name = key if key != "ShortName" else "Name" + print(f"{pretty_key_name}: {voice[key]}") async def _run_tts(args: Any) -> None: