VibeVoice CoreAI
Collection
4 items โข Updated
How to use gafiatulin/vibevoice-0.5b-coreai with VibeVoice:
import torch, soundfile as sf, librosa, numpy as np
from vibevoice.processor.vibevoice_processor import VibeVoiceProcessor
from vibevoice.modular.modeling_vibevoice_inference import VibeVoiceForConditionalGenerationInference
# Load voice sample (should be 24kHz mono)
voice, sr = sf.read("path/to/voice_sample.wav")
if voice.ndim > 1: voice = voice.mean(axis=1)
if sr != 24000: voice = librosa.resample(voice, sr, 24000)
processor = VibeVoiceProcessor.from_pretrained("gafiatulin/vibevoice-0.5b-coreai")
model = VibeVoiceForConditionalGenerationInference.from_pretrained(
"gafiatulin/vibevoice-0.5b-coreai", torch_dtype=torch.bfloat16
).to("cuda").eval()
model.set_ddpm_inference_steps(5)
inputs = processor(text=["Speaker 0: Hello!\nSpeaker 1: Hi there!"],
voice_samples=[[voice]], return_tensors="pt")
audio = model.generate(**inputs, cfg_scale=1.3,
tokenizer=processor.tokenizer).speech_outputs[0]
sf.write("output.wav", audio.cpu().numpy().squeeze(), 24000)Real-time streaming text-to-speech, 0.5B Qwen2 backbone.
Source & export pipeline: github.com/gafiatulin/vibevoice-coreai
On-device performance (M4 Max, Core AI): 10.2ร RTF.
โ ๏ธ Beta artifacts. These
.aimodelbundles are compiled for macOS 27 / Xcode 27 beta (Core AI). They may need re-export on the GA toolchain. The original weights are Microsoft VibeVoice (see upstream for the model license).
vibevoice-0.5b-coreai/
manifest.json # role โ {variant: path} + recommended flags
embed_tokens.f16 # host-side embed table
tokenizer/ # tokenizer files
lm/model-int4.aimodel/
lm/model.aimodel/
diffusion/diffusion-head.aimodel/
diffusion/fused-sampler.aimodel/
codec/acoustic-decoder-streaming.aimodel/
codec/acoustic-decoder.aimodel/
connector/acoustic-connector.aimodel/
Resolve assets by role via manifest.json (default = recommended variant):
{
"lm": {
"default": "lm/model.aimodel",
"int4": "lm/model-int4.aimodel"
},
"diffusion": {
"default": "diffusion/fused-sampler.aimodel",
"per_step": "diffusion/diffusion-head.aimodel"
},
"acoustic_decoder": {
"default": "codec/acoustic-decoder.aimodel",
"streaming": "codec/acoustic-decoder-streaming.aimodel"
},
"acoustic_connector": {
"default": "connector/acoustic-connector.aimodel"
}
}
{
"fused": true,
"steps": 10,
"defer_decode": true,
"decode_compute": "gpu"
}