From 98c478a1bb3b079db13f8ae0720cf0ceb92d7afe Mon Sep 17 00:00:00 2001 From: nite Date: Tue, 14 Jul 2026 16:00:24 +0800 Subject: [PATCH] docs: use neutral audio language placeholder --- SKILL.md | 10 +++++----- references/windows-funasr-uv-setup.md | 4 ++-- references/wsl-windows-uv-transcription.md | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/SKILL.md b/SKILL.md index 8f03a9b..bf2923b 100644 --- a/SKILL.md +++ b/SKILL.md @@ -115,20 +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. +Always include an explicit transcription language in commands that run ASR. Use a neutral placeholder such as `AUDIO_LANGUAGE_CODE` in templates, then replace it with the language actually spoken in the audio (`zh`, `en`, `ja`, `ko`, `yue`, etc.). Do **not** infer the audio language solely from the user's chat language. 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 --language LANGUAGE_CODE --output-dir VIDEO_DIR +uv run --directory SKILL_DIR/scripts/transcription funasr-nano VIDEO_PATH --track TRACK_INDEX --language AUDIO_LANGUAGE_CODE --output-dir VIDEO_DIR # Fast preview only: SenseVoice -uv run --directory SKILL_DIR/scripts/transcription funasr-fast VIDEO_PATH --track TRACK_INDEX --language LANGUAGE_CODE --output-dir VIDEO_DIR +uv run --directory SKILL_DIR/scripts/transcription funasr-fast VIDEO_PATH --track TRACK_INDEX --language AUDIO_LANGUAGE_CODE --output-dir VIDEO_DIR # 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, `SKILL_DIR` is the skill installation directory, and `LANGUAGE_CODE` is the explicit transcription language (for example `zh` for Mandarin Chinese). +Where `VIDEO_DIR` is the directory containing the video file, `SKILL_DIR` is the skill installation directory, and `AUDIO_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: @@ -411,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`, explicit `--language LANGUAGE_CODE`, 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 AUDIO_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. diff --git a/references/windows-funasr-uv-setup.md b/references/windows-funasr-uv-setup.md index a54712a..0236452 100644 --- a/references/windows-funasr-uv-setup.md +++ b/references/windows-funasr-uv-setup.md @@ -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 --language zh --output-dir $VideoDir -uv run --directory $TransDir funasr-nano $Video --track 3 --language zh --output-dir $VideoDir +uv run --directory $TransDir funasr-nano $Video --track 2 --language AUDIO_LANGUAGE_CODE --output-dir $VideoDir +uv run --directory $TransDir funasr-nano $Video --track 3 --language AUDIO_LANGUAGE_CODE --output-dir $VideoDir ``` Outputs should be written next to the video (`$VideoDir`). diff --git a/references/wsl-windows-uv-transcription.md b/references/wsl-windows-uv-transcription.md index 6918621..99d24c7 100644 --- a/references/wsl-windows-uv-transcription.md +++ b/references/wsl-windows-uv-transcription.md @@ -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 --language zh --output-dir $VideoDir +uv run --directory $SkillTranscription funasr-nano $Video --track 2 --language AUDIO_LANGUAGE_CODE --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 --language zh --output-dir "$VIDEO_DIR" +uv run --directory "$SKILL_TRANSCRIPTION" funasr-nano "$VIDEO" --track 2 --language AUDIO_LANGUAGE_CODE --output-dir "$VIDEO_DIR" ``` If the user installed the skill somewhere else, adjust `SKILL_TRANSCRIPTION` accordingly.