skills-vault/skills/voice-generation/MIGRATION.md

94 lines
2.7 KiB
Markdown

# voice-generation Migration
## Source
```text
D:\AI\ClaudeCode\voice-ge
```
## Target
```text
C:\Users\wangq\Documents\Codex\skills-vault\skills\voice-generation
```
## Naming Decision
The vault Skill name is `voice-generation`.
The Python package and command remain `voice-gen`:
```text
package: voice-gen
module: voice_gen
command: voice-gen
```
This preserves the existing CLI while giving the vault Skill a descriptive repository name.
## Migrated
```text
README.md
pyproject.toml
docs/
scripts/
src/
tests/
```
## Excluded
```text
.git/
.pytest_cache/
.claude/settings.local.json
output/
plan.md
environment.yml
install-skill.ps1
install-skill.sh
```
## Status
```text
migration status: source-migrated-and-installed
installed version updated: yes
installed path: C:\Users\wangq\.agents\skills\voice-generation
claude link: C:\Users\wangq\.claude\skills\voice-generation
old agents backup: C:\Users\wangq\.agents\skills\voice-gen.backup-20260615054951
old claude backup: C:\Users\wangq\.claude\skills\voice-gen.backup-20260615054951
unit test status: passed
unit test command: C:\Users\wangq\.conda\envs\skills-vault\python.exe -m pytest .\skills\voice-generation\tests --basetemp .\tmp\pytest-voice-generation
real generation test status: passed
real generation test cwd: D:\Mine\口播2
real generation command: C:\Users\wangq\.conda\envs\skills-vault\Scripts\voice-gen.exe gen --voice BroTsong-2026-06-10 scripts --out output --format mp3
real generation output: D:\Mine\口播2\output\hello.mp3
conda environment: shared skills-vault
editable package installed in shared env: yes
old dedicated conda env removed: C:\Users\wangq\miniconda3\envs\voice-gen
```
## Post-Migration Windows Hardening
Validated on 2026-07-10:
- Resolve the npm `mmx.CMD` shim and execute it through `cmd /c` on Windows.
- Pass narration through a temporary UTF-8 file with `--text-file`; do not pass long text through `--text` or use mmx-cli's Windows-incompatible `--text-file -` path.
- Remove the temporary text file after success or failure.
- Escape non-ASCII path characters in CLI status lines as `\uXXXX` so `conda run` remains safe on GBK consoles; generated files retain their Unicode names.
- Force repository tests to import the source tree instead of an older `.agents` installation.
Verification evidence:
```text
source tests: 40 passed, 1 skipped
installed-copy tests: 40 passed, 1 skipped
real long-form voice: BroTsong-2026-06-10
real input: 2602 extracted characters / 7030 UTF-8 bytes
real output: tmp\voice-generation-e2e-20260710-01\output\01.从想法到作品口播文案.mp3
audio: 505.152 seconds, 32000 Hz, 128000 bps, 14032 MPEG frames
temporary text files after completion: 0
```