Dub
{
"verb": "dub",
"action": "addTrack",
"track": "ambient-noise",
},
{
"verb": "dub",
"action": "playOnTrack",
"track": "ambient-noise",
"play": "https://example.com/sounds/office-hubbub.mp3"
}
Function properties for the dub command:
Parameters
actionstringOne of 'addTrack', 'removeTrack', 'silenceTrack', 'playOnTrack', or 'sayOnTrack'.
gainstringA string value in the format "-6 dB" specifying decibels to boost or reduce the strength of the audio signal
(note: simple integer values accepted as well). The value supplied must be between ±50 dB.
loopbooleanIf true, loop the mp3.
playstringAn http(s) URL to an mp3 file to play into the track.
saystringText to convert to audio and play into the track.
trackstringLabel for the track.
The various options are:
addTrackadds an audio track to the conversation; once added, theplayorsaycommand may be used to inject audio into the trackremoveTrackremoves an audio track from the conversationsilenceTracksilences an audio track but leaves it in placeplayOnTrackplays audio from an http(s) mp3 url into the audio tracksayOnTrackgenerates text-to-speech into the audio track
Note: all tracks are automatically removed when the call completes, so if using an additional track for the entire conversation there is no need to explicitly remove it when the call ends.
Note: for convenience the addTrack and playOnTrack operations may be combined into a single addTrack Function; e.g.:
{
"verb": "dub",
"action": "addTrack",
"track": "ambient-noise",
"play": "https://example.com/sounds/office-hubbub.mp3",
"loop": true,
"gain": "-10 dB"
}