# audio

Adopt this skill: https://proskills.md/skills/other/chaosrealmsai-nextframe-crates-nf-agent-skills-audio

Page: https://proskills.md/skills/other/chaosrealmsai-nextframe-crates-nf-agent-skills-audio
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: crates/nf-agent/skills/audio/SKILL.md
size: 719
upstream: https://github.com/chaosrealmsai/nextframe/blob/main/crates/nf-agent/skills/audio/SKILL.md

````text
---
name: audio
description: TTS + 词级对齐
expected_outputs:
  - "**/*.mp3"
---

# audio · TTS + 词级对齐

NextFrame audio 流程(TTS 合成 → WhisperX 字级对齐 → karaoke.html)。

## 推进状态机

第一步必做:
```
Bash("nf-guide audio")      # 读 state machine
```

核心命令:
- `Bash("nf-tts batch <batch.json> --dir <out_dir>")` · 批次合成 mp3 + timeline.json + srt
- `Bash("nf-tts <text> -v <voice>")` · 单条合成

voice 选:
- edge 免费: zh-CN-XiaoxiaoNeural(晓晓) / YunxiNeural(云希) / YunyangNeural(云扬)
- volcengine 付费(seed-tts-2.0): 需 `-b volcengine`

## 产物

- mp3 音频
- timeline.json(whisperx 词级时间戳 · 卡拉 OK 字幕同步)
- srt 字幕
````

## File: README.md
upstream: https://github.com/chaosrealmsai/nextframe/blob/main/README.md

````text
# NextFrame

NextFrame is an AI-native video editor and runtime. Structured JSON compositions render in a desktop editor, can be edited live, previewed with audio/subtitles, and exported to MP4.

The current product loop is:

```text
JSON composition -> AI verify -> desktop editor -> live edit -> saved source -> MP4 export
```

## Run

```bash
cargo build -p nf-shell -p nf-cli
target/debug/nf-shell
target/debug/nf open --project v2-showcase --composition showreel-clip-first
```

Example projects live in `examples/`. Runtime copies live under `~/.nextframe/`.

## Directory Map

```text
crates/      Rust product code: CLI, shell, project model, recorder, runtime helpers
frontend/    Zero-framework Web Components editor UI
examples/    Source examples that can be opened by the desktop app
scripts/     Checks, audits, and migration utilities
tests/       Cross-module fixtures and smoke inputs
spec/        Product decisions, BDD, version plans, quality standards, design system
.github/     CI
```

Local generated artifacts do not belong in the repository root. Historical snapshots and generated outputs from the v0.13.0 restructure were moved to:

```text
../NextFrame.archive/v0.13.0-20260424-structure/
```

## Useful Commands

```bash
./scripts/check-structure.sh
cargo check -p nf-cli -p nf-shell -p nf-project -p nf-recorder
cd frontend/nf-components && npm run check && npm run build
NEXTFRAME_HOME=examples target/debug/nf composition validate --project v2-showcase --composition showreel-clip-first
NEXTFRAME_HOME=examples target/debug/nf verify --project v2-showcase --composition showreel-clip-first --out /tmp/showreel-verify.json
target/debug/nf export --project v2-showcase --composition showreel-clip-first --profile draft --diagnostics --out /tmp/showreel-clip-first.mp4
```

## Core Modules

- `nf-cli`: AI-facing command entry, JSON output, composition verification, editor/export verification commands.
- `nf-shell`: macOS desktop shell, WebView, IPC, editor window lifecycle.
- `nf-project`: project storage, clip-first composition compilation, and component registry validation.
- `nf-recorder`: HTML/runtime capture and MP4 export.
- `nf-shell-mac`: macOS WebKit/CoreAnimation capture layer.
- `frontend/nf-components`: editor UI, timeline, inspector, preview wiring.

## Documentation

- Product north star: `spec/charter.md`
- Architecture: `spec/architecture.md`
- Design system: `spec/design/DESIGN.md`
- Version records: `spec/versions/`
- Behavior specs: `spec/bdd/`
- Devlog: `spec/devlog/`

## Quality

NextFrame uses project-specific quality gates:

```bash
./scripts/audit.sh --gate-only
./scripts/audit.sh
```

The structure gate prevents reintroducing nested git repos, generated artifacts, and root-level clutter.

## License

MIT.
````
