diff options
| author | historia <historiavg@proton.me> | 2026-09-11 22:03:43 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-09-11 22:03:43 -0400 |
| commit | 1bbe59f78be9a8355bb0bee2bc8ab14ca42ac71c (patch) | |
| tree | 1fbc26726a451ea777007885614796994bc478f8 /lib/project/tests/test_config.py | |
| parent | 742093b18cd31e9d25c43f475b94c232fc28a5a7 (diff) | |
| download | producer-1bbe59f78be9a8355bb0bee2bc8ab14ca42ac71c.tar.gz | |
Add ClearVoice MossFormer2 denoiser backend and static gap trimming
Diffstat (limited to 'lib/project/tests/test_config.py')
| -rw-r--r-- | lib/project/tests/test_config.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/project/tests/test_config.py b/lib/project/tests/test_config.py index 02b9eba..8da7a7f 100644 --- a/lib/project/tests/test_config.py +++ b/lib/project/tests/test_config.py @@ -131,3 +131,17 @@ def test_shaping_filter_toggles(bypass, toggle, prefix, count): chain = filters(bypass) assert len(chain) == count assert all(item.startswith(prefix) for item in chain) + + +def test_clearvoice_and_trim_settings_parse_and_validate(): + settings = resolve(overrides={"denoiser": "clearvoice", "trim_silence": True, + "max_gap_s": 2.0, "gap_pad_s": 0.5, + "gap_threshold_db": -45.0}) + assert settings.denoiser == "clearvoice" and settings.trim_silence is True + assert settings_for(parser().parse_args(["config", "--denoiser", "clearvoice"])).denoiser == "clearvoice" + with pytest.raises(ValueError, match="gap_pad_s must be smaller than max_gap_s"): + resolve(overrides={"trim_silence": True, "max_gap_s": 1.0, "gap_pad_s": 1.0}) + with pytest.raises(ValueError, match="max_gap_s"): + resolve(overrides={"max_gap_s": 0.4}) + with pytest.raises(ValueError, match="gap_threshold_db"): + resolve(overrides={"gap_threshold_db": -19.0}) |
