Instructions to use hybridcodec/hybridcodec_scratch_50hz with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- speechbrain
How to use hybridcodec/hybridcodec_scratch_50hz with speechbrain:
# interface not specified in config.json
- Notebooks
- Google Colab
- Kaggle
Download hyperparams.yaml from hybridcodec/hybridcodec_scratch_50hz: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/hybridcodec/hybridcodec_scratch_50hz/resolve/main/hyperparams.yaml
- Command line
-
hf download hf://hybridcodec/hybridcodec_scratch_50hz/hyperparams.yaml
-
curl -L -o hyperparams.yaml https://huggingface.co/hybridcodec/hybridcodec_scratch_50hz/resolve/main/hyperparams.yaml
1.39 kB
| # HyperPyYAML for the WavLM/FocalCodec hybrid codec. | |
| # Checkpoint variant: scratch at 50 Hz. | |
| codec_sample_rate: 16000 | |
| codec_frequency_hz: 50 | |
| # The trained encoder and decoder are provided by the upstream FocalCodec model. | |
| focalcodec_source: lucadellalib/focalcodec | |
| focalcodec_model: focalcodec | |
| focalcodec_config: lucadellalib/focalcodec_50hz | |
| focalcodec: !apply:torch.hub.load | |
| repo_or_dir: !ref <focalcodec_source> | |
| model: !ref <focalcodec_model> | |
| config: !ref <focalcodec_config> | |
| trust_repo: True | |
| pretrained: True | |
| encoder: !new:hybridcodec.model.FocalCodecEncoder | |
| model: !ref <focalcodec.encoder> | |
| quantizer: !new:hybridcodec.model.SingleLayerResidualQuantizer | |
| input_dim: 1024 | |
| bottleneck_dim: 32 | |
| codebook_size: 8192 | |
| semantic_hidden_sizes: [1024, 512, 256] | |
| semantic_downscale_factors: [1, 1, 1] | |
| residual_hidden_sizes: [512, 256] | |
| residual_downscale_factors: [1, 1] | |
| continuous_dropout: 0.2 | |
| use_post_norm: False | |
| vocoder: !ref <focalcodec.decoder> | |
| codec: !new:hybridcodec.model.HybridCodec | |
| encoder: !ref <encoder> | |
| quantizer: !ref <quantizer> | |
| vocoder: !ref <vocoder> | |
| modules: | |
| codec: !ref <codec> | |
| # Pretrainer uses this key as the relative filename under the source repo. | |
| pretrainer: !new:speechbrain.utils.parameter_transfer.Pretrainer | |
| loadables: | |
| "weights/quantizer_scratch_50hz": !ref <quantizer> | |