Skip to content

Spicy Lyrics parses with AMLLs parser instead of the proprietary one. - #344

Open
unatried wants to merge 3 commits into
Spikerko:mainfrom
unatried:parser
Open

Spicy Lyrics parses with AMLLs parser instead of the proprietary one.#344
unatried wants to merge 3 commits into
Spikerko:mainfrom
unatried:parser

Conversation

@unatried

@unatried unatried commented Aug 11, 2026

Copy link
Copy Markdown

Basically the title, I also formatted the project with bun run fmt but "I" only edited four or more (read 5.) files.

  1. src/components/LyricsManager/components/UploadTTMLModal.tsx
  2. src/utils/Lyrics/fetchLyrics.ts
  3. src/utils/Lyrics/manager/index.ts
  4. src/utils/Lyrics/manager/parseTTML.ts
  5. Whatever files bun edits when running bun add

Btw this is for an even bigger thing

@unatried

Copy link
Copy Markdown
Author

@greptile-apps

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces server-side TTML parsing with the AMLL client parser and routes local and remotely supplied raw TTML through the new normalization path.

  • Adds @applemusic-like-lyrics/ttml as a runtime dependency.
  • Converts AMLL lyric lines and words into the application’s line- and syllable-timed formats.
  • Runs local parsed lyrics through language and transliteration enrichment.
  • Updates the temporary-upload and network-fetch paths for the new parser result shape.

Confidence Score: 4/5

The PR is not yet safe to merge because word-timed TTML with background vocals still fails parsing and is surfaced as missing lyrics.

The undefined toSeconds calls remain in the background-vocal branch; when reached, the parser catches the resulting exception and returns null, which current callers interpret as a local cache miss or lyrics-not-found response.

Files Needing Attention: src/utils/Lyrics/manager/parseTTML.ts

Important Files Changed

Filename Overview
src/utils/Lyrics/manager/parseTTML.ts Replaces the server parser with AMLL conversion, but the previously reported undefined helper remains reachable for word-timed background vocals.
src/utils/Lyrics/manager/index.ts Parses locally stored TTML in-browser and enriches the normalized result before tagging it as local.
src/utils/Lyrics/fetchLyrics.ts Detects raw TTML network payloads, parses them locally, and preserves legacy object payload handling.
src/components/ReactComponents/LyricsManager/components/UploadTTMLModal.tsx Adapts temporary uploads to consume the parser’s normalized object directly.
package.json Adds the AMLL TTML parser runtime dependency.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Upload["Uploaded TTML"] --> Parse["ParseTTML / AMLL parser"]
  Network["Packed network response"] --> Unpack["SLObjPack.unpack"]
  Unpack -->|"raw TTML string"| Parse
  Parse --> Normalize["Line or syllable normalization"]
  Normalize --> Process["ProcessLyrics enrichment"]
  Process --> Render["Shared lyrics renderer"]
Loading

Reviews (3): Last reviewed commit: "How do these things keep slipping out of..." | Re-trigger Greptile

Comment thread src/utils/Lyrics/manager/parseTTML.ts
@unatried

Copy link
Copy Markdown
Author

@greptile-apps

Comment thread src/utils/Lyrics/manager/parseTTML.ts
@unatried

Copy link
Copy Markdown
Author

@greptile-apps

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