|
@@ -15,16 +15,16 @@ def main():
|
|
|
parser = argparse.ArgumentParser(
|
|
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter
|
|
|
)
|
|
|
- parser.add_argument(
|
|
|
- "--audio_channel", default="0", type=int, help="audio channel index to use"
|
|
|
- )
|
|
|
- parser.add_argument(
|
|
|
- "--sample_interval",
|
|
|
- type=str2timeinterval,
|
|
|
- default=None,
|
|
|
- help="generate subtitles for a specific \
|
|
|
- fragment of the video (e.g. 01:02:05-01:03:45)",
|
|
|
- )
|
|
|
+ # parser.add_argument(
|
|
|
+ # "--audio_channel", default="0", type=int, help="audio channel index to use"
|
|
|
+ # )
|
|
|
+ # parser.add_argument(
|
|
|
+ # "--sample_interval",
|
|
|
+ # type=str2timeinterval,
|
|
|
+ # default=None,
|
|
|
+ # help="generate subtitles for a specific \
|
|
|
+ # fragment of the video (e.g. 01:02:05-01:03:45)",
|
|
|
+ # )
|
|
|
parser.add_argument(
|
|
|
"--model",
|
|
|
default="small",
|
|
@@ -38,46 +38,46 @@ def main():
|
|
|
choices=["cpu", "cuda", "auto"],
|
|
|
help='Device to use for computation ("cpu", "cuda", "auto")',
|
|
|
)
|
|
|
+ # parser.add_argument(
|
|
|
+ # "--compute_type",
|
|
|
+ # type=str,
|
|
|
+ # default="default",
|
|
|
+ # choices=[
|
|
|
+ # "int8",
|
|
|
+ # "int8_float32",
|
|
|
+ # "int8_float16",
|
|
|
+ # "int8_bfloat16",
|
|
|
+ # "int16",
|
|
|
+ # "float16",
|
|
|
+ # "bfloat16",
|
|
|
+ # "float32",
|
|
|
+ # ],
|
|
|
+ # help="Type to use for computation. \
|
|
|
+ # See https://opennmt.net/CTranslate2/quantization.html.",
|
|
|
+ # )
|
|
|
+ # parser.add_argument(
|
|
|
+ # "--beam_size",
|
|
|
+ # type=int,
|
|
|
+ # default=5,
|
|
|
+ # help="model parameter, tweak to increase accuracy",
|
|
|
+ # )
|
|
|
+ # parser.add_argument(
|
|
|
+ # "--no_speech_threshold",
|
|
|
+ # type=float,
|
|
|
+ # default=0.6,
|
|
|
+ # help="model parameter, tweak to increase accuracy",
|
|
|
+ # )
|
|
|
+ # parser.add_argument(
|
|
|
+ # "--condition_on_previous_text",
|
|
|
+ # type=str2bool,
|
|
|
+ # default=True,
|
|
|
+ # help="model parameter, tweak to increase accuracy",
|
|
|
+ # )
|
|
|
parser.add_argument(
|
|
|
- "--compute_type",
|
|
|
+ "--show",
|
|
|
type=str,
|
|
|
- default="default",
|
|
|
- choices=[
|
|
|
- "int8",
|
|
|
- "int8_float32",
|
|
|
- "int8_float16",
|
|
|
- "int8_bfloat16",
|
|
|
- "int16",
|
|
|
- "float16",
|
|
|
- "bfloat16",
|
|
|
- "float32",
|
|
|
- ],
|
|
|
- help="Type to use for computation. \
|
|
|
- See https://opennmt.net/CTranslate2/quantization.html.",
|
|
|
- )
|
|
|
- parser.add_argument(
|
|
|
- "--beam_size",
|
|
|
- type=int,
|
|
|
- default=5,
|
|
|
- help="model parameter, tweak to increase accuracy",
|
|
|
- )
|
|
|
- parser.add_argument(
|
|
|
- "--no_speech_threshold",
|
|
|
- type=float,
|
|
|
- default=0.6,
|
|
|
- help="model parameter, tweak to increase accuracy",
|
|
|
- )
|
|
|
- parser.add_argument(
|
|
|
- "--condition_on_previous_text",
|
|
|
- type=str2bool,
|
|
|
- default=True,
|
|
|
- help="model parameter, tweak to increase accuracy",
|
|
|
- )
|
|
|
- parser.add_argument(
|
|
|
- "--task",
|
|
|
- type=str,
|
|
|
- default="transcribe",
|
|
|
- choices=["transcribe", "translate"],
|
|
|
+ default=None,
|
|
|
+ #choices=["transcribe", "translate"],
|
|
|
help="whether to perform X->X speech recognition ('transcribe') \
|
|
|
or X->English translation ('translate')",
|
|
|
)
|