Skip to content

feat: add syllable lyrics support - #345

Open
Suoerix wants to merge 2 commits into
glomatico:mainfrom
Suoerix:feat/syllable-lyrics
Open

Suoerix wants to merge 2 commits into
glomatico:mainfrom
Suoerix:feat/syllable-lyrics

Conversation

@Suoerix

@Suoerix Suoerix commented Aug 25, 2026

Copy link
Copy Markdown

Adds a --syllable-lyrics flag to download syllable (word-by-word) synced lyrics instead of line-by-line lyrics. Works with all synced lyrics formats (lrc, srt, ttml); with ttml you get the original Apple Music syllable TTML, pretty-printed with inline <span> elements preserved.

Changes

  • AppleMusicApi.get_song() accepts include_syllable_lyrics to request the syllable-lyrics include only when needed (default requests unchanged)
  • AppleMusicSongInterface.get_lyrics() reads the syllable-lyrics relationship when the flag is enabled; logs a warning if the track has no syllable lyrics
  • _get_lyrics() resolves per-<span> timings when a <p> contains <span> elements (word-level timestamps for LRC/SRT); line-level lyrics behave exactly as before
  • New gamdl/interface/ttml.py: TTML pretty-printer that keeps <span> elements inline and emits an XML declaration (minidom's toprettyxml() breaks inline content by inserting newlines)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant