Local & Offline
~8 min readUpdated: November 2026

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

Haru-4B full-duplex 7.5 Hz voice agent diagram showing simultaneous user and model audio latents summed into Qwen3.5-4B with 1-step MeanFlow

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.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

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.

Key Architectural Takeaways
Quick Implementation Exampleharu-4b-duplex-voice-agent.ts
haru-4b-duplex-voice-agent.tstypescript
import { createAgent } from '@smoke-monkey/harness';
// Connect Smoke Monkey Harness to a local Haru-4B duplex server (:8998) for tool-backed voice ops
const 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);
Video Guides

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)

SubsystemVerified Specification (higurashi-ai/Haru-4B)
Audio Frame Rate & I/O7.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 Schedule3:1 interval (24 linear_attention + 8 full_attention layers), 4 KV heads (head_dim: 256)
Linear Attention State16 key heads (128-dim), 32 value heads (128-dim), conv_kernel: 4, fp32 state
VibeVoice Acoustic CodecCausal conv ratios [8, 5, 5, 4, 2, 2] (3200x downsampling), 64-dim continuous latent
MeanFlow Audio Head4-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 DimensionCascaded (Whisper + LLM + TTS)Discrete RVQ Audio LMHaru-4B Continuous Duplex
Audio RepresentationText transcript intermediate8+ discrete codebook tokens/frame1 continuous 64-dim latent/frame
Audio Generation StepsMulti-pass TTS synthesisMulti-codebook autoregressive depth1-step MeanFlow MLP (`num_steps=1`)
Barge-In / BackchannelExternal VAD cutoff hackSupportedNative simultaneous I/O (`133 ms`)
Languages SupportedDepends on ASR/TTS stackTypically 1–29 languages (EN, ES, PT, DE, FR, ZH, JA, RU, KO)
Minimum Local VRAM16–24 GB across 3 models16–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.

bash
# 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:8998

For programmatic real-time streaming, drive DuplexSession frame by frame (3,200 samples @ 24 kHz per step):

python
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.

  1. Asynchronous Tool Offloading: Stream frame.text tokens from DuplexSession to a background @smoke-monkey/harness agent whenever the user issues an engineering or lookup intent, keeping conversational backchanneling alive at 133 ms while run_command or MCP tools execute.
  2. Acoustic Echo Hygiene: Keep guidance_scale within 1.0–2.0 (1.5 default) and enforce wired audio hardware during local Canvas demos so speaker bleed does not trigger false barge-in loops.
  3. 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.
Google Search Questions & Answers

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

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness