diff --git a/vall_e/config.py b/vall_e/config.py index e0feb4d..b7b8e14 100755 --- a/vall_e/config.py +++ b/vall_e/config.py @@ -188,7 +188,7 @@ class Dataset: prompt_similar_p: float = 0.75 # odds of sampling for a similar prompt instead of a random prompt prompt_similar_top_k: int = 1 # top-k similar candidates to sample from prompt_similar_top_k_offset: int = 0 # offset from the top-k to sample from - prompt_inject_noise: bool = False # adds noise to the input prompt waveform to try and vary things + prompt_inject_noise_p: float = 0.0 # adds noise to the input prompt waveform to try and vary things resps_max_samples: int = 1 # number of samples to target for training resps_append_p: float = 1.0 # probability to append another sample to the training target diff --git a/vall_e/data.py b/vall_e/data.py index 5b9a395..79889bf 100755 --- a/vall_e/data.py +++ b/vall_e/data.py @@ -1337,7 +1337,7 @@ class Dataset(_Dataset): if task == "tts": proms = self.sample_prompts(spkr_name, reference=path) - if cfg.dataset.prompt_inject_noise: + if random.random() < cfg.dataset.prompt_inject_noise_p: # sample random noise noise = self.sample_noise() # extend the noise to fill the target audio