How can I tool call to play audio file through cal...
# support
k
Is there a way to play audio file through call with a tool call?
v
Currently, Vapi's tool calling system does not document a built-in way to play an arbitrary audio file through a call using a tool call—only text-to-speech ("say" message) is supported out of the box. To help further: Are you looking to play a specific pre-recorded audio file (not TTS) during a call, and if so, do you need this to be triggered dynamically via a tool call or would a static solution work for your use case? Sources: - [Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) - [Vapi Tools Overview](https://docs.vapi.ai/tools) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
v
You can return the message as audio file link which will do the trick.
k
So I put in the say response or response parameter? How should the response look?
v
Vapi's "say" tool call only supports text-to-speech, not direct audio file playback. To use the "say" action, your response should look like this:
Copy code
json
{
  "type": "say",
  "content": "This is the message to speak.",
  "endCallAfterSpoken": false
}
There is no documented way to play an audio file by providing a file link in the "say" or "response" parameter—only TTS is supported officially. Sources: - [Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
k
So what type of response is needed to return the audio then?
v
Vapi does not support returning or playing an audio file through a tool call. The only supported way to play audio is via text-to-speech using the
"say"
action, like this:
Copy code
json
{
  "type": "say",
  "content": "This is the message to speak.",
  "endCallAfterSpoken": false
}
Providing an audio file link or binary in the response will not play the audio—only TTS is supported for tool calls at this time. [See Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) Sources: - [Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
k
But your rep just said it could be done
v
To clarify: According to official Vapi documentation, you cannot play an audio file through a tool call—only text-to-speech via the
"say"
action is supported. Providing an audio file link in the response will not play the audio. Could you clarify if you are looking for an official solution, or are you interested in potential (but unsupported) workarounds? Sources: - [Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
k
What about server messages?
Tool calls see messages to be exact
Server messages
v
According to official Vapi documentation, you cannot play an audio file through a tool call or server message—only text-to-speech via the
"say"
action is supported.
Are you looking for an official solution only, or are you interested in exploring potential (but unsupported) workarounds? Sources: - [Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools) - [Vapi Server URL Events](https://docs.vapi.ai/server-url/events)
According to Vapi's official documentation, only text-to-speech (TTS) playback is supported during calls—even when using server messages or tool calls. There is no documented way to play an audio file by returning a file link or binary in any response; these will not result in audio playback. If you are specifically looking for an officially supported solution, TTS is the only option. To clarify: Are you interested in exploring potential (but unsupported) workarounds, or do you only want officially documented solutions? Sources: - [Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
To confirm: Vapi only supports text-to-speech playback via the
"say"
action, and providing an audio file link will not play the audio during a call. Server messages are not documented as a way to inject audio playback either. Are you looking strictly for an official, documented solution, or are you interested in exploring potential (but unsupported) workarounds? Sources: - [Vapi Call Features Documentation](https://docs.vapi.ai/calls/call-features) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools) - [Vapi Server URL Documentation](https://docs.vapi.ai/server-url)
v
It should be a wav file, you just need to send back the request-start message and it will do the trick. { "results": \[ { "toolCallId": "{{ $('Webhook').item.json.body.message.toolCalls\[0\].id }}", "message": { "type": "request-complete", "content": {{ $json.response }} }, "result": {{ $json.response }} } \] } content part will be your audio file link in wav format.
2 Views