docs: require explicit ASR language in transcription commands

This commit is contained in:
2026-07-14 15:57:37 +08:00
parent 23e0529461
commit 473e09a5a5
3 changed files with 11 additions and 9 deletions
+7 -5
View File
@@ -115,18 +115,20 @@ Use the bundled `funasr-script` in `scripts/transcription/`. **Prefer Fun-ASR-Na
Command templates (adjust paths for the user's environment):
Always include an explicit transcription language in commands that run ASR. Choose `LANGUAGE_CODE` from the user's stated language or the video's known language (`zh`, `en`, `ja`, `ko`, `yue`, etc.). If uncertain, ask; if the user wants automatic detection, explicitly pass `--language auto` rather than omitting the flag.
```bash
# Recommended default: Fun-ASR-Nano (high quality, Chinese-optimized)
uv run --directory SKILL_DIR/scripts/transcription funasr-nano VIDEO_PATH --track TRACK_INDEX --output-dir VIDEO_DIR
uv run --directory SKILL_DIR/scripts/transcription funasr-nano VIDEO_PATH --track TRACK_INDEX --language LANGUAGE_CODE --output-dir VIDEO_DIR
# Fast preview only: SenseVoice
uv run --directory SKILL_DIR/scripts/transcription funasr-fast VIDEO_PATH --track TRACK_INDEX --output-dir VIDEO_DIR
uv run --directory SKILL_DIR/scripts/transcription funasr-fast VIDEO_PATH --track TRACK_INDEX --language LANGUAGE_CODE --output-dir VIDEO_DIR
# List tracks
# List tracks (no ASR is run, so no language flag is needed)
uv run --directory SKILL_DIR/scripts/transcription funasr-nano VIDEO_PATH --list-tracks
```
Where `VIDEO_DIR` is the directory containing the video file, and `SKILL_DIR` is the skill installation directory.
Where `VIDEO_DIR` is the directory containing the video file, `SKILL_DIR` is the skill installation directory, and `LANGUAGE_CODE` is the explicit transcription language (for example `zh` for Mandarin Chinese).
**Common OBS multi-track audio layouts.** When the user says "multi-track" or mentions OBS recording, these are the typical stream layouts:
@@ -409,7 +411,7 @@ This creates an isolated venv with `funasr`, `torch`, `torchaudio`. If the user
4. **Using full-resolution frames.** A 2560×1600 PNG can cost 2000+ vision tokens. Downsample to 1280 width with `scale=1280:-2` and use JPEG (`-q:v 3`).
5. **Forgetting to record artifacts in the index.** Every clip and frame batch must be recorded. Otherwise subsequent turns will re-extract the same content.
6. **Assuming the transcript is sufficient.** Gameplay videos often have long stretches of action with no dialogue. The agent should proactively check whether visual analysis is needed for segments the user asks about.
7. **Mixing funasr-script flags.** The bundled `funasr-nano`/`funasr-fast` use `--track STREAM_INDEX` and `--output-dir DIR`. Do not use the legacy `~/.local/bin/funasr-transcribe` wrapper's flags.
7. **Mixing funasr-script flags.** The bundled `funasr-nano`/`funasr-fast` use `--track STREAM_INDEX`, explicit `--language LANGUAGE_CODE`, and `--output-dir DIR`. Do not use the legacy `~/.local/bin/funasr-transcribe` wrapper's flags.
8. **Hardcoding tool names.** This skill is agent-agnostic. Do not assume specific MCP tools or APIs exist. Use whatever the runtime provides for vision analysis, background execution, and user notification.
9. **Hardcoding output language.** The edit plan table and all user-facing text must follow the user's language, not a fixed language. The English table in Step 8 is a template — translate columns and content to match the user's language at runtime.
10. **Dropping audio tracks during clip extraction.** The default clip command maps only `0:v:0` (video-only) for fast frame extraction. If the user plans to import the clip into a video editor, use `--all-streams` (or `-map 0`) to preserve all audio tracks. Always ask the user which they need.
+2 -2
View File
@@ -14,8 +14,8 @@ $Video = "D:\Videos\output.mp4"
$VideoDir = Split-Path -Parent $Video
uv run --directory $TransDir funasr-nano $Video --list-tracks
uv run --directory $TransDir funasr-nano $Video --track 2 --output-dir $VideoDir
uv run --directory $TransDir funasr-nano $Video --track 3 --output-dir $VideoDir
uv run --directory $TransDir funasr-nano $Video --track 2 --language zh --output-dir $VideoDir
uv run --directory $TransDir funasr-nano $Video --track 3 --language zh --output-dir $VideoDir
```
Outputs should be written next to the video (`$VideoDir`).
+2 -2
View File
@@ -67,7 +67,7 @@ Use this when the video is stored on the Windows host filesystem. Give this kind
$SkillTranscription = "$env:LOCALAPPDATA\Temp\vedit-transcription"
$Video = "D:\Videos\example.mkv"
$VideoDir = Split-Path -Parent $Video
uv run --directory $SkillTranscription funasr-nano $Video --track 2 --output-dir $VideoDir
uv run --directory $SkillTranscription funasr-nano $Video --track 2 --language zh --output-dir $VideoDir
```
For multiple tracks, run once per track and record each resulting JSON in the index.
@@ -87,7 +87,7 @@ Then give the user a Linux shell command for the long transcription step:
SKILL_TRANSCRIPTION="$HOME/.hermes/skills/media/video-edit-planner/scripts/transcription"
VIDEO="$HOME/videos/example.mkv"
VIDEO_DIR="$(dirname "$VIDEO")"
uv run --directory "$SKILL_TRANSCRIPTION" funasr-nano "$VIDEO" --track 2 --output-dir "$VIDEO_DIR"
uv run --directory "$SKILL_TRANSCRIPTION" funasr-nano "$VIDEO" --track 2 --language zh --output-dir "$VIDEO_DIR"
```
If the user installed the skill somewhere else, adjust `SKILL_TRANSCRIPTION` accordingly.