How can we play an mp3 audio file ( recorded discl...
# support
d
How can we play an mp3 audio file ( recorded disclosure) before the agent say its greetings. Please send me video tutorials and documentation. Thank you
c
Hi DanToy, To play an MP3 audio file, such as a recorded disclosure, before the agent's greeting, you can utilize the Live Call Control features in Vapi. Here's how you can set it up: 1. **Initiate the Call**: When you initiate the call using the
/call
endpoint, you'll receive a
controlUrl
. 2. **Play Audio Clip**: Use the
controlUrl
to send a
say
command with the URL of your MP3 audio file. Here's a sample curl request:
Copy code
bash
   curl -X POST 'https://your-control-url' \
   -H 'content-type: application/json' \
   --data-raw '{
     "type": "say",
     "content": "[URL_OF_YOUR_AUDIO_CLIP]",
     "endCallAfterSpoken": false
   }'
Replace
[URL_OF_YOUR_AUDIO_CLIP]
with your actual audio file URL. For further details, you can refer to Vapi's [Live Call Control](https://docs.vapi.ai/calls/call-features) documentation. Please let us know if this works on your end.
4 Views