Repository navigation
DIA_VOICE
Status: Implemented
Last Updated: 2026-11-13
Audience: Developers and coding agents
Last verified: 2026-11-13 against 5f40af2d9 (engine catalog and route selector only)
Code: src/Martlet.Core/Settings/SpeechEngines.cs, src/Martlet.Desktop/Pages/Voice/, src/Martlet.Gateway.Dia/, workers/dia/, deploy/host/roles/dia/
This audit checked the engine catalog and route controls only. It did not repeat the worker, upstream artifact, GPU, or performance checks below.
Dia by Nari Labs is a self-hosted voice
engine next to Chatterbox Turbo (the default),
F5-TTS, XTTS-v2 and
GPT-SoVITS. It copies a voice from the same reference
recordings (Companion > Voice > Voices) and performs nonverbal cues written
in the reply, such as (laughs), (sighs), (coughs) and (gasps). It is
English only and is chosen on Companion > Voice > Voice engine; it is never
preselected.
| Part | Source | Licence |
|---|---|---|
| Code |
nari-labs/dia at commit 876125e461a03b157ec905b0fe8b57a0f8b9e7a0 (no tagged releases; the last change under dia/ is 998fc25). The six dia/*.py files and LICENSE are fetched by SHA-256 when the image is built. |
Apache-2.0 |
| Model |
nari-labs/Dia-1.6B-0626 at revision ef2795fcc29c5abe6ffc91fd33808588b49bbc66: pytorch_model.bin (6,444,787,333 bytes, SHA-256 8a5106c0…55b9, byte-identical to dia-v1.pth) and config.json (1,396 bytes, 4f4e9c50…e04f) |
Apache-2.0 |
| Codec |
Descript Audio Codec 1.0.0 and its 44 kHz 8 kbps weights (release 0.0.1 weights.pth, 306,717,287 bytes, a88eed82…61aa), the codec dia/model.py uses |
MIT |
Nari Labs forbids using Dia to imitate real people without their permission,
for deceptive content, or for anything illegal or harmful. Nothing is
downloaded until the owner installs the dia host role: its terms (shown by
Martlet before Install, whose click confirms them, and by
martlet-host add dia) name the source, both downloads, their licences and
that restriction. As with every engine, the voice-rights confirmation for each
recording is the owner's assertion, not legal clearance.
-
Host role
dia(deploy/host/roles/dia, port 50084, NVIDIA GPU with 8 GB+; Dia's README measures about 4.4 GB of VRAM in float16). The image is built on the host fromworkers/dia/host/Dockerfile:python:3.12.10, hash-locked PyTorch 2.6.0 CUDA 12.4 and descript-audio-codec 1.0.0 at the versions in Dia's ownuv.lock(host/requirements.lock), then the pinned Dia source. Its own container, volume and environment. -
Provisioning (
martlet-dia provision) downloads and verifies the three pinned files into themartlet-dia-modelsvolume. Nothing is downloaded at run time: the worker loads Dia withDia.from_localand the codec withdac.DAC.loadfrom those paths (HF_HUB_OFFLINE), instead of Dia's ownfrom_pretrainedanddac.utils.download().martlet-dia warmthen loads the model so the first reply does not wait. -
Service
martlet_dia.hostlistens on 127.0.0.1:50084 only and speaks the f5 role's protocol (/status,/warmup,/synthesize,/cancel) and themartlet.f5.worker1.0 event stream. The model runs in a separate worker process it starts, warms and restarts if it dies; a reply that arrives while another is still generating waits (up to 30 s) instead of failing, like F5 since PR #248./statusreports the state, the worker identity (artifacts, source commit) and Dia's nonverbal cue list. -
Prompt: Dia clones from an audio prompt plus its exact transcript, so
each piece of a reply becomes
[S1] <reference transcript> <reply text>with the reference as the audio prompt; Dia generates audio only for the text after the reference. Martlet always speaks as one speaker: any[S1]/[S2]in the reply or transcript is removed, so the cloned voice is the only voice. Reply text otherwise reaches Dia unchanged, so the cues Martlet keeps for Dia are performed. Long replies are split at sentence, then clause boundaries to fit Dia's 1,024-byte text window and 3,072 audio tokens (about 35 s, reference included); a reference whose transcript or length leaves no room is refused withreference_too_long. Each piece's generation is capped at a generous length for its text, and sampling usesDia.generate's defaults (CFG 3.0, temperature 1.2, top-p 0.95, top-k 45), seeded from the voice and text. -
Output: Dia's codec produces 44.1 kHz audio; the worker resamples it to
24 kHz and sends signed 16-bit mono PCM (
SpeechOutputFormat.Pcm24KhzMono16Le) in frames of at most 4,800 samples after each piece is generated (Dia does not stream within a piece). Stop discards the reply; the model finishes the piece it is generating (discard only). -
Gateway:
Martlet.Gateway.Dia.DiaRelayis the F5 relay (Martlet.Gateway.F5.F5RelayWorker) on Dia's own route,martlet.gateway.dia-synthesis.v1at/martlet/v1/inference/dia-synthesis, modeldia-1.6b-0626, with the same payload and checks (model weights identity on the first event, contiguous frames, chunk completions). Host configuration kind:dia.
Dia's README at the pinned commit lists (laughs), (clears throat),
(sighs), (gasps), (coughs), (singing), (sings), (mumbles), (beep),
(groans), (sniffs), (claps), (screams), (inhales), (exhales),
(applause), (burps), (humming), (sneezes), (chuckle) and
(whistles), and warns that overusing them or using unlisted ones causes
artifacts. SpeechEngines.DiaTags registers the conversational ones (all but
the singing, beep, clapping, applause, burp and scream cues) in Martlet's
voice tag catalog: the Thinking prompt then lists exactly
these when Dia speaks, the speech segmenter keeps them for Dia's voice, and
chat text and captions drop them. MCP voice_tags with {"engine":"dia"}
shows the tags, what the voice and the chat receive and the prompt.
Companion > Voice > Voice engine lists Dia as a row (VoiceEngine-dia) with
its rundown (VoiceEngineAbilities-dia: voice cloning yes, laughs & sighs yes,
emotions no), where it runs (VoiceEngineRunsOn-dia: an NVIDIA GPU, about
4.4 GB of graphics memory, up to 9.8 GB, 8 GB+ card), its chips
(VoiceEngineFeatures-dia: Docker, samples up to 20 s, English) and one button
(VoiceEngineUse-dia) that sets Dia up on the shown computer (this PC, or the
one picked under Another of your computers) after a confirmation naming its
licence and Nari Labs' terms, and switches Speaking to it; the engine it
replaces stops. The Devices map lists the role as "Speaking (Dia)". MCP
f5_voices lists Dia in engines and reports chosenEngine and the speaking
route's engine.
-
python -m unittest discover -s tests -t .inworkers/dia(withPYTHONPATH=workers/dia) runs the service with the FIXTURE - NOT AI tone engine: contiguous bounded frames, chunk completions, single-speaker prompts with cues unchanged, splitting, refusal of an over-long reference and restart of a killed worker. It also passed inside the built Linux image. -
tests/Martlet.Gateway.Tests/DiaRelayTests.cschecks that a host offers Dia next to F5 and XTTS-v2 on its own route; withMARTLET_DIA_LIVE_ENDPOINT(andMARTLET_DIA_LIVE_FIXTURE=1for a fixture-provisioned service) it speaks through the real gateway and paired client, andMARTLET_DIA_LIVE_OUTPUTsaves the WAV. Through the fixture service: 4.0 s of audio via gateway and client. -
MCP on 2026-10-02 (disposable data directory):
f5_voiceslistsdia(modeldia-1.6b-0626, Apache-2.0, 8 GB, 14 tags, not default) with Chatterbox Turbo still the default; on the desktop, Companion > Voice > Voice engine starts on Chatterbox Turbo, and selectingSpeakingEngine-diachangesSpeakingEngineStatusto Dia with its Apache-2.0 licence,SpeakingEngineTagsto Dia's cues andchosenEnginetodia(controls of the engine combo box that the Voice engine rows later replaced).voice_tagswith{"engine":"dia"}keeps(laughs)and(sighs)for the voice, drops Chatterbox's[laugh], hides the cues from the chat text and lists Dia's cues in the prompt (its example now uses the engine's own first tag,(laughs)). -
2026-10-02, Windows with Docker Desktop, CPU only (no NVIDIA GPU on that machine): the image built;
martlet-dia provisionverified the three pinned files andmartlet-dia warmloaded the real model (72 s, offline). The worker cloned "Annie (cute, chatty)" (7.5 s reference) with the real model, checked with Whisper (small.en, which transcribes words but not laughs or sighs):- with the hotter settings of Dia's voice-clone example (CFG 4, temperature 1.8), "Oh, that's so funny! (laughs) I really didn't expect that." gave 3.45 s: all the words, with a one-second break where the laugh is; but "(sighs) Well, I suppose we have to start again tomorrow." gave 15.7 s of noise and no words;
- with
Dia.generate's defaults (what Martlet uses), the sigh line gave 3.7 s: 1.4 s of quiet breathy sound, then every word; the laugh line gave all the words but 7 s between "funny!" and "I", 1.5 s of silence then about 4.5 s of quiet sound. Martlet therefore also caps each piece at about 1 s per 9 characters plus 1.5 s per cue and 1 s (at least 3 s). Dia samples randomly, so cue timing varies between runs. CPU took 1-4 minutes per sentence, longer than the 90 s request bound, so real speech through the gateway was not run on CPU.
-
2026-10-04, RTX 4070 12 GB, with the voicebench Dia bench (
scripts/voice-bench,Install-VoiceBench.ps1 -Dia: this worker's ownDiaEngineand prompts with the pinned source, weights and codec, float16, Windows, notorch.compile; never the host role). Alone on the card (Ollama stopped, about 1 GB in use): loaded in 20 s, warm-up 22.6 s, 9.8 GB at its peak; three runs each, the first audio is the whole piece: a 3 s piece in 17.0 s, a 3.5 s sentence in 19.5 s, the sigh line (5 s) in 28.2 s, the laugh line (5.8 s) in 38.2 s and an 11 s piece in 60.4 s, about 5.6x slower than real time, with the graphics card busy only about 30% of the time. Chatterbox Turbo, alone on the same card, started every piece in 417-560 ms (Voice latency). Beside the resident roles and a model in Ollama, Dia ran out of graphics memory and its first 3 s piece took 15 minutes.
NOT RUN: Dia in the host role's own Linux image on a GPU (the bench ran
the same worker code on Windows), martlet-host add dia on a
GPU host, live desktop conversation playback through Dia, and a listening
review of likeness and of how each cue sounds (no one listened to the output;
Whisper cannot hear laughs or sighs).
Martlet: download · repository · changelog · issues
These pages come from docs/wiki in the repository. To suggest a change, open an issue or a pull request there.
- Home
- Accounts and households
- Accounts and Household
- Android phones and tablets: what it takes, and the plan
- Martlet's API for other apps and scripts
- App Guides
- App Settings and Updates
- App guides: game and app knowledge from the web
- Architecture
- Bounded PCM playback
- Audio dependency inventory and notices
- Avatar guide: Live2D, VRM and speech animation
- V01a explicit microphone capture
- Chatterbox voice engines
- Cleaning up disk space
- One Martlet on all your computers
- Companion controls and behavior requirements
- Components, jobs and placement (design)
- Live conversation
- Creations
- Decision map: which file owns each decision
- Deep research: web search and long research jobs
- The desktop app: updates, notification area, exiting and appearance
- Linux and macOS desktop companion: research, decision and plan
- Developer Guide
- Dia voice engine
- Diagnostics
- Discord
- Architecture and provider contracts
- Discord
- Memory (P03a/P03b/P03c)
- Singing
- Desktop troubleshooting and local support
- Recognizing people by voice, and Parakeet
- Echo cancellation
- ElevenLabs voice: your cloned voice with tones
- F5 worker and reference-voice foundation
- FAQ
- First Steps
- Game state plan: implementation history
- Glossary: one name for each concept
- GPT-SoVITS voice
- Hosted Thinking: cloud models when Thinking can't run on this PC
- Installation and support
- Installing Martlet
- iOS and iPadOS: what it takes, and the plan
- Repository instructions for coding agents
- Repository knowledge base
- Knowledge base maintenance
- GitHub Wiki mirror
- Linux and Mac
- Listening and Voice ID
- Local model apps
- Lorebooks
- macOS: what it takes, and the plan
- Martlet MCP Server
- MCP in Martlet
- MCP: The app's window
- MCP: Apps, home and memory
- MCP: Characters
- MCP: Diagnostics and logs
- MCP: Computers, network and accounts
- MCP: Other
- MCP: Tool permissions
- MCP pages
- MCP: Server and protocol internals
- MCP: Settings
- MCP: Start here
- MCP: Thinking and models
- MCP: Voice and listening
- Memory
- Messaging apps
- Model catalog: sources, conflicts and design
- Motion host role
- Multiple Computers
- Your Martlet network
- OCR host role
- Share your language models: the OpenAI-compatible endpoint
- Packaging
- Perception worker contracts
- Personality and Characters
- Picture making
- Pictures and Creations
- Picture making host role
- Platforms: what each device can do
- Prerequisites: what Martlet bundles, installs for you, or needs from you
- Privacy and Safety
- Reading the text on your screen
- Wiki source
- Recommendation design: ask three questions, plan for three situations
- Recommended setups: one machine to unlimited budget
- Releasing
- Repository Layout
- Research and provenance ledger
- Resource footprints
- Roadmap
- Watch my screen: screen-aware commentary
- Search engine
- Image and audio models: who sees, who hears, who answers
- Setting Up a Host
- Setup, Windows credentials and local audio
- Sharing with Friends
- Singing
- Smart Home
- Smart home and cameras
- Source Projects
- Talking to Martlet
- Telegram and WhatsApp
- The Character
- Thinking
- Tools and MCP
- Troubleshooting
- Martlet desktop UI design
- User stories and target flows
- Voice activity detection
- Validating changes
- Validation and Testing
- Vision
- Voice latency: from you stopping talking to Martlet's voice
- Voice recognition host role
- Multi-engine voice setup and comparison
- Voices
- The welcome wizard
- XTTS-v2 voice engine