Codec-bpe

Latest version: v1.3.1

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.3.1

**Updates to `codec_bpe.audio_to_codes`:**
- Fix incorrect framerate being written to `codec_info.json`
- New argument `--codec_info_only` to skip audio encoding and only output `codec_info.json` to the output codes path

**Updates to `codec_bpe.train_tokenizer`:**
- Allow `--max_token_codebook_ngrams` to be set to 0, which will skip tokenizer training and output a tokenizer with just the base codebook vocabulary. Setting `--max_token_codebook_ngrams` to 1 while `--num_codebooks` is also 1 has the same effect.

**Other:**
- Remove unused `--use_special_token_format` argument from all modules and functions

1.3.0

Updates to `codec_bpe.audio_to_codes` tool:
- Support batched inference via `--batch_size` argument
- Automatically attempt to infer the `--codec_type` argument value from the `--codec_model` argument
- Output `codec_info.json` file to simplify usage of downstream tools such as `codec_bpe.train_tokenizer`

1.2.0

- Added support for [FunCodec](https://funcodec.github.io/) from Alibaba DAMO Speech Lab! Use `--codec_type funcodec` when encoding audio with `codec_bpe.audio_to_codes` to encode using the FunCodec model. Model paths on the HuggingFace hub are listed [here](https://github.com/modelscope/FunCodec?tab=readme-ov-file#available-models). Thanks to indiejoseph for contributing the inference logic for FunCodec.
- Use transformers implementation for DAC to reduce dependencies
- Overhaul of `codec_bpe.audio_to_codes` utility to simplify codec selection and bandwidth arguments

1.1.2

- Fix for exclusive upper bound on `max_token_length` parameter to BpeTrainer. This parameter is set when passing the `--max_token_codebook_ngrams` argument in `codec_bpe.train_tokenizer`

1.1.1

- codec_framerate parameter should accept floats to support codecs with a non-integer framerate (e.g., Mimi, 12.5 Hz)

1.1.0

- Added support for Kyutai Lab's [Mimi codec](https://huggingface.co/kyutai/mimi), an amazing new codec with a 12.5 Hz framerate! Simply add `--use_mimi` when encoding audio with `codec_bpe.audio_to_codes` to encode using the Mimi model.
**Note:** Until Mimi is included in a stable release of HuggingFace Transformers, you need to install Transformers from source:
bash
pip install git+https://github.com/huggingface/transformers.gitmain

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.