You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: whisperx/transcribe.py
+43-8Lines changed: 43 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,10 @@
1
1
importargparse
2
2
importgc
3
3
importos
4
+
importsys
4
5
importwarnings
6
+
importimportlib.metadata
7
+
importplatform
5
8
6
9
importnumpyasnp
7
10
importtorch
@@ -85,6 +88,8 @@ def cli():
85
88
parser.add_argument("--hf_token", type=str, default=None, help="Hugging Face Access Token to access PyAnnote gated models")
86
89
87
90
parser.add_argument("--print_progress", type=str2bool, default=False, help="if True, progress will be printed in transcribe() and align() methods.")
91
+
parser.add_argument("--version", "-V", action="version", version=f"%(prog)s {importlib.metadata.version('whisperx')}",help="Show whisperx version information and exit")
92
+
parser.add_argument("--python-version", "-P", action="version", version=f"Python {platform.python_version()} ({platform.python_implementation()})",help="Show python version information and exit")
88
93
# fmt: on
89
94
90
95
args=parser.parse_args().__dict__
@@ -138,7 +143,9 @@ def cli():
138
143
f"{model_name} is an English-only model but received '{args['language']}'; using English instead."
139
144
)
140
145
args["language"] ="en"
141
-
align_language=args["language"] ifargs["language"] isnotNoneelse"en"# default to loading english if not specified
0 commit comments