VoxEngine provides the Player module which allows you to play media files and text-to-speech blocks.
Before you use VoxEngine Player, first import it to the scenario via the require method:
Use the createTTSPlayer() function to create a text-to-speech player. It accepts the same arguments as the speech synthesis say() method. Refer to the speech synthesis article to learn about this method usage.
Use the createURLPlayer method to play media files. It accepts two arguments: the first is the media file URL string, the second argument is URLPlayerOptions. Follow this link to learn about player options.
After you created a TTS or an URL player, you need to broadcast it to an active call via the sendMediaTo method.
Refer to the code example below to understand how the Player module works: