Haru-4B: Full-Duplex 7.5 Hz Speech-to-Speech Agent Architecture & MeanFlow Inference

Haru-4B is an Apache 2.0 4B-parameter full-duplex continuous speech-to-speech foundation model from higurashi-ai that listens and speaks simultaneously at 7.5 Hz (133 ms frames). Built on a Qwen3.5-4B hybrid linear/full-attention backbone, a VibeVoice 24 kHz causal codec, and a 1-step MeanFlow MLP head, it runs locally in ~12 GB VRAM or Apple Silicon MLX.
Haru-4B: Full-Duplex 7.5 Hz Speech-to-Speech Agent Architecture & MeanFlow Inference: Haru-4B is an Apache 2.0 4B-parameter full-duplex continuous speech-to-speech foundation model from higurashi-ai that listens and speaks simultaneously at 7.5 Hz (133 ms frames). Built on a Qwen3.5-4B hybrid linear/full-attention backbone, a VibeVoice 24 kHz causal codec, and a 1-step MeanFlow MLP head, it runs locally in ~12 GB VRAM or Apple Silicon MLX. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- True 7.5 Hz Full-Duplex Timing: Processes 3,200 audio samples (24 kHz, 133 ms) of user speech and emits 3,200 samples + text token simultaneously without turn-taking VAD delays.
- Zero Discrete Audio Tokens: Sums user audio latent, model audio latent, and text embedding into one sequence position, predicting continuous 64-dim latents via a 4-layer MeanFlow MLP head in 1 step.
- 3:1 Hybrid Linear-to-Full Attention Backbone: Inherits Qwen3.5-4B's 32-layer stack (24 linear_attention + 8 full_attention layers) for constant-memory streaming over 262,144 positions.
- Zero-Shot Voice & Character Conditioning: Controls persona via structured character-card system prompts and clones voices from a clean 3-second to 3-minute reference WAV.
- PyTorch, Native macOS MLX & vLLM-Omni Runtimes: Apache 2.0 weights run in ~12 GB NVIDIA VRAM or locally on Apple Silicon.
import { createAgent } from '@smoke-monkey/harness';// Connect Smoke Monkey Harness to a local Haru-4B duplex server (:8998) for tool-backed voice opsconst voiceCoordinator = createAgent({agentId: 'haru-duplex-coordinator',provider: 'openai',baseUrl: process.env.HARU_VLLM_OMNI_URL ?? 'http://127.0.0.1:8998/v1',apiKey: 'local-haru',model: 'higurashi-ai/Haru-4B',workspacePath: process.cwd(),tools: ['filesystem', 'terminal', 'search'],permission: 'ask-default',});voiceCoordinator.on('permission.required', (event) => {const safeInspect = ['read_file', 'grep', 'glob'];voiceCoordinator.resolvePermission(event.data.toolCallId,safeInspect.includes(event.data.toolName) ? 'allow' : 'deny');});async function main() {const status = await voiceCoordinator.run('Verify python -m haru.server health on port 8998, validate 24kHz reference WAV, and log duplex frame latency.');console.log('Haru-4B supervisor status:', status.status);}main().catch(console.error);
Watch: Related Video Guides
Cascade vs. speech-to-speech vs. full-duplex voice agents
Meet Live 3: Full-Duplex AI Voice Model Built for Real Conversations
What Is Haru-4B? Single-Stream Full-Duplex Speech Architecture
Haru-4B (higurashi-ai/Haru-4B) is an Apache 2.0-licensed 4B-parameter full-duplex continuous spoken dialogue foundation model. Operating at a 7.5 Hz frame rate (133 ms per frame), it sums user audio latents, previous model audio latents, and text tokens into a single transformer position so listening and speaking happen concurrently without turn-taking silence.
Conventional voice agents either chain ASR -> LLM -> TTS (introducing 500–1,500 ms pipeline latency and blocking interruptions) or flatten multi-stream discrete RVQ audio tokens (moshi-style), which inflates sequence length 8x per second. Haru-4B eliminates discrete audio codebooks altogether: a causal VibeVoice acoustic codec compresses every 3,200 samples at 24 kHz into a single 64-dimensional continuous vector (latent_dim: 64).
Exact Architecture from config.json (HaruForConditionalGeneration)
| Subsystem | Verified Specification (higurashi-ai/Haru-4B) |
|---|---|
| Audio Frame Rate & I/O | 7.5 Hz (3,200 samples/frame @ 24,000 Hz, 133.3 ms per step) |
| LM Backbone (`qwen3_5_text`) | 32 layers, hidden_size: 2560, intermediate_size: 9216, 248,320 vocab, bf16 |
| Hybrid Attention Schedule | 3:1 interval (24 linear_attention + 8 full_attention layers), 4 KV heads (head_dim: 256) |
| Linear Attention State | 16 key heads (128-dim), 32 value heads (128-dim), conv_kernel: 4, fp32 state |
| VibeVoice Acoustic Codec | Causal conv ratios [8, 5, 5, 4, 2, 2] (3200x downsampling), 64-dim continuous latent |
| MeanFlow Audio Head | 4-layer MLP (hidden: 2560, ffn_ratio: 3.0), num_steps: 1, guidance_scale: 1.5 (1.0–2.0) |
One-Step MeanFlow Continuous Audio & Memory Footprint
Instead of running a separate multi-step diffusion transformer for speech synthesis, Haru-4B attaches a 4-layer MLP head (ffn_ratio: 3.0) directly to the Qwen3.5-4B hidden state. Using MeanFlow (num_steps: 1, default guidance_scale: 1.5), it generates the next 64-dimensional audio latent in a single forward pass.
Because 24 of 32 backbone layers use constant-memory linear attention with conv_kernel=4, only 8 full-attention layers (4 GQA KV heads, head_dim: 256) accumulate KV cache entries—at just 7.5 positions per second (450 tokens per minute of continuous duplex conversation). In bfloat16, the full checkpoint (model.safetensors containing lm.*, user_audio_proj.*, model_audio_proj.*, head.*, and codec.*) fits comfortably inside ~12 GB VRAM on consumer GPUs (RTX 3060 12GB, RTX 4070, or Apple Silicon unified memory).
Voice Pipeline Latency & Architecture Trade-Offs
| Design Dimension | Cascaded (Whisper + LLM + TTS) | Discrete RVQ Audio LM | Haru-4B Continuous Duplex |
|---|---|---|---|
| Audio Representation | Text transcript intermediate | 8+ discrete codebook tokens/frame | 1 continuous 64-dim latent/frame |
| Audio Generation Steps | Multi-pass TTS synthesis | Multi-codebook autoregressive depth | 1-step MeanFlow MLP (`num_steps=1`) |
| Barge-In / Backchannel | External VAD cutoff hack | Supported | Native simultaneous I/O (`133 ms`) |
| Languages Supported | Depends on ASR/TTS stack | Typically 1–2 | 9 languages (EN, ES, PT, DE, FR, ZH, JA, RU, KO) |
| Minimum Local VRAM | 16–24 GB across 3 models | 16–24 GB | ~12 GB (`bfloat16`) / MLX macOS |
Running Haru-4B Locally: PyTorch Server, DuplexSession API & MLX
Haru-4B ships with three official runtimes in github.com/higurashi-ai/Haru: a PyTorch web server (:8998), a native macOS MLX implementation, and a vLLM-Omni serving plugin. Provide a clean single-speaker reference clip (3 seconds to 3 minutes) and wired headphones to avoid Bluetooth's 100+ ms codec delay.
# Clone and launch the local full-duplex PyTorch server (~12 GB VRAM)
git clone https://github.com/higurashi-ai/Haru && cd Haru
pip install -e ./haru
python -m haru.server --hf-repo higurashi-ai/Haru-4B
# Open http://localhost:8998For programmatic real-time streaming, drive DuplexSession frame by frame (3,200 samples @ 24 kHz per step):
from haru import DuplexSession, HaruModel
from haru.audio import load_audio, prepare_reference
model = HaruModel.from_pretrained("higurashi-ai/Haru-4B")
voice = prepare_reference(load_audio("reference_voice.wav"))
session = DuplexSession(model, system_prompt=character_card, reference=voice)
frame = session.start() # First 133 ms frame: frame.audio (3200 samples), frame.text
while not frame.done:
frame = session.step(user_audio_chunk_3200_samples)Pretrained Research Base Model Behavior
higurashi-ai released Haru-4B as a pretrained conversational base model (Apache 2.0), not an instruction-tuned factual assistant. Pair it with a grounded Smoke Monkey Harness text/tool supervisor for factual tool execution or RAG lookups.
Pairing Haru-4B with Smoke Monkey Harness Tool Execution
While Haru-4B excels at natural 7.5 Hz prosody, interruption handling, and multilingual conversation (EN, ES, PT, DE, FR, ZH, JA, RU, KO), its base weights should not act as an ungrounded source of factual claims or shell commands. Combining Haru-4B as a low-latency duplex front-end with a deterministic Smoke Monkey Harness worker solves both problems.
- Asynchronous Tool Offloading: Stream
frame.texttokens fromDuplexSessionto a background@smoke-monkey/harnessagent whenever the user issues an engineering or lookup intent, keeping conversational backchanneling alive at133 mswhilerun_commandor MCP tools execute. - Acoustic Echo Hygiene: Keep
guidance_scalewithin1.0–2.0(1.5default) and enforce wired audio hardware during local Canvas demos so speaker bleed does not trigger false barge-in loops. - Sovereign On-Device Privacy: Running Apache 2.0 weights via MLX on macOS or local PyTorch ensures raw microphone audio never leaves the developer's workstation.
Frequently Asked Questions
Q:How does Haru-4B achieve full-duplex voice without discrete audio tokens?
At every 133 ms frame (7.5 Hz), Haru-4B encodes 3,200 user audio samples into a 64-dim continuous VibeVoice latent, sums it with the previous model audio latent and text token into one Qwen3.5-4B position, and generates the next continuous audio latent in a single MeanFlow MLP step.
Q:What GPU or Mac hardware is needed to run Haru-4B locally?
Haru-4B runs in bfloat16 on an NVIDIA GPU with ~12 GB VRAM using the PyTorch server or vLLM-Omni plugin, and also ships with an official MLX backend for Apple Silicon macOS.
Q:Why does Haru-4B use a 3:1 hybrid attention backbone?
Its Qwen3.5-4B language model interleaves 24 linear_attention layers with 8 full_attention layers (4 GQA KV heads), keeping memory linear for long multi-minute voice sessions up to 262,144 positions.
Q:Does Haru-4B include built-in voices or require a reference clip?
Haru-4B ships without bundled voice clips. You supply a clean single-speaker WAV (3 seconds to 3 minutes) via prepare_reference() to control the voice, plus a character card system prompt.
Q:Can Haru-4B execute code or answer strict factual queries reliably on its own?
No. The authors note it is a pretrained base model for natural spoken dialogue rather than an instruction-tuned factual assistant. Pair it with Smoke Monkey Harness to verify facts and execute MCP tools.
Related Alternatives & Comparisons
9 Best Free Open Source ChatGPT Alternatives in 2026 (Self-Hosted & Local)
Claude Code Runtime Alternative: Open Source Stdio MCP Agent Harness
LangChain TypeScript Alternative: Zero Dependencies & Deterministic Loops
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.