[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112762":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":27,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},112762,"Haru","higurashi-ai\u002FHaru","higurashi-ai","Haru: a low-latency, multilingual, full-duplex spoken dialogue model","https:\u002F\u002Fhuggingface.co\u002Fhigurashi-ai\u002FHaru-4B",null,"Python",747,71,8,6,0,10,237,560,61,99.55,"Apache License 2.0",false,"main",true,[],"2026-11-13 06:21:17","2026-11-23 20:11:24","# Haru\n\n[Model](https:\u002F\u002Fhuggingface.co\u002Fhigurashi-ai\u002FHaru-4B) ·\n[Technical blog](https:\u002F\u002Fblog.higurashi.ai\u002Fmelte\u002Fharu4b\u002F) ·\n[Technical blog (Japanese)](https:\u002F\u002Fblog.higurashi.ai\u002Fmelte\u002Fharu4b-ja\u002F)\n\nHaru is a low-latency and multilingual full-duplex spoken dialogue model: it\nlistens and speaks at the same time, the way people do on a phone call. This\nrepository contains the inference code for **Haru-4B**, a pretrained base\nmodel, with three implementations and a web demo.\n\n- **Native full-duplex at 7.5 Hz.** Every 133 ms the model takes one frame of\n  the user's audio and produces one frame of its own audio and text. User\n  audio, model audio and model text are summed into a single position of the\n  language model, so listening and speaking never wait for each other.\n- **Continuous audio, one sampling step.** Audio is a 64-dimensional latent\n  per frame. A small MLP head with MeanFlow sampling produces it in one step\n  from the language model's hidden state; there is no separate audio\n  transformer and there are no discrete audio tokens.\n- **Character and voice control.** A text card sets the character, a short\n  reference clip sets the voice.\n- **Multilingual.** English, Spanish, Portuguese, German, French, Chinese,\n  Japanese, Russian and Korean.\n\n## How it works\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Farchitecture.svg\" width=\"720\" alt=\"Haru-4B architecture: in every 133 ms frame, the user's speech latent, the model's previous text token and its previous speech latent are summed into one position of the language model, whose output predicts the next text token and the next speech latent.\">\n\u003C\u002Fp>\n\n- The **text stream** carries the model's words in chunks. Frames without text\n  hold a padding token, and an end-of-padding token on the frame before the\n  model starts to speak.\n- The **audio codec** is the causal VibeVoice acoustic tokenizer: 24 kHz audio\n  to and from one latent per 3200 samples.\n- The **prompt** is the character card as a system turn, followed by the voice\n  reference as audio on the model's stream.\n\n## Repository\n\n| Directory | What it is |\n| --- | --- |\n| [`haru\u002F`](haru\u002F) | PyTorch implementation, web demo server, offline inference |\n| [`haru_mlx\u002F`](haru_mlx\u002F) | MLX implementation for Apple silicon, with a native macOS app |\n| [`haru_vllm\u002F`](haru_vllm\u002F) | Plugin that serves Haru with [vLLM-Omni](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm-omni) |\n| [`client\u002F`](client\u002F) | Web client of the demo (React); a built copy ships inside `haru` |\n\nAll three read the same checkpoint,\n[`higurashi-ai\u002FHaru-4B`](https:\u002F\u002Fhuggingface.co\u002Fhigurashi-ai\u002FHaru-4B).\n\n## Quick start\n\nWith an NVIDIA GPU (about 12 GB of memory):\n\n```bash\npip install -e .\u002Fharu\npython -m haru.server --hf-repo higurashi-ai\u002FHaru-4B\n```\n\nOpen \u003Chttp:\u002F\u002Flocalhost:8998>, pick a character, give the model a voice, and\ntalk. A browser only gives a page microphone access on `localhost` or over\nHTTPS.\n\nFor low latency, we recommend wired headphones and a wired microphone.\nBluetooth devices add 100 ms or more.\n\nTo let someone else try it, add `--share` (`pip install -e \".\u002Fharu[share]\"`): the\nserver prints a public HTTPS link that tunnels to it. Anyone with the link can\nuse the demo, and the traffic passes through Gradio's share servers.\n\n**Bring your own voice.** Haru ships without voice clips. In the demo, upload\nor record a clip of the voice the model should speak with: one speaker, 3\nseconds to 3 minutes, clean speech. In Python, pass it as `reference`. Only\nuse voices you have the right to use.\n\nTo give the demo a default voice, save a clip as\n`haru\u002Fharu\u002Fassets\u002Fvoices\u002F\u003Clanguage>.flac` (`en.flac`, `ja.flac`, ...) and\nrestart the server: the demo then offers it as the default voice of that\nlanguage. Without the file, the demo does not show the option.\n\nOn a Mac with Apple silicon, build the native app (see\n[`haru_mlx\u002Fswift`](haru_mlx\u002Fswift\u002FREADME.md)):\n\n```bash\ncd haru_mlx\npython3 -m venv .venv && source .venv\u002Fbin\u002Factivate\npip install -e .\ncd swift && .\u002Fbuild_app.sh        # then open build\u002FHaru.app\n```\n\n## Python\n\n```python\nfrom haru import DuplexSession, HaruModel\nfrom haru.audio import load_audio, prepare_reference\n\nmodel = HaruModel.from_pretrained(\"higurashi-ai\u002FHaru-4B\")\nvoice = prepare_reference(load_audio(\"voice.wav\"))\nsession = DuplexSession(model, system_prompt=card, reference=voice)\n\nframe = session.start()                  # the model's first 133 ms: frame.audio, frame.text\nwhile not frame.done:\n    frame = session.step(user_audio)     # 3200 samples at 24 kHz in, 3200 out\n```\n\nThe model is one frame ahead of the user: `start()` returns frame 0, and each\n`step()` with user frame `k` returns model frame `k + 1`.\n\n### The system prompt\n\nHaru reads its character from a card with a fixed layout. Build one with `render_card`:\n\n```python\nfrom haru.prompt import card_templates, render_card\n\ncard = render_card(\n    {\n        \"persona\": \"Haru is a 29-year-old nurse in Denver. She is warm, chatty and laughs easily.\",\n        \"name\": \"Haru\",\n        \"gender\": \"female\",\n        \"other_name\": \"Sam\",\n        \"relationship\": \"Old friends from high school.\",\n        \"situation\": \"A phone call to catch up after a long time.\",\n    },\n    card_templates()[\"templates\"][\"en\"],\n)\n```\n\n### Offline\n\n```bash\nharu-inference user.wav reply.wav --reference voice.wav --system-prompt \"$(cat card.txt)\" --stereo\n```\n\n## Serving with vLLM-Omni\n\nFor many concurrent conversations and the lowest latency on a GPU server, see\n[`haru_vllm\u002F`](haru_vllm\u002F). The web demo can use it as its engine:\n\n```bash\npython -m haru.server --backend vllm --vllm-url http:\u002F\u002Flocalhost:8000\n```\n\n## Custom kernels\n\nThe hot paths of a frame have hand-written kernels, alongside plain\nimplementations that give the same results:\n\n| Where | Kernel | What it speeds up |\n| --- | --- | --- |\n| `haru` (NVIDIA GPUs) | [Triton](https:\u002F\u002Fgithub.com\u002Ftriton-lang\u002Ftriton) kernels replayed from CUDA graphs ([`haru\u002Fharu\u002Fcodec_triton`](haru\u002Fharu\u002Fcodec_triton)) | The audio codec: about 0.7 ms instead of 6 ms to encode or decode a frame. Opt-in with `DuplexConfig(codec_backend=\"triton\")` or `--codec-backend triton` |\n| `haru_vllm` | The same Triton codec, used automatically | Audio encode and decode inside the engine step |\n| `haru_mlx` (Apple silicon) | Metal kernels ([`gated_delta.py`](haru_mlx\u002Fharu_mlx\u002Fmodels\u002Fgated_delta.py), [`vibevoice_codec.py`](haru_mlx\u002Fharu_mlx\u002Fmodels\u002Fvibevoice_codec.py)) | The Gated DeltaNet recurrence of the language model and the depthwise convolutions of the codec |\n\n## Limitations\n\nHaru-4B is a pretrained base model, released for research. It holds a natural\nconversation, but it is not a reliable source of facts and does not follow\ninstructions the way an assistant does. It can imitate the voice of a\nreference clip; only use voices you have the right to use.\n\n## License\n\nThe code and the Haru-4B weights are released under the Apache License 2.0.\nSee [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) for the third-party work\nthey include.\n\n## Acknowledgments\n\nHaru builds on the work of many open-source projects. We are grateful to their\nauthors and communities.\n\n- [Qwen](https:\u002F\u002Fgithub.com\u002FQwenLM) — the Qwen3.5 language model that Haru-4B\n  starts from.\n- [VibeVoice](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FVibeVoice) — the causal acoustic\n  tokenizer Haru uses as its audio codec, and the idea of next-latent\n  generation at 7.5 Hz.\n- [Moshi](https:\u002F\u002Fgithub.com\u002Fkyutai-labs\u002Fmoshi) — the pioneering full-duplex\n  speech model. Our web client is derived from the Moshi web client.\n- [Improved MeanFlow](https:\u002F\u002Fgithub.com\u002FLyy-iiis\u002Fimeanflow) — the one-step\n  generative modeling framework behind the audio head.\n- [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm) and\n  [vLLM-Omni](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm-omni) — the serving engine\n  and its full-duplex realtime framework, which `haru_vllm` plugs into.\n- [MLX](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx),\n  [mlx-lm](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-lm) and\n  [mlx-audio](https:\u002F\u002Fgithub.com\u002FBlaizzy\u002Fmlx-audio) — the array framework and\n  the model code `haru_mlx` builds on.","Haru 是一个低延迟、多语言、全双工语音对话模型，支持实时边听边说的自然对话交互。其核心特点是每133毫秒完成一次音频帧输入与文本\u002F语音输出的联合推理，采用统一隐空间建模（64维音频潜变量+文本token融合输入），无需离散音频token或独立音频解码器；支持通过角色卡片设定人格、短语音片段克隆声线，并原生覆盖中、英、日、韩等9种语言。适用于实时语音助手、虚拟客服、多语言人机对话系统等对响应延迟和交互自然性要求高的场景。",2,"2026-11-24 04:44:04","CREATED_QUERY"]