Instructions to use TuKoResearch/WavCochCausalV64k-20ms-babyview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TuKoResearch/WavCochCausalV64k-20ms-babyview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="TuKoResearch/WavCochCausalV64k-20ms-babyview", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TuKoResearch/WavCochCausalV64k-20ms-babyview", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| tags: | |
| - audio | |
| - wavcoch | |
| - tokenizer | |
| - neural-codec | |
| # WavCochCausalV64k-20ms-babyview | |
| WavCoch causal **tokenizer** (8192-vocab FSQ) trained on the `bad` + `bvd` corpora. Quantizes | |
| 16 kHz audio to FSQ code indices and decodes codes back to a cochleagram. This is the tokenizer | |
| only — it does **not** render waveforms. Its codebook is distinct from | |
| `TuKoResearch/WavCochCausalV8192`, so codes are **not** interchangeable. | |
| - Trained checkpoint: `model_best.pt` (step 199000) | |
| ```python | |
| from transformers import AutoModel | |
| import torch, torchaudio | |
| m = AutoModel.from_pretrained("TuKoResearch/WavCochCausalV64k-20ms-babyview", trust_remote_code=True).eval() | |
| wav, sr = torchaudio.load("clip.wav") # resample to 16 kHz first if needed | |
| codes = m.quantize(wav.unsqueeze(0)) # [1, N] FSQ indices | |
| coch = m.decode(codes) # [1, T, out_channels] cochleagram | |
| ``` | |