fix cli optional type check

This commit is contained in:
baojia tong
2023-06-23 11:39:37 -04:00
parent 6921c9139a
commit 1bb0bf7e8b

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")