中文说明 · English
Privacy-first orchestration for authorized local voice cloning with CosyVoice2. It gives Codex a repeatable workflow for pronunciation control, delivery guidance, provenance, and technical QA without calling a paid speech API for every generation.
No per-call API fee does not mean zero total cost. You provide the computer, model download, storage, electricity, setup, and maintenance.
- Keep reference recordings and generated audio on your machine.
- Pronounce English product, company, and person names with a task-level lexicon.
- Start from six restrained delivery profiles instead of rewriting style prompts.
- Transfer broad pace, pause, pitch-range, and energy characteristics without copying another speaker’s identity.
- Separate generation, technical QA, human listening approval, video insertion, rendering, and publication.
- Require an explicit rights and consent gate before synthesis.
This repository intentionally ships no voice samples. Its public validation covers the orchestration layer:
$ python3 scripts/test_core.py
core tests passed
$ python3 scripts/validate_repository.py
repository validation passed
The synthesis result still depends on your authorized reference audio, CosyVoice2 environment, model, language, and hardware. Run the environment check and listen to the result before production use.
See the sanitized dry-run plan for a concrete pronunciation and chunking result with no audio attached.
git clone https://github.com/yjin5562-dev/local-voice-cloning-director.git \
~/.codex/skills/local-voice-cloning-directorRestart or refresh Codex. The Skill allows implicit invocation, so ordinary requests such as “用我授权的声音给这段视频配音” can route to it without requiring the Skill name.
The repository includes a validated .codex-plugin/plugin.json for plugin catalogs and local plugin packaging. Until the repository is accepted into a catalog, Option A is the shortest installation path.
Install CosyVoice2 separately from the official CosyVoice repository, then set:
export COSYVOICE_ROOT=/path/to/CosyVoice
export COSYVOICE_MODEL=/path/to/CosyVoice2-0.5B
export COSYVOICE_PYTHON=/path/to/cosyvoice/python
python3 scripts/check_environment.pyRead the setup contract before downloading a model or changing an environment.
- Confirm that the voice is your own or that the intended use is licensed.
- Prepare a clean 6–15 second reference clip and its exact transcript.
- Review a dry-run plan, including chunks, pronunciation substitutions, profile, and speed.
- Generate locally with CosyVoice2.
- Run technical QA, then complete a separate human listening check.
See SKILL.md for commands and execution gates. Text-only fictional examples are in examples/.
Use only your own voice or a voice with documented cloning permission. Do not use this project for impersonation, public-figure cloning, fraud, authentication, harassment, deceptive political persuasion, or evading disclosure rules.
Reference recordings, exact transcripts, generated audio, hashes, and manifests are private production data. Keep them outside the repository. See SECURITY.md and the detailed safety boundary.
Installation reports, quality edge cases, safe language support, and privacy-preserving improvements are welcome. Start with CONTRIBUTING.md or open one of the structured issue forms.
The original orchestration code and Skill instructions are MIT licensed. CosyVoice, its models, FFmpeg, Whisper, and optional Python packages retain their own licenses. See THIRD_PARTY_NOTICES.md.
