Install
openclaw skills install @hanshojin/cd2flacConvert CD audio archives (RAR files containing WAV+CUE pairs) into organized FLAC files. Handles RAR extraction, CUE-based track splitting, GBK encoding fix for Chinese filenames, multi-CD album organization, and auto-fetch synced lyrics from Netease Cloud Music (with Kugou fallback). Use whenever someone needs to extract and convert CD-quality audio archives (WAV+CUE in RAR/7z/ZIP) to per-track FLAC files. Also handles direct WAV+CUE pairs without archives.
openclaw skills install @hanshojin/cd2flacTool to extract CD audio from RAR archives and convert WAV+CUE pairs into individual FLAC tracks with correct names and synced lyrics.
unrar, cuetools, shntool, flacsudo apt-get install -y unrar cuetools shntool flacmutagen (FLAC tag handling)pycryptodome (Netease API encryption)pip3 install mutagen pycryptodomepython3 skills/cd2flac/scripts/cd2flac.py <directory> [options]
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/"
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/" --lyrics
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/" --lyrics-only
python3 skills/cd2flac/scripts/lyric.py "/path/to/album/"
python3 skills/cd2flac/scripts/lyric.py "/path/to/track.flac"
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/albums/" --dry-run
python3 skills/cd2flac/scripts/cd2flac.py "/path/" --keep-wav --delete-rar
python3 skills/cd2flac/scripts/cd2flac.py "/path/" --recursive --lyrics
python3 skills/cd2flac/scripts/cd2flac.py "/path/to/album_with_wav/"
shnsplit to split each WAV into individual FLAC tracksCD1/, CD2/, etc. subdirectoriesLyrics are fetched using the same strategy as ESLyric:
Synced LRC is embedded as Vorbis comment LYRICS tag. If Netease provides
translation lyrics, they go in LYRICS_TRANSLATIONS tag.
The script auto-detects and fixes GBK→UTF-8 mojibake in track names by comparing the actual filename bytes against the CUE sheet's GBK-encoded titles.
If a directory contains multiple WAV+CUE pairs, they are treated as separate
discs and placed into CD1/, CD2/, etc. subdirectories.
If the RAR is already extracted but not yet converted, the script detects the WAV+CUE pairs and processes them directly.
find /path/to/music -name "*.flac" -exec dirname {} \; | sort -u | \
xargs -I{} python3 skills/cd2flac/scripts/lyric.py "{}"