{"library":"snac","title":"SNAC","type":"library","description":"Multi-Scale Neural Audio Codec for audio compression, supporting 24 kHz, 32 kHz, and 44 kHz sampling rates. This is a PyTorch-based library for encoding audio into discrete codes (suitable for language modeling) and decoding back to waveform. Current version 1.2.1 has a stable API with `encode` and `decode` methods.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install snac"],"cli":{"name":"snac","version":""}},"imports":["from snac import SNAC"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/hubertsiuzdak/snac","docs":null,"changelog":null,"pypi":"https://pypi.org/project/snac/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import torch\nfrom snac import SNAC\n\nmodel = SNAC.from_pretrained(\"hubertsiuzdak/snac_24khz\")\naudio = torch.randn(1, 1, 24000)  # 1 second of 24 kHz audio\ncodes = model.encode(audio)\nprint(\"Codes shape:\", codes.shape)\nreconstructed = model.decode(codes)\nprint(\"Audio shape:\", reconstructed.shape)","lang":"python","description":"Load a pretrained model, encode audio to discrete codes, and decode back to audio.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}