Skip to content

Commit 8e8936b

Browse files
committed
Add --version to print version of edge-tts
Fixes: #423 Signed-off-by: rany <[email protected]>
1 parent 80544f7 commit 8e8936b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/edge_tts/util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from . import Communicate, SubMaker, list_voices
1111
from .constants import DEFAULT_VOICE
1212
from .data_classes import UtilArgs
13+
from .version import __version__
1314

1415

1516
async def _print_voices(*, proxy: Optional[str]) -> None:
@@ -115,6 +116,9 @@ async def amain() -> None:
115116
help="send subtitle output to provided file instead of stderr",
116117
)
117118
parser.add_argument("--proxy", help="use a proxy for TTS and voice list.")
119+
parser.add_argument(
120+
"--version", action="version", version=f"edge-tts {__version__}"
121+
)
118122
args = parser.parse_args(namespace=UtilArgs())
119123

120124
if args.list_voices:

0 commit comments

Comments
 (0)