Spaces:
Runtime error
Runtime error
feat: implement SNAC codec and integrate into the codec registry
Browse filesFiles changed (7)
- app.py+130-88
- compare_codec/__init__.py+1
- compare_codec/snac_codec.pyAdded+76
- compare_codec/spectrogram.pyAdded+27
- pyproject.toml+7
- tests/test_snac_codec.pyAdded+64
- uv.lock+64-1
5 unmodified lines67891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241255 unmodified linesfrom pathlib import Pathimport gradio as grfrom compare_codec import CodecConfig, get_allMAX_DURATION_S = 30.0def _codec_choices() -> list[str]:"""Return display labels for every (codec, config) pair."""choices = []for codec in get_all().values():for cfg in codec.configs():choices.append(f"{codec.name} — {cfg.name}")return choicesdef _resolve_selection(label: str) -> tuple[str, CodecConfig, int]:"""Map a display label back to (codec_name, config, output_sample_rate)."""codec_name, cfg_name = label.split(" — ", 1)codec = get_all()[codec_name]for cfg in codec.configs():if cfg.name == cfg_name:sr = cfg.params.get("sample_rate", codec.sample_rate)return codec_name, cfg, srraise ValueError(f"Unknown config: {label}")def compare(audio_path: str | None, selected: list[str]) -> list[dict]:if audio_path is None or not selected:return []results = []for label in selected:codec_name, cfg, sr = _resolve_selection(label)codec = get_all()[codec_name]t0 = time.perf_counter()audio_out = codec.encode_decode(Path(audio_path), cfg)elapsed = time.perf_counter() - t0max_samples = int(MAX_DURATION_S * sr)if len(audio_out) > max_samples:audio_out = audio_out[:max_samples]results.append({"label": label, "audio": (sr, audio_out), "time": elapsed})return resultsdef build_ui() -> gr.Blocks:all_choices = _codec_choices()max_codecs = len(all_choices)with gr.Blocks(title="compare-codec") as demo:gr.Markdown("# compare-codec\n\n""Upload audio, select one or more codec configurations, ""and listen to the reconstructions side by side.")with gr.Row():with gr.Column(scale=1):audio_in = gr.Audio(sources=["upload", "microphone"],type="filepath",label="Input audio",)codec_select = gr.CheckboxGroup(choices=all_choices,label="Codec configurations",)run_btn = gr.Button("Compare", variant="primary")with gr.Column(scale=2):output_components: list[tuple[gr.Group, gr.Markdown, gr.Audio]] = []for i in range(max_codecs):with gr.Group(visible=False) as group:md = gr.Markdown()audio_out = gr.Audio(label=f"Result {i + 1}",type="numpy",interactive=False,)output_components.append((group, md, audio_out))def on_compare(audio_path: str | None, selected: list[str]) -> list:results = compare(audio_path, selected)updates = []for i in range(max_codecs):if i < len(results):r = results[i]updates.append(gr.update(visible=True))updates.append(gr.update(value=f"**{r['label']}** — {r['time']:.2f}s"))updates.append(gr.update(value=r["audio"], label=r["label"]))else:updates.append(gr.update(visible=False))updates.append(gr.update(value=""))updates.append(gr.update(value=None))return updatesall_outputs: list[gr.Component] = []for group, md, audio_out in output_components:all_outputs.extend([group, md, audio_out])run_btn.click(on_compare,inputs=[audio_in, codec_select],outputs=all_outputs,)return demodemo = build_ui()if __name__ == "__main__":demo.launch()5 unmodified lines67891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661675 unmodified linesfrom pathlib import Pathimport gradio as grimport numpy as npfrom compare_codec import CodecConfig, get_allfrom compare_codec.spectrogram import generate as make_spectrogramMAX_DURATION_S = 30.0def _encode_decode_one(audio_path: Path, codec_name: str, cfg: CodecConfig) -> tuple[np.ndarray, int, float]:"""Run one codec config and return (audio_array, sample_rate, elapsed_seconds)."""codec = get_all()[codec_name]sr = cfg.params.get("sample_rate", codec.sample_rate)t0 = time.perf_counter()audio_out = codec.encode_decode(audio_path, cfg)elapsed = time.perf_counter() - t0max_samples = int(MAX_DURATION_S * sr)if len(audio_out) > max_samples:audio_out = audio_out[:max_samples]return audio_out, sr, elapseddef build_ui() -> gr.Blocks:codecs = get_all()with gr.Blocks(title="compare-codec") as demo:gr.Markdown("# compare-codec")audio_in = gr.Audio(sources=["upload", "microphone"],type="filepath",label="Input audio",)tab_components: dict[str, dict] = {}with gr.Tabs():for codec_name, codec in codecs.items():configs = codec.configs()config_labels = [c.name for c in configs]with gr.Tab(label=codec_name) as tab:config_dd = gr.Dropdown(choices=config_labels,value=config_labels[0],label="Configuration",)audio_out = gr.Audio(label="Reconstructed",type="numpy",interactive=False,)stats_md = gr.Markdown(value="*Upload audio to compare.*")spec_img = gr.Image(label="Spectrogram",type="filepath",interactive=False,)tab_components[codec_name] = {"tab": tab,"config_dd": config_dd,"audio_out": audio_out,"stats_md": stats_md,"spec_img": spec_img,"configs": configs,"config_labels": config_labels,}active_tab = gr.State(value=list(codecs.keys())[0])ordered_names = list(codecs.keys())all_outputs = []for name in ordered_names:c = tab_components[name]all_outputs.extend([c["audio_out"], c["stats_md"], c["spec_img"]])def process_all(audio_path: str | None, current_tab: str, *dropdown_values):"""Generator that yields updates tab-by-tab, active tab first."""if audio_path is None:returndd_map = dict(zip(ordered_names, dropdown_values))order = [current_tab] + [n for n in ordered_names if n != current_tab]results: dict[str, tuple] = {}for name in ordered_names:results[name] = (gr.update(value=None),gr.update(value="*Processing...*"),gr.update(value=None),)for name in order:comps = tab_components[name]cfg_label = dd_map[name]cfg = next(c for c in comps["configs"] if c.name == cfg_label)audio_out, sr, elapsed = _encode_decode_one(Path(audio_path), name, cfg)spec_path = make_spectrogram(audio_out, sr)stats_text = (f"**{elapsed:.2f}s** | "f"{sr / 1000:.0f} kHz | "f"{cfg_label}")results[name] = (gr.update(value=(sr, audio_out)),gr.update(value=stats_text),gr.update(value=str(spec_path)),)flat = []for n in ordered_names:flat.extend(results[n])yield flatall_dropdowns = [tab_components[n]["config_dd"] for n in ordered_names]upload_event = audio_in.change(fn=process_all,inputs=[audio_in, active_tab] + all_dropdowns,outputs=all_outputs,)dropdown_events = []for name in ordered_names:evt = tab_components[name]["config_dd"].change(fn=process_all,inputs=[audio_in, active_tab] + all_dropdowns,outputs=all_outputs,)dropdown_events.append(evt)for codec_name, comps in tab_components.items():comps["tab"].select(fn=lambda name=codec_name: name,inputs=[],outputs=[active_tab],).then(fn=process_all,inputs=[audio_in, active_tab] + all_dropdowns,outputs=all_outputs,cancels=[upload_event] + dropdown_events,)return demodemo = build_ui()if __name__ == "__main__":demo.launch()
46 unmodified lines47484946 unmodified lines# Import codec modules so they self-register on startup.from compare_codec import dac as _dac # noqa: E402, F40146 unmodified lines4748495046 unmodified lines# Import codec modules so they self-register on startup.from compare_codec import dac as _dac # noqa: E402, F401from compare_codec import snac_codec as _snac # noqa: E402, F401
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576"""SNAC (Multi-Scale Neural Audio Codec) — wraps the snac package."""
from __future__ import annotations
from pathlib import Path
import numpy as npimport torchimport torchaudio
from compare_codec import CodecConfig, register
_MODELS = [ ("hubertsiuzdak/snac_24khz", 24_000), ("hubertsiuzdak/snac_32khz", 32_000), ("hubertsiuzdak/snac_44khz", 44_100),]
class SNACCodec: """SNAC codec with lazy model loading."""
def __init__(self) -> None: self._models: dict[str, object] = {}
@property def name(self) -> str: return "SNAC"
@property def sample_rate(self) -> int: return 24_000
def configs(self) -> list[CodecConfig]: configs = [] for model_id, sr in _MODELS: label = f"{sr // 1000}kHz" configs.append( CodecConfig( name=label, params={"model_id": model_id, "sample_rate": sr}, ) ) return configs
def _get_model(self, model_id: str) -> object: if model_id not in self._models: from snac import SNAC
model = SNAC.from_pretrained(model_id) self._models[model_id] = model return self._models[model_id]
@torch.no_grad() def encode_decode(self, audio_path: Path, config: CodecConfig) -> np.ndarray: model_id: str = config.params["model_id"] target_sr: int = config.params["sample_rate"]
model = self._get_model(model_id)
wav, sr = torchaudio.load(str(audio_path)) # Mix to mono if needed. if wav.shape[0] > 1: wav = wav.mean(dim=0, keepdim=True) # Resample if needed. if sr != target_sr: wav = torchaudio.functional.resample(wav, sr, target_sr) # SNAC expects (B, 1, T). wav = wav.unsqueeze(0)
audio_hat, _ = model(wav)
return audio_hat.squeeze(0).squeeze(0).cpu().numpy()
register(SNACCodec())123456789101112131415161718192021222324252627"""Generate mel spectrogram images from audio arrays."""
from __future__ import annotations
import tempfilefrom pathlib import Path
import librosaimport librosa.displayimport matplotlib.pyplot as pltimport numpy as np
def generate(audio: np.ndarray, sr: int) -> Path: """Render a mel spectrogram to a temporary PNG and return its path.""" fig, ax = plt.subplots(1, 1, figsize=(8, 3)) S = librosa.feature.melspectrogram(y=audio, sr=sr, n_mels=128) S_dB = librosa.power_to_db(S, ref=np.max) librosa.display.specshow(S_dB, sr=sr, x_axis="time", y_axis="mel", ax=ax) ax.set(title=None, xlabel=None, ylabel=None) ax.tick_params(labelsize=8) fig.tight_layout(pad=0.5)
path = Path(tempfile.mktemp(suffix=".png")) fig.savefig(path, dpi=100, bbox_inches="tight") plt.close(fig) return path8 unmodified lines91011121314151617181920218 unmodified lines"descript-audio-codec>=1.0.0","encodec>=0.1.1","gradio","numpy","snac>=1.2.1","torchaudio>=2.11.0","transformers>=5.5.3",][dependency-groups]dev = ["ruff>=0.15.10",]8 unmodified lines9101112131415161718192021222324252627288 unmodified lines"descript-audio-codec>=1.0.0","encodec>=0.1.1","gradio","librosa>=0.11.0","matplotlib>=3.10.8","numpy","snac>=1.2.1","torchaudio>=2.11.0","torchcodec>=0.11.0","transformers>=5.5.3",][dependency-groups]dev = ["pytest>=9.0.3","ruff>=0.15.10",][tool.pytest.ini_options]pythonpath = ["."]
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364"""Tests for the SNAC codec wrapper."""
from __future__ import annotations
from pathlib import Path
import numpy as npimport pytestimport torchimport torchaudio
@pytest.fixture()def wav_file(tmp_path: Path) -> Path: """Create a short mono WAV at 24 kHz.""" sr = 24_000 samples = torch.randn(1, sr * 2) # 2 seconds path = tmp_path / "test.wav" torchaudio.save(str(path), samples, sr) return path
def test_snac_name(): from compare_codec.snac_codec import SNACCodec
codec = SNACCodec() assert codec.name == "SNAC"
def test_snac_sample_rate(): from compare_codec.snac_codec import SNACCodec
codec = SNACCodec() assert codec.sample_rate == 24_000
def test_snac_configs_not_empty(): from compare_codec.snac_codec import SNACCodec
codec = SNACCodec() configs = codec.configs() assert len(configs) >= 3 # at least one per model variant
def test_snac_configs_have_sample_rate(): from compare_codec.snac_codec import SNACCodec
codec = SNACCodec() for cfg in codec.configs(): assert "sample_rate" in cfg.params assert "model_id" in cfg.params
def test_snac_encode_decode_returns_float32_array(wav_file: Path): from compare_codec.snac_codec import SNACCodec
codec = SNACCodec() cfg = [c for c in codec.configs() if c.params["sample_rate"] == 24_000][0] result = codec.encode_decode(wav_file, cfg)
assert isinstance(result, np.ndarray) assert result.dtype == np.float32 assert result.ndim == 1 assert len(result) > 0349 unmodified lines3503513523533543553563573583593603613623632 unmodified lines366367368369370371372373374375376377378379571 unmodified lines951952953954955956898 unmodified lines185518561857185818591860195 unmodified lines205620572058205920602061691 unmodified lines275327542755275627572758349 unmodified lines{ name = "descript-audio-codec" },{ name = "encodec" },{ name = "gradio" },{ name = "numpy" },{ name = "snac" },{ name = "torchaudio" },{ name = "transformers" },][package.dev-dependencies]dev = [{ name = "ruff" },]2 unmodified lines{ name = "descript-audio-codec", specifier = ">=1.0.0" },{ name = "encodec", specifier = ">=0.1.1" },{ name = "gradio" },{ name = "numpy" },{ name = "snac", specifier = ">=1.2.1" },{ name = "torchaudio", specifier = ">=2.11.0" },{ name = "transformers", specifier = ">=5.5.3" },][package.metadata.requires-dev]dev = [{ name = "ruff", specifier = ">=0.15.10" }][[package]]name = "contourpy"571 unmodified lines{ url = "https://files.pythonhosted.org/packages/8a/db/55a262f3606bebcae07cc14095338471ad7c0bbcaa37707e6f0ee49725b7/importlib_resources-7.1.0-py3-none-any.whl", hash = "sha256:1bd7b48b4088eddb2cd16382150bb515af0bd2c70128194392725f82ad2c96a1", size = 37232, upload-time = "2026-04-12T16:36:08.219Z" },][[package]]name = "ipython"version = "9.12.0"898 unmodified lines{ url = "https://files.pythonhosted.org/packages/75/a6/a0a304dc33b49145b21f4808d763822111e67d1c3a32b524a1baf947b6e1/platformdirs-4.9.6-py3-none-any.whl", hash = "sha256:e61adb1d5e5cb3441b4b7710bea7e4c12250ca49439228cc1021c00dcfac0917", size = 21348, upload-time = "2026-04-09T00:04:09.463Z" },][[package]]name = "pooch"version = "1.9.0"195 unmodified lines{ url = "https://files.pythonhosted.org/packages/1a/22/60cd92bd3ec00948800984410f4cf5ded5bd8e9b715729f3642efe0edb3d/pystoi-0.4.1-py2.py3-none-any.whl", hash = "sha256:e277b671663d26d35a2416c9c8010a74084e6c3970354506398051a554896939", size = 8218, upload-time = "2023-12-29T16:48:03.748Z" },][[package]]name = "python-dateutil"version = "2.9.0.post0"691 unmodified lines{ url = "https://files.pythonhosted.org/packages/93/f7/ee5da8c03f1a3c7662c6c6a119f24a4b3e646da94be56dce3201e3a6ee9b/torchaudio-2.11.0-cp314-cp314t-win_amd64.whl", hash = "sha256:88fb5e29f670a33d9bac6aabb1d2734460cf6e461bde5cdc352826035851b16d", size = 328661, upload-time = "2026-03-23T18:13:20.1Z" },][[package]]name = "tqdm"version = "4.67.3"349 unmodified lines3503513523533543553563573583593603613623633643653663672 unmodified lines370371372373374375376377378379380381382383384385386387388389571 unmodified lines961962963964965966967968969970971972973974975898 unmodified lines187418751876187718781879188018811882188318841885188618871888195 unmodified lines2084208520862087208820892090209120922093209420952096209720982099210021012102210321042105691 unmodified lines2797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821349 unmodified lines{ name = "descript-audio-codec" },{ name = "encodec" },{ name = "gradio" },{ name = "librosa" },{ name = "matplotlib" },{ name = "numpy" },{ name = "snac" },{ name = "torchaudio" },{ name = "torchcodec" },{ name = "transformers" },][package.dev-dependencies]dev = [{ name = "pytest" },{ name = "ruff" },]2 unmodified lines{ name = "descript-audio-codec", specifier = ">=1.0.0" },{ name = "encodec", specifier = ">=0.1.1" },{ name = "gradio" },{ name = "librosa", specifier = ">=0.11.0" },{ name = "matplotlib", specifier = ">=3.10.8" },{ name = "numpy" },{ name = "snac", specifier = ">=1.2.1" },{ name = "torchaudio", specifier = ">=2.11.0" },{ name = "torchcodec", specifier = ">=0.11.0" },{ name = "transformers", specifier = ">=5.5.3" },][package.metadata.requires-dev]dev = [{ name = "pytest", specifier = ">=9.0.3" },{ name = "ruff", specifier = ">=0.15.10" },][[package]]name = "contourpy"571 unmodified lines{ url = "https://files.pythonhosted.org/packages/8a/db/55a262f3606bebcae07cc14095338471ad7c0bbcaa37707e6f0ee49725b7/importlib_resources-7.1.0-py3-none-any.whl", hash = "sha256:1bd7b48b4088eddb2cd16382150bb515af0bd2c70128194392725f82ad2c96a1", size = 37232, upload-time = "2026-04-12T16:36:08.219Z" },][[package]]name = "iniconfig"version = "2.3.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }wheels = [{ url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },][[package]]name = "ipython"version = "9.12.0"898 unmodified lines{ url = "https://files.pythonhosted.org/packages/75/a6/a0a304dc33b49145b21f4808d763822111e67d1c3a32b524a1baf947b6e1/platformdirs-4.9.6-py3-none-any.whl", hash = "sha256:e61adb1d5e5cb3441b4b7710bea7e4c12250ca49439228cc1021c00dcfac0917", size = 21348, upload-time = "2026-04-09T00:04:09.463Z" },][[package]]name = "pluggy"version = "1.6.0"source = { registry = "https://pypi.org/simple" }sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }wheels = [{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },][[package]]name = "pooch"version = "1.9.0"195 unmodified lines{ url = "https://files.pythonhosted.org/packages/1a/22/60cd92bd3ec00948800984410f4cf5ded5bd8e9b715729f3642efe0edb3d/pystoi-0.4.1-py2.py3-none-any.whl", hash = "sha256:e277b671663d26d35a2416c9c8010a74084e6c3970354506398051a554896939", size = 8218, upload-time = "2023-12-29T16:48:03.748Z" },][[package]]name = "pytest"version = "9.0.3"source = { registry = "https://pypi.org/simple" }dependencies = [{ name = "colorama", marker = "sys_platform == 'win32'" },{ name = "iniconfig" },{ name = "packaging" },{ name = "pluggy" },{ name = "pygments" },]sdist = { url = "https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz", hash = "sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c", size = 1572165, upload-time = "2026-04-07T17:16:18.027Z" }wheels = [{ url = "https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl", hash = "sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9", size = 375249, upload-time = "2026-04-07T17:16:16.13Z" },][[package]]name = "python-dateutil"version = "2.9.0.post0"691 unmodified lines{ url = "https://files.pythonhosted.org/packages/93/f7/ee5da8c03f1a3c7662c6c6a119f24a4b3e646da94be56dce3201e3a6ee9b/torchaudio-2.11.0-cp314-cp314t-win_amd64.whl", hash = "sha256:88fb5e29f670a33d9bac6aabb1d2734460cf6e461bde5cdc352826035851b16d", size = 328661, upload-time = "2026-03-23T18:13:20.1Z" },][[package]]name = "torchcodec"version = "0.11.0"source = { registry = "https://pypi.org/simple" }wheels = [{ url = "https://files.pythonhosted.org/packages/72/f2/85da3abfef5443b0fd7a70706dabf54e0fb5592ed6b03b3f8bfccff06af0/torchcodec-0.11.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3e5abd61ad9de69a7008545f5c08736b66298f4e895b1f9fad01ae41bce75252", size = 4368773, upload-time = "2026-03-24T15:56:22.952Z" },{ url = "https://files.pythonhosted.org/packages/73/4c/b466aa762abf2e771cfd865bac1c03259a66c482b83978898c00810cb97f/torchcodec-0.11.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:aca62724bf7d4b5b70db60183e8bee67ba77f4f0afdb052e6d1900528b97de6e", size = 2397523, upload-time = "2026-03-24T15:56:25.026Z" },{ url = "https://files.pythonhosted.org/packages/f3/01/2488f553e8014c911652c2bf29265b73ec3753ac13ac4816b9c831ad27e2/torchcodec-0.11.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:669895505b7f0cd17bd6a71cf8bfa85190a9de1dc87f77051682c73149d58023", size = 2545573, upload-time = "2026-03-24T15:56:26.765Z" },{ url = "https://files.pythonhosted.org/packages/21/a7/e12e7cc5d69dd55e3edef7f16f46bcca5978c6262c86e51ccd3913bff92b/torchcodec-0.11.0-cp312-cp312-win_amd64.whl", hash = "sha256:8a1f023e26dddca77c1c81de83cf9201ecb363b818405557da70e4777b966697", size = 1921067, upload-time = "2026-03-24T15:56:28.417Z" },{ url = "https://files.pythonhosted.org/packages/4a/24/84c597fb17481eec5885d02cc3f95ba047f7e0411009f7c0e8087c3a52a2/torchcodec-0.11.0-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:9308e1e9c22a14f8e3b35a16ae8167eadc5939dd7d699b1cb6e38f57bfcc6563", size = 4289581, upload-time = "2026-03-24T15:56:30.112Z" },{ url = "https://files.pythonhosted.org/packages/ee/57/97f90c0e2abc8253412281bb1185375dc9b9aa9bd519d14ceeb52ecbf6ec/torchcodec-0.11.0-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:0120f91479e2845ed481ce84ad5248f70d71009fb2f9b5ea182260c5c901c804", size = 2399066, upload-time = "2026-03-24T15:56:32.016Z" },{ url = "https://files.pythonhosted.org/packages/f4/c5/e078ef510cd4ad15bb185c184b0f0fbb68c8ffe8afeed24c3d18e7acaadb/torchcodec-0.11.0-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:0e0fd9a9045271f53d78e2d1153ac88d1369808fa0df8db135941d3464080b76", size = 2548454, upload-time = "2026-03-24T15:56:33.832Z" },{ url = "https://files.pythonhosted.org/packages/00/9f/f1ecdeb6e53e9ab5d78e6cb191bd1191683e3f0c02950022cf02c939c5fc/torchcodec-0.11.0-cp313-cp313-win_amd64.whl", hash = "sha256:bda3a330a5578ccc753317f388b492ac19296d9e0e0bb50a43faff512981f995", size = 1920982, upload-time = "2026-03-24T15:56:37.022Z" },{ url = "https://files.pythonhosted.org/packages/6d/a8/2bb67ce8f849c52efdbb45a14dfed7ad378004df3b584a033b47c771b618/torchcodec-0.11.0-cp314-cp314-macosx_12_0_arm64.whl", hash = "sha256:386dffbd76ae7fcf77f463755830a0489bfecaca55b354a4e794c06acc74540e", size = 4408063, upload-time = "2026-03-24T15:56:38.875Z" },{ url = "https://files.pythonhosted.org/packages/53/cf/3aad20b6b913b6800192114c9e89d342783cfba2cd234cf5032cd175d474/torchcodec-0.11.0-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:ba874466cb5eb7be30062ce1a580d795af42b609587929af631e068693b55233", size = 2402237, upload-time = "2026-03-24T15:56:40.684Z" },{ url = "https://files.pythonhosted.org/packages/79/e7/11ed146f043658bbc0f35cc9ef9064a55401a10d41ef1b2714e6bd2763c6/torchcodec-0.11.0-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:71b4991dd45759dd1836dd0b11ce8b509a6b74487ec47f2b0e679f87e2927cba", size = 2549919, upload-time = "2026-03-24T15:56:42.197Z" },{ url = "https://files.pythonhosted.org/packages/51/e9/e5fe67d84ee1ce2bf38c10b1424d87b3719b5279afbca3316fbd439010c5/torchcodec-0.11.0-cp314-cp314-win_amd64.whl", hash = "sha256:9269c559e21d678401febe3fae59e3ea585896e9bf7993fb859bebb4468b6a1d", size = 1925004, upload-time = "2026-03-24T15:56:44.411Z" },][[package]]name = "tqdm"version = "4.67.3"
app.py+130-88
compare_codec/__init__.py+1
compare_codec/snac_codec.pyAdded+76
compare_codec/spectrogram.pyAdded+27
pyproject.toml+7
tests/test_snac_codec.pyAdded+64
uv.lock+64-1