Merge pull request #370 from tongbaojia/TT_fix_cli_optional

[Fix] Fix cli optional type check
This commit is contained in:
mikeyshulman
2023-06-23 12:33:23 -04:00
committed by GitHub

View File

@@ -20,9 +20,9 @@ def cli():
parser.add_argument("--output_dir", type=str, default=".", help="directory to save the outputs")
parser.add_argument(
"--history_prompt",
type=Optional[Union[Dict, str]],
type=str,
default=None,
help="history choice for audio cloning",
help="history choice for audio cloning, be path to the .npz file.",
)
parser.add_argument(
"--text_temp",
@@ -48,7 +48,7 @@ def cli():
input_text: str = args.get("text")
output_filename: str = args.get("output_filename")
output_dir: str = args.get("output_dir")
history_prompt: Optional[Union[Dict, str]] = args.get("history_prompt")
history_prompt: str = args.get("history_prompt")
text_temp: float = args.get("text_temp")
waveform_temp: float = args.get("waveform_temp")
silent: bool = args.get("silent")