Skip to main content

Sound Library

sound library

Play music from the TikTok Sound Library in your effect. You can connect the Sound Library node to audio detection nodes, such as Volume Detection and Pitch Detection.

Input

NameData TypeDescription
Test MusicAudio StreamThe audio input for testing and previewing. When the effect is uploaded to the mobile end, the test audio stream will be disabled, and people can manually choose music from the TikTok Sound Library to play.

Output

NameData TypeDescription
AudioAudio StreamExecute this node, connect to a speaker to finish the connection and play the test audio or connect to a Detection Output to finish the connection without playing audio.

Example

note
  • When using the Sound Library node, if the audio isn’t selected by the user using your effect, there will be no audio playing.
  • Once Sound Library is added, any voice input will be overridden by the audio.

Scenario 1: Only Play Audio with Sound Library

You can link Sound Library to a detection node to perform more interactions. You do not need an Audio Resource Controller node in this example to play Sound Library.

Download the following file to see this example in Visual Scripting:

↓ sound_library_beats_detection.zip

note

You must connect the Sound Library node with the Speaker node to play a TikTok audio while recording. The adjusted volume here doesn’t affect the device volume.

add a detection node
tip

You can connect an Audio Resource node to test your detection logic. This won’t affect the Sound Library node playing. After the effect is uploaded to TikTok, the test audio will be disabled and replaced with the TikTok audio.

add an audio resource node

Scenario 2: Add Your Own Audio Along With Sound Library

If you want both your own audio and Sound Library, use the Audio Resource Controller node to play your audio.

add own audio