Repository navigation
XTTS_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.F5/, workers/xtts/, deploy/host/roles/xtts/
This audit checked the engine catalog and route controls only. It did not repeat worker, upstream artifact, GPU, or performance checks below.
Martlet's second self-hosted voice engine, next to F5-TTS. XTTS-v2
copies a voice from the same reference recordings (Companion > Voice > Voices)
and, unlike F5, streams while it generates: Xtts.inference_stream yields
audio before a sentence is finished, so the first sound of a reply arrives much
sooner. The engine review that recommended it is in
Voice Studio.
| Part | Source | Licence |
|---|---|---|
| Runtime |
coqui-tts 0.27.5, Idiap's maintained fork of Coqui TTS (the abandoned TTS package is not used) |
MPL-2.0 |
| Model |
coqui/XTTS-v2 at revision 6c2b0d75eae4b7047358e3b6bd9325f857d43f77
|
Coqui Public Model License 1.0.0: non-commercial use of the model and of its output only |
Nothing is downloaded until the owner installs the xtts host role. The role's
terms (shown by Martlet before Install, whose click confirms them, and by
martlet-host add xtts) name the runtime, the download and the CPML
non-commercial restriction; handing Speaking to XTTS repeats the restriction in
its confirmation. As with F5, the voice-rights confirmation for each recording
is the owner's assertion, not legal clearance.
-
Host role
xtts(deploy/host/roles/xtts, port 50081, NVIDIA GPU with 4 GB+). The image is built on the host fromworkers/xtts/host/Dockerfile:python:3.12.10, hash-locked PyTorch 2.6.0 CUDA 12.4 (the same wheels as F5),coqui-tts0.27.5,transformers4.57.6 (host/requirements.lock). -
Provisioning (
martlet-xtts provision) downloads and verifies the four files that must agree, all at the one pinned revision, into themartlet-xtts-modelsvolume:model.pth(1,867,929,118 bytes, SHA-256c7ea2000…6187),config.json,vocab.json(tokenizer) andspeakers_xtts.pth. The worker re-checks every SHA-256 before loading.martlet-xtts warmthen loads the model so the first reply does not wait. The role's choices are the model (xtts-v2) and the language (enby default; the 17 XTTS-v2 languages). -
Service
workers/xtts/host/martlet_xtts_host.pylistens on 127.0.0.1:50081 only and speaks the f5 role's protocol (/status,/warmup,/synthesize,/cancel) andmartlet.f5.worker1.0 event stream. The model runs in a child 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 and the last reply's timing (first_audio_ms,audio_seconds,total_ms; never text or audio), and each reply logs the same line. -
Latency path: the reference's conditioning latents
(
get_conditioning_latents) are computed once per reference revision and cached (8 voices); a voice made from several recordings gives XTTS each of them as its own reference file (cut from the joined recording at the places the shared voice list keeps,reference.clips), so the speaker is learned from all of them;inference_stream(20 GPT tokens per piece, text split by sentence) yields float audio at 24 kHz, which is converted to signed 16-bit PCM and sent at once in frames of at most 4,800 samples. Output therefore matches Martlet's speech contract (24 kHz mono 16-bit,SpeechOutputFormat.Pcm24KhzMono16Le) without resampling. Stop/cancel ends generation between pieces. -
Gateway:
Martlet.Gateway.Xtts.XttsRelayis the F5 relay (Martlet.Gateway.F5.F5RelayWorker) on XTTS's own route,martlet.gateway.xtts-synthesis.v1at/martlet/v1/inference/xtts-synthesis, with the same payload, checks (model weights identity on the first event, contiguous frames, chunk completions) and discard-only cancellation. A host can runf5andxttsside by side. Host configuration kind:xtts. -
Engine catalog:
Martlet.Core.Settings.SpeechEngineslists every reference-voice engine (key, host role, route, path, model, weights licence, GPU memory). All engines share the voice destinationf5-host, so one voice list and one rights confirmation serve them; a saved TTS gateway route (GatewayF5) may carry any engine's route.
Companion > Voice > Voice engine lists every engine as one row with a
rundown (XTTS-v2: VoiceEngineAbilities-xtts reads voice cloning yes, laughs &
sighs no, emotions no; VoiceEngineRunsOn-xtts an NVIDIA GPU, about 2.2 GB of
graphics memory, up to 3 GB, 4 GB+ card) and chips (VoiceEngineFeatures-xtts
reads Docker, Streams, 17 languages) and one button, VoiceEngineUse-xtts, that
sets XTTS-v2 up on the shown computer (this PC, or the one picked under Another
of your computers) after a confirmation naming its non-commercial licence, then
switches Speaking to it; the engine it replaces stops. The choice is kept in
speaking-engine.txt. The speaking route records the engine's route, and the
speech client asks the host for that route and model. Your other computers
that speak through the same host follow the engine it runs now on their next
check (CLUSTER). The Devices map lists both
roles ("Speaking (F5-TTS)", "Speaking (XTTS-v2)").
-
python -m unittest discover -s workers/xtts/testsruns the service with the FIXTURE - NOT AI tone engine (provision --fixture): contiguous bounded frames, chunk completions, digest checks and restart of a killed worker. -
tests/Martlet.Gateway.Tests/XttsRelayTests.cschecks that a host offers both engines' routes; withMARTLET_XTTS_LIVE_ENDPOINTset to a running service it speaks through the real gateway and paired client. - 2026-10-02, Windows, CPU only (no GPU access on that machine), the pinned files and the lock's versions with CPU PyTorch: the service streamed real XTTS-v2 speech for "Annie (cute anime girl)": first audio after 1.57 s (new voice) and 1.12 s (cached latents) for 7.5 s and 6.1 s replies that took 14.1 s and 9.5 s to finish; through the gateway and paired client, first audio at 1.45 s of a 4.0 s request. CPU is slower than real time, so these show the streaming shape, not GPU latency.
NOT RUN: the container image build and martlet-host add xtts (Docker was
not running), NVIDIA GPU warmup/latency/VRAM, combined load with an LLM, live
desktop conversation playback through XTTS, and listening review of likeness.
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