Skip to main content

LyricsType

Enum

Types of granularity for lyric data.

  • Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.

Platform details

  • Snapchat — Fully supported.

  • SPECS — Fully supported.

  • Camera Kit Web — Fully supported.

  • Camera Kit Mobile — Fully supported.

Since Lens Scripting v297

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

Index

Enumeration Members

Example

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

LineSync

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.

Since

Lens Scripting Version 297


RichSync

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.

Since

Lens Scripting Version 297


Unset

Unset: number

Type is not set.

Since

Lens Scripting Version 297