MioCodec 25Hz 44.1kHz v2

ProviderAratako
Categoryaudio-to-audio
Licensemit
Downloads47
Stars0

Overview

MioCodec 25Hz 44.1kHz v2 is a specialized audio-to-audio codec designed for high-fidelity signal processing and efficient compression. Operating at a 44.1kHz sample rate with a 25Hz frame rate, it targets developers building low-latency voice applications, generative audio pipelines, or custom synthesis tools. Unlike general-purpose audio models, this version focuses on maintaining spectral integrity while reducing data throughput, making it suitable for real-time streaming or as a latent space representation for downstream AI tasks. Integration is streamlined via the MIT license, allowing for flexible deployment across commercial and open-source stacks without restrictive overhead. It offers a competitive balance between reconstruction quality and computational cost compared to standard neural codecs.

Highlights

  • High-fidelity 44.1kHz sampling for professional audio quality
  • Efficient 25Hz frame rate optimizing real-time data throughput
  • Permissive MIT license for seamless commercial integration
  • Ideal for generative audio and low-latency streaming pipelines

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("Aratako/MioCodec-25Hz-44.1kHz-v2")
tokenizer = AutoTokenizer.from_pretrained("Aratako/MioCodec-25Hz-44.1kHz-v2")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download Aratako/MioCodec-25Hz-44.1kHz-v2

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download Aratako/MioCodec-25Hz-44.1kHz-v2 config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Aratako/MioCodec-25Hz-44.1kHz-v2')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/Aratako/MioCodec-25Hz-44.1kHz-v2

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Aratako/MioCodec-25Hz-44.1kHz-v2

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('Aratako/MioCodec-25Hz-44.1kHz-v2')
tokenizer = AutoTokenizer.from_pretrained('Aratako/MioCodec-25Hz-44.1kHz-v2')

Model Download

We recommend downloading the model via the ModelScope CLI or SDK.

Guidance:Before downloading, install ModelScope with:

Guidance
pip install modelscope

CLI Download

Download the full repository

Download the full repository
modelscope download --model Aratako/MioCodec-25Hz-44.1kHz-v2

Download a single file to a local folder (e.g. README.md into ./dir)

Download a single file to a local folder (e.g. README.md into ./dir)
modelscope download --model Aratako/MioCodec-25Hz-44.1kHz-v2 README.md --local_dir ./dir

See the docs for more CLI options

SDK Download

SDK Download
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('Aratako/MioCodec-25Hz-44.1kHz-v2')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://www.modelscope.cn/Aratako/MioCodec-25Hz-44.1kHz-v2.git

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/Aratako/MioCodec-25Hz-44.1kHz-v2.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook Quickstart

Install the ModelScope library

Install the ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

Load the model and run inference

Load the model and run inference
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'Aratako/MioCodec-25Hz-44.1kHz-v2')

Full Documentation

来源: HuggingFace

---
license: mit
language:

  • en

  • ja

  • nl

  • fr

  • de

  • it

  • pl

  • pt

  • es

  • ko

  • zh

tags:
  • speech

  • audio

  • tokenizer

datasets:
  • sarulab-speech/mls_sidon

  • mythicinfinity/Libriheavy-HQ

  • nvidia/hifitts-2

pipeline_tag: audio-to-audio
base_model:
  • Aratako/MioCodec-25Hz-24kHz

---

MioCodec-25Hz-44.1kHz-v2: Lightweight Neural Audio Codec for Efficient Spoken Language Modeling

![GitHub](https://github.com/Aratako/MioCodec)

MioCodec-25Hz-44.1kHz-v2 is an upsampled, high-fidelity version of the MioCodec-25Hz-24kHz model.

By integrating an UpsamplerBlock inspired by Inworld TTS-1 into the decoder, this model reconstructs 44.1 kHz audio from the standard 25 Hz token stream.

🌟 What's New in v2

This model is a fine-tuned version of MioCodec-25Hz-24kHz with the following architectural enhancements:

  • 44.1 kHz Output: Achieves higher audio fidelity compared to the base 24 kHz model.
  • UpsamplerBlock + SnakeBeta: We adopted the UpsamplerBlock architecture from Inworld TTS-1 and enhanced it by integrating SnakeBeta activations. This combination allows the decoder to effectively predict and generate high-frequency components, enabling clear 44.1 kHz reconstruction from the lower-resolution input.
  • Token Compatibility: During fine-tuning, the content branch was frozen. This means the discrete tokens generated by this model are identical to those from MioCodec-25Hz-24kHz. You can take any TTS model trained on the 24kHz tokens and simply swap the codec to this v2 model during inference to instantly upgrade the audio quality to 44.1 kHz.

📊 Model Comparison

| Model | Token Rate | Vocab Size | Bit Rate | Sample Rate | SSL Encoder | Vocoder | Parameters | Highlights |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :--- |
| MioCodec-25Hz-44.1kHz-v2 | 25 Hz | 12,800 | 341 bps | 44.1 kHz | WavLM-base+ | - (iSTFTHead) | 133M | Fast inference, good quality |
| MioCodec-25Hz-24kHz | 25 Hz | 12,800 | 341 bps | 24 kHz | WavLM-base+ | - (iSTFTHead) | 132M | Lightweight, fast inference |
| MioCodec-25Hz-44.1kHz | 25 Hz | 12,800 | 341 bps | 44.1 kHz | WavLM-base+ | MioVocoder (Jointly Tuned) | 118M (w/o vocoder) | High-quality, high sample rate |
| kanade-25hz | 25 Hz | 12,800 | 341 bps | 24 kHz | WavLM-base+ | Vocos 24kHz | 118M (w/o vocoder) | Original 25Hz model |
| kanade-12.5hz | 12.5 Hz | 12,800 | 171 bps | 24 kHz | WavLM-base+ | Vocos 24kHz | 120M (w/o vocoder) | Original 12.5Hz model |

🚀 Quick Start

Installation

bash
# Install via pip
pip install git+https://github.com/Aratako/MioCodec

Or using uv

uv add git+https://github.com/Aratako/MioCodec

Basic Inference

Basic usage for encoding and decoding audio:

python
from miocodec import MioCodecModel, load_audio
import soundfile as sf

1. Load model

model = MioCodecModel.from_pretrained("Aratako/MioCodec-25Hz-44.1kHz-v2").eval().cuda()

2. Load audio

waveform = load_audio("input.wav", sample_rate=model.config.sample_rate).cuda()

3. Encode Audio

features = model.encode(waveform)

4. Decode to Waveform (directly, no vocoder needed)

resynth = model.decode( content_token_indices=features.content_token_indices, global_embedding=features.global_embedding, )

5. Save

sf.write("output.wav", resynth.cpu().numpy(), model.config.sample_rate)

Voice Conversion (Zero-shot)

MioCodec allows you to swap speaker identities by combining the content tokens of a source with the global embedding of a reference.

python
source = load_audio("source_content.wav", sample_rate=model.config.sample_rate).cuda()
reference = load_audio("target_speaker.wav", sample_rate=model.config.sample_rate).cuda()

Perform conversion

vc_wave = model.voice_conversion(source, reference) sf.write("converted.wav", vc_wave.cpu().numpy(), model.config.sample_rate)

📜 Acknowledgements

🖊️ Citation

bibtex
@misc{miocodec-25hz-44.1khz-v2,
  author = {Chihiro Arata},
  title = {MioCodec: High-Fidelity Neural Audio Codec for Efficient Spoken Language Modeling},
  year = {2026},
  publisher = {Hugging Face},
  journal = {Hugging Face repository},
  howpublished = {\url{https://huggingface.co/Aratako/MioCodec-25Hz-44.1kHz-v2}}
}
Join our Telegram