Webui #1
@@ -31,6 +31,16 @@ def main() -> None:
|
||||
parser.add_argument("--reference", required=True, help="Reference audio path")
|
||||
parser.add_argument("--output", required=True, help="Output wav path")
|
||||
parser.add_argument("--language", default="English", help="Language tag")
|
||||
parser.add_argument(
|
||||
"--instruction", default=None,
|
||||
help='Style/delivery instruction (e.g. "Change the emotion to excited."). '
|
||||
"Undocumented MOSS-TTS field for this checkpoint - confirmed to work for "
|
||||
"emotion in testing, passed through as-is.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--seed", type=int, default=None,
|
||||
help="Random seed for reproducibility. Unset = nondeterministic.",
|
||||
)
|
||||
parser.add_argument("--audio_temperature", type=float, default=1.7)
|
||||
parser.add_argument("--audio_top_p", type=float, default=0.8)
|
||||
parser.add_argument("--audio_top_k", type=int, default=25)
|
||||
@@ -41,6 +51,11 @@ def main() -> None:
|
||||
device = "cuda" if torch.cuda.is_available() else "cpu"
|
||||
dtype = torch.bfloat16 if device == "cuda" else torch.float32
|
||||
|
||||
if args.seed is not None:
|
||||
torch.manual_seed(args.seed)
|
||||
if device == "cuda":
|
||||
torch.cuda.manual_seed_all(args.seed)
|
||||
|
||||
torch.backends.cuda.enable_cudnn_sdp(False)
|
||||
torch.backends.cuda.enable_flash_sdp(True)
|
||||
torch.backends.cuda.enable_mem_efficient_sdp(True)
|
||||
@@ -65,6 +80,7 @@ def main() -> None:
|
||||
text=args.text,
|
||||
language=args.language,
|
||||
reference=[args.reference],
|
||||
instruction=args.instruction,
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user