Skip to content

Commit

Permalink
Include syllabe end timestamp in word by word lyrics
Browse files Browse the repository at this point in the history
Also remove leading spaces
  • Loading branch information
Lambada10 committed Nov 18, 2024
1 parent 80141c2 commit 0bb9f17
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class AppleAPI {

if (multiPersonWordByWord) {
syncedLyrics.append(
if (line.oppositeTurn) "v2: " else "v1: "
if (line.oppositeTurn) "v2:" else "v1:"
)
}

Expand All @@ -90,18 +90,20 @@ class AppleAPI {
if (!syllable.part) {
syncedLyrics.append(" ")
}
syncedLyrics.append("<${syllable.endtime?.toLrcTimestamp()}>")
}

if (line.background && multiPersonWordByWord) {
syncedLyrics.append("<${line.text.last().endtime?.toLrcTimestamp()}>\n")

syncedLyrics.append("[bg: ")
syncedLyrics.append("[bg:")

for (syllable in line.backgroundText) {
syncedLyrics.append("<${syllable.timestamp!!.toLrcTimestamp()}>${syllable.text}")
if (!syllable.part) {
syncedLyrics.append(" ")
}
syncedLyrics.append("<${syllable.endtime?.toLrcTimestamp()}>")
}

syncedLyrics.append("<${line.endtime.toLrcTimestamp()}>]\n")
Expand Down

0 comments on commit 0bb9f17

Please sign in to comment.