Music Lyrics
The Music Lyrics
custom component enhances your Lens by displaying song lyrics with the music playing in the background. Bring music to life with visualized lyrics. You can design the way the lyrics stream into the Lens by styling the text like you would any other text in a Lens. For example, customize color and font, choose 2D or 3D text, animate the words, and leverage physics.
Combine the Lyrics with an ML Face Effect
or Immersive ML
to create a full effect or tap into other creative visuals. Lenses leveraging the Lyrics API allow Snapchatters to engage with music in a new way: challenge friends to a rap battle, Snap a musical moment, and sing along with friends.
Music Lyrics custom component is not compatible with Spectacles
and CameraKit
.
Music Lyrics can not be used in sponsored Lenses. Learn more in the Music on Snapchat Guidelines.

Usage
-
To add the
Music Lyrics
to your Lens, go to the Asset Library and find theMusic Lyrics
in theCustom Components
section. -
Once you click the
Install
button, you can find this component in theAsset Browser
and add it to your resources to build the Lens. -
In the Asset Library, select the track that will play when your lens is swiped on by the user. Tracks are located in the
Music
section. -
Make sure to uncheck the
Bundled
option for the selected track — this allows the user to change the track in your lens on their own. The component will not work if this option is enabled.While you can assign the audio which lyric will be shown by default, Snapchatters can change the music while using your Lens in the app to fit their needs, and the component will automatically show the corresponding lyrics!
In this context toggling off
Bundled
means we are only including the music id, and not "bundling" the audio file itself. -
Drag the custom component into the scene from resources or add it to an empty scene object.
-
Fill in the input data for the custom component.
Inputs
Music Track: AudioTrackAsset
- add the track downloaded from the Asset Library.
Show mode: combobox
- when selecting the Word
type, the song lyrics will be displayed word by word. When selecting the Line
type, a specified number of lines of the song will be displayed on the screen.
Text Placeholders: SceneObject[]
- add scene objects that have a Text Component
and/or Text3D
where the text will be displayed.
API
lyricsTracker: LyricsTracker
Returns the LyricsTracker
of the current track.
externalMusicModule: ExternalMusicModule
Returns an ExternalMusicModule
that is used in the component.
clipDuration: number
Returns the duration of the current track.
lines: LyricsLine[]
Returns an array of the track's text lines.
fullLyrics: Lyrics
Returns the Lyrics of the current track.
currentLine: LyricsLine
Returns the active line of text.
highlightFirstLine: boolean
Allows enabling or disabling additional text outlining for the first line of text in 2D animation.