From 1bbe59f78be9a8355bb0bee2bc8ab14ca42ac71c Mon Sep 17 00:00:00 2001 From: historia Date: Fri, 11 Sep 2026 22:03:43 -0400 Subject: Add ClearVoice MossFormer2 denoiser backend and static gap trimming --- lib/project/tests/test_config.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/project/tests/test_config.py') 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}) -- cgit v1.2.3