A pretty convenient CLI tool that reads and writes synced lyrics to MP3 files in SYLT (SYnchronized Lyrics/Text) format.
- Supported input formats: LRC, SRT, and VTT
- Configurable language codes (case-insensitive 3-letter ISO 639-2 codes, e.g.
eng,zho,und) - Read and display existing SYLT lyrics from MP3 files
- Creates output files with " - sylt" suffix to preserve originals
Still, backing up originals is recommended.
Visit the Releases page for pre-compiled binaries.
You can also build from source:
git clone https://github.com/mogita/go-sylt
cd go-sylt
go buildgo-sylt [--lang <code>] <mp3_file> [lyrics_file]Currently
go-syltsupports ID3v2.3 and ID3v2.4 tags only. For MP3 files with older or unsupported ID3 versions, please convert them to a supported version first. You can use tools like Kid3 for this purpose.
# Write SYLT lyrics to MP3 file
./go-sylt song.mp3 lyrics.lrc
# Write lyrics and specify English language
./go-sylt --lang eng song.mp3 lyrics.srt
# Write lyrics using VTT format in Chinese
./go-sylt --lang zho song.mp3 subtitles.vtt
# Read existing SYLT lyrics from MP3 file and display
./go-sylt song.mp3--lang accepts any 3-letter ISO 639-2 code and is case-insensitive (ENG, Eng, and eng are all accepted and stored as eng). Common values:
eng— Englishzho— Chinesejpn— Japanesekor— Koreanspa— Spanishfra— Frenchdeu— Germanund— undetermined (default)
For the full list, see the ISO 639-2 language code list.
The tool creates a new MP3 file with the same name as the input file but with " - sylt" appended before the extension. For example:
- Input:
song.mp3→ Output:song - sylt.mp3
When writing SYLT frames, go-sylt always uses:
- Text encoding: UTF-8 (ID3v2 encoding byte
0x03) - Timestamp format: absolute milliseconds (
0x02) - Content type: lyrics (
0x01)
This matches the format used by most modern players and avoids surrogate-pair pitfalls that affect UTF-16 handling. When reading SYLT frames, all four ID3v2 text encodings are supported (ISO-8859-1, UTF-16 with BOM, UTF-16 big-endian, UTF-8) so files written by other tools are readable.
If you need to write a non-UTF-8 SYLT frame, please open an issue describing your use case.
- github.com/bogem/id3v2/v2 - ID3v2 tag manipulation
Contributions are welcome! Should you find any issues or have any suggestions, kindly submit an issue or PR with the provided templates. Thank you!
- Go 1.21 or above
- golangci-lint for linting
# Run tests
go test -v
# Run linter
golangci-lint runVisit the Releases page, create a release on the main branch with a tag in the format of X.Y.Z or X.Y.Z-rc1. The workflow will automatically build and upload the binaries.
MIT © mogita