使用 FFmpeg 在本地转换、压缩、合并、分割、裁剪、检查和提取音频,并解码音乐缓存格式(包括纯 Python 编写的 Ximala 等)。
Use this skill for local audio processing through scripts/luis_audio_translator.py. It is portable: it does not contain personal paths, API keys, machine identifiers, or bundled proprietary binaries.
The core script works after download when Python is available and FFmpeg is installed on PATH. Ximalaya .xm decoding is built in and uses only Python. Other encrypted/cache formats may require optional local helper binaries.
scripts/kugou_audio_converter.py.info and duration-aware split.Resolution order:
--app-dir <engine-dir>.LUIS_AUDIO_TRANSLATOR_ENGINE_DIRLUIS_AUDIO_TRANSLATOR_FFMPEGLUIS_AUDIO_TRANSLATOR_FFPROBELUIS_AUDIO_TRANSLATOR_UMLUIS_AUDIO_TRANSLATOR_MUSIC_TOOLLUIS_AUDIO_TRANSLATOR_SILKLUIS_AUDIO_TRANSLATOR_KGG_HELPERLUIS_AUDIO_TRANSLATOR_KUGOU_INFRA_DLLLUIS_AUDIO_TRANSLATOR_KUGOU_DBPATH for ffmpeg and ffprobe.Do not put user-specific paths in SKILL.md. If a machine needs a local engine directory, set an environment variable outside the skill.
Resolve paths relative to the directory containing this SKILL.md.
Check dependency status:
powershell
python scripts/luis_audio_translator.py diagnose
Convert or extract audio:
powershell
python scripts/luis_audio_translator.py convert "input.mp4" --format mp3 --bitrate 192k --output-dir "out"
Compress:
powershell
python scripts/luis_audio_translator.py compress "input.wav" --format mp3 --bitrate 96k --output-dir "out"
Merge:
powershell
python scripts/luis_audio_translator.py merge "a.mp3" "b.wav" --format mp3 --output-dir "out" --basename "merged"
Split:
powershell
python scripts/luis_audio_translator.py split "input.mp3" --segment-seconds 300 --format mp3 --output-dir "out"
Clip:
powershell
python scripts/luis_audio_translator.py clip "input.mp3" --start 00:01:20 --duration 45 --format wav --output-dir "out"
Inspect:
powershell
python scripts/luis_audio_translator.py info "input.flac"
Decode local cache input:
powershell
python scripts/luis_audio_translator.py decrypt "input.ncm" --output-dir "out"
Decode Ximalaya .xm input:
powershell
python scripts/luis_audio_translator.py decrypt "input.xm" --output-dir "out"
Convert Kugou special formats:
powershell
python scripts/kugou_audio_converter.py diagnose --app-dir "<engine-dir>"
python scripts/kugou_audio_converter.py convert "KugouMusic" --format mp3 --output-dir "out" --recursive --app-dir "<engine-dir>"
Common output formats: mp3, wav, ogg, flac, m4a, m4r, mp2, aiff, ac3, wma, amr, aac, opus, caf, au, mka, webm.
Kugou special input formats handled by kugou_audio_converter.py: .kgm, .kgma, .kgtemp, .kgm.flac, .kgg.
Ximalaya input handled by luis_audio_translator.py decrypt: .xm.
Special output handling:
amr forces 8000 Hz mono.flac uses signed 16-bit sample format.m4r uses an MP4 container.Read references/core-behavior.md for supported input-extension lists and optional decode helper behavior.
--print-command prints full local paths and should be used only for debugging.diagnose reports no FFmpeg, install FFmpeg or set LUIS_AUDIO_TRANSLATOR_FFMPEG.split fails but convert works, install FFprobe or set LUIS_AUDIO_TRANSLATOR_FFPROBE..xm are optional and environment-specific; ordinary conversion and .xm decoding should not depend on them..kgg conversion needs kgg-helper and a compatible local Kugou infra.dll; KGMusicV3.db is used when available. Run the Kugou converter's diagnose command first..xm decoding is implemented in pure Python and does not require Node.js, WebAssembly, or external helpers.scripts/luis_audio_translator.py relative to SKILL.md, not by using a machine-specific absolute path.python scripts/luis_audio_translator.py diagnose.python -m py_compile scripts/luis_audio_translator.py scripts/kugou_audio_converter.py scripts/xm_audio_decoder.py.python scripts/xm_audio_decoder.py --self-test.info, convert, merge, and split.