Voice Archive and Timbre Management (One Character, One Voice)
Applicable Scenarios
- Establishing a stable voice for a digital employee/character (e.g., Xiao Zhi's broadcast voice);
- Ensuring the same character sounds the same across multiple tasks;
- Needing to switch between different engines (local MLX / OpenAI-compatible endpoints) without changing the voice.
I. Archive Structure (Workspace Fact Source)
~/.workloom/voice-station/profiles/<profile-id>/
├── reference.wav # Reference audio (24kHz mono PCM, from local microphone or authorized material)
├── profile.json # Word-by-word transcription, duration, quality metrics, engine voice id, reference sha256
└── consent.json # Authorization statement (who, scope, who declared, evidence, expiry)
profile-idonly allows[a-zA-Z0-9._-], ≤64 characters; naming convention:<language>-<character>-<version>, e.g.,zh-xiaozhi-v1;- reference.wav is append-only, never modify: To change the reference audio, create a new version id (e.g.,
zh-xiaozhi-v2) instead of overwriting in place; otherwise, historical output voices cannot be reproduced; - Archive directory and authorization receipt share the same lifecycle: Revoking authorization = deactivating the archive and leaving a trace, without deleting evidence.
II. One Profile Per Character
The system's voice contract requires that "once a voice is selected for a character, it must be locked, and subsequent segments must not re-guess" (see docs/voice-and-avatar-delivery-contract.md).
The corresponding practice for the dubbing engine:
- Each character binds exactly one profile-id;
- All voice synthesis segments within the same task use the same archive;
- When "emotional changes" are needed, modify
instruct/ speed, not the person.
III. Emotion, Speed, and Prosody: What Can Be Controlled
| Dimension | Method | Boundary |
|---|---|---|
| Speed | speed / atempo | Broadcast 0.95–1.05×; Dubbing 0.9–1.15×; exceeding 1.25× will trigger segment_overflow by the time window tool |
| Emotion/Style | instruct (when engine supports it, e.g., [excited], [whisper] tags or natural language instructions) | Reference audio takes precedence: if reference and instruction conflict, the reference audio prevails |
| Pauses | Sentence-by-sentence + inter-segment gap_ms (default 180ms) | Broadcast segment gap 150–250ms; Dubbing follows time windows, no extra breaths added |
| Pitch | No global pitch shift | Pitch shifting destroys timbre consistency; for a brighter voice, re-sample the reference audio |
IV. Cross-Language and Dialect
- Reference audio uses the original language, and the word-by-word transcript also uses the original language; output language is specified separately ("cross-language cloning");
- Standard Mandarin Chinese is first priority; for Cantonese/Japanese/Korean, etc., first confirm the engine's language coverage (the default engine OmniVoice covers 646+ languages; Chinese measured RTF ≈ 1.2 @ M3);
- Dialect timbres (e.g., Sichuan dialect, Northeastern accent) require reference audio in the same dialect + matching
instruct; do not expect "Mandarin reference + instruction" to automatically produce dialect.
V. Multi-Engine Interoperability (Same Archive, Different Backends)
| Engine | Cloning Method | Archive Requirements |
|---|---|---|
mlx (Apple Silicon local, default) | Pass ref_audio + ref_text directly in the request | Archive self-contained; re-register when switching machines (paths do not leave the workspace) |
openai (VoiceStudio :3900 / GPT-SoVITS :9880, etc.) | Voice registered on engine side; request uses engine_voice_id | Archive must record engine_voice_id and engine version; after engine rebuild, verify voice consistency |
mock | None | For CI/dry-run only; does not produce usable deliverables |
Switching engines = re-validation: When using the same archive on a different backend, perform spot-check listening (timbre consistency + Chinese numeral pronunciation), then switch only after confirmation.
Output Contract
The archive description must include: profile-id, reference audio source and authorization scope, word-by-word transcription, duration and quality metrics,
binding engine and engine_voice_id, reference audio sha256, and the boundaries of "which scenarios this voice can be used in."
Failure Modes (Symptom → Detector → Resolution)
| Symptom | Detector | Resolution |
|---|---|---|
| Same character "changed person" across different segments | Multiple profile-ids within the task / voice not locked | Lock to a single archive and re-synthesize; emotional changes only modify instruct/speed, do not change archive |
| Historical output voice cannot be reproduced | Reference audio sha256 does not match archive record (overwritten in place) | Restore versioned archive (create -v2 new, not overwrite); re-sample and return to spot-check listening |
| Voice changed after engine switch | Switched backend without spot-check listening / engine_voice_id not recorded | Spot-check (timbre consistency + Chinese numeral pronunciation) before switching; if inconsistent, roll back to original engine |
| Global pitch shift applied to make voice "brighter" | Pitch shift record | Prohibit global pitch shift; re-sample a brighter reference audio |
| Speed stretched to audible distortion | speed/atempo >1.25× or segment_overflow | Edit the script (remove redundant words) instead of speeding up; broadcast 0.95–1.05× is the standard range |
| Dialect not produced (Mandarin reference + instruction) | Reference audio language does not match target dialect | Re-sample with same-dialect reference audio; instructions cannot replace training data |
| Authorization missing/expired still in use | consent.json missing, scope does not cover the use case, or has expired | fail-closed: deactivate archive and leave a trace, do not delete evidence; do not produce new output until authorization is renewed |