TryVox

Play

Play an audio file on the call.

Play

The Play verb plays an audio file from a URL on the call.

Example

{
  "voxml_version": "1.0",
  "instructions": [
    {
      "verb": "Play",
      "url": "https://example.com/hold-music.mp3"
    }
  ]
}

Parameters

ParameterTypeRequiredDefaultDescription
urlstringyesURL of the audio file to play
loopintegerno1Times to repeat (0=infinite)

Supported Formats

TryVox supports the following audio formats:

  • WAV (recommended for best quality)
  • MP3
  • OGG

Audio files should be:

  • Mono or stereo
  • 8kHz or 16kHz sample rate (16kHz recommended)
  • Publicly accessible via HTTPS

Looping

Play audio multiple times:

{
  "verb": "Play",
  "url": "https://example.com/beep.wav",
  "loop": 3
}

Play audio continuously:

{
  "verb": "Play",
  "url": "https://example.com/hold-music.mp3",
  "loop": 0
}

Best Practices

  • Use HTTPS URLs for security
  • Keep audio files under 5MB for faster loading
  • Use 16kHz WAV files for optimal quality
  • Host files on a CDN for reliability

On this page