MCPcopy
hub / github.com/descriptinc/descript-audio-codec / test_reconstruction

Function test_reconstruction

tests/test_cli.py:34–56  ·  view source on GitHub ↗
(model_type)

Source from the content-addressed store, hash-verified

32
33@pytest.mark.parametrize("model_type", ["44khz", "24khz", "16khz"])
34def test_reconstruction(model_type):
35 # Test encoding
36 input_dir = Path(__file__).parent / "assets" / "input"
37 output_dir = input_dir.parent / model_type / "encoded_output"
38 args = {
39 "input": str(input_dir),
40 "output": str(output_dir),
41 "device": "cuda" if torch.cuda.is_available() else "cpu",
42 "model_type": model_type,
43 }
44 with argbind.scope(args):
45 run("encode")
46
47 # Test decoding
48 input_dir = output_dir
49 output_dir = input_dir.parent / model_type / "decoded_output"
50 args = {
51 "input": str(input_dir),
52 "output": str(output_dir),
53 "model_type": model_type,
54 }
55 with argbind.scope(args):
56 run("decode")
57
58
59def test_compression():

Callers

nothing calls this directly

Calls 1

runFunction · 0.90

Tested by

no test coverage detected