haru
The PyTorch implementation of Haru, a full-duplex spoken dialogue model, with a web demo server and an offline inference command.
pip install -e . # from this directory
pip install -e ".[webrtc]" # + WebRTC transport for the web demo
pip install -e ".[triton]" # + faster audio codec on NVIDIA GPUs
pip install -e ".[share]" # + public link for the web demo (--share)
haru-server --hf-repo higurashi-ai/Haru-4B # web demo on http://localhost:8998
haru-inference user.wav reply.wav --reference voice.wav --system-prompt "..."
Requirements: Python 3.10 or later and a CUDA GPU with about 12 GB of memory.
ffmpeg on the PATH is needed to use voice clips recorded in the browser
(WebM / MP4); WAV, FLAC and Ogg files work without it.
Faster audio codec
With the triton extra, the codec can run as Triton kernels replayed from
CUDA graphs: about 0.7 ms instead of 6 ms per encoded or decoded frame on a
recent GPU, with the same output up to bfloat16 rounding. It is opt-in:
session = DuplexSession(model, system_prompt=card, reference=voice, config=DuplexConfig(codec_backend="triton"))
The first use in a new environment compiles the kernels (about 15 seconds).
Layout
| Module | Contents |
|---|---|
haru.models.haru |
HaruModel: language model, audio projections, audio head, codec |
haru.models.meanflow_head |
MeanFlowHead: one audio latent from one hidden state |
haru.models.vibevoice_codec |
VibeVoiceCodec: streaming audio encoder and decoder |
haru.codec_triton |
The same codec as Triton kernels replayed from CUDA graphs |
haru.session |
DuplexSession: a live conversation, one frame at a time |
haru.prompt |
Character cards and the prompt layout |
haru.sampling |
Text sampling, repetition penalty, incremental detokenization |
haru.server, haru.webrtc, haru.backends |
The web demo |
haru.run_inference |
Offline: a recording in, the model's side of the conversation out |
See the repository README for the Python API.
Tests
pip install -e ".[dev]"
pytest # CPU-only tests
HARU_MODEL=/path/to/Haru-4B pytest # + tests that load the checkpoint on a GPU
Metadata
Release files for haru-speech 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| haru_speech-0.1.0.tar.gz | 465.5 kB | With provenance | Details for haru_speech-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| haru_speech-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for haru_speech-0.1.0-py3-none-any.whl |
Total release size: 926.8 kB
Release files / haru_speech-0.1.0.tar.gz
| Download URL | haru_speech-0.1.0.tar.gz |
|---|---|
| Size | 465.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b1fe6713ac102fc08191ed3059fff1177e0a15f4363bc7678299cc672de1656
|
|
BLAKE2b-256 checksum How to use checksums |
369c7aafab6abfae50059d04873f20547282fda2d5759efa7355eb96edb1aad7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logRelease files / haru_speech-0.1.0-py3-none-any.whl
| Download URL | haru_speech-0.1.0-py3-none-any.whl |
|---|---|
| Size | 461.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b8894311ab6921486ecab549f83b933bbf6b36d66b3e3f512190d5f7347e021
|
|
BLAKE2b-256 checksum How to use checksums |
ed0120568d0bea88e795d0573480a5b88a16e239812470684d35b8a3429765a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logSecurity for haru-speech 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for haru_speech-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.