Add deterministic mode for testing (same text, same audio guaranteed)

This commit is contained in:
Michael Hansen 2022-04-20 10:44:35 -04:00
commit 503126da4a
8 changed files with 38 additions and 2 deletions

View file

@ -70,6 +70,11 @@ def get_app(args: argparse.Namespace, request_queue: Queue, temp_dir: str):
Returns: WAV bytes
"""
if args.deterministic:
# Disable noise
_LOGGER.debug("Disabling noise in deterministic mode")
params.noise_scale = 0.0
params.noise_w = 0.0
_LOGGER.debug(params)