Types of granularity for lyric data. Accessible through Lyrics.type.

const externalMusicModule = require("LensStudio:ExternalMusicModule") as ExternalMusicModule;

@component
export class LyricsExample extends BaseScriptComponent {
// Make sure an AudioTrack asset is included in the scene. It determines the track that plays.
// If you see errors, make sure that "Bundled" is unchecked (disabled) on the AudioTrack.
@input audioAsset: AudioTrackAsset;

onAwake() {
const lyricsTracker = externalMusicModule.getLyricsTracker();

lyricsTracker.onLyricsAvailable.add(() => {
print("Is rich sync data available: " + (lyricsTracker.fullLyrics.type == LyricsType.RichSync));
});
}
}

Enumeration Members

Enumeration Members

LineSync: number

Lyrics data is only available for entire lines at a time. Each LyricsLine's syncs list will contain a single LyricsSync object, with its text property containing the entire line. This means that timing data is only available for entire lines of the song, and is not available for each individual word.

RichSync: number

Lyrics data is available for each word and space between words. Each LyricsLine's syncs list will contain a LyricsSync object for each word and space between words in the line. This means that timing data is available for each word in the tracked music.

Unset: number

Type is not set.

MMNEPVFCICPMFPCPTTAAATR