Custom TTS Issue
# support
j
Hi! I'm trying to use a custom TTS provider with Vapi (via their web widget). - I'm running a FastAPI server exposed publicly via a tunnel (tested via curl, works). - Endpoint: POST /synthesize (prints incoming requests). - Server runs with:
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
- Custom TTS Provider - Custom URL: https://.loca.lt/tts (confirmed it's correct) - Saved the agent after setting this - Using correct `assistantID`(e5eec97d-3f5d-4bdc-bf57-d479ead77a1a) in the script - Microphone access is allowed - Widget is rendered and starts listening - My FastAPI server never receives any request from Vapi - There are no errors shown in browser console or FastAPI logs - Widget just ends call after a few seconds with "Meeting has ended Here's the screenshot of console Any ideas or things I might be missing? I can share my FastAPI code and curl response if needed. Thanks in advance! https://cdn.discordapp.com/attachments/1397918938255327272/1397918938956042331/Screenshot_2025-07-24_at_5.59.17_PM.png?ex=688378f7&is=68822777&hm=9b9878ff7d9ab23ff52dc029a85a39e1cb18b56c826dc179f7dc1d0f27b2d09c&
c
Hi Jet Omnivore, To integrate your custom TTS provider with Vapi, ensure your FastAPI server is properly configured to handle Vapi's requests for text-to-speech conversion. Here's a quick checklist based on the [Custom TTS integration guide](https://docs.vapi.ai/customization/custom-voices/custom-tts): 1. **Endpoint Configuration**: - Ensure your FastAPI server's
/synthesize
endpoint is set up to accept POST requests from Vapi and return audio in the required raw PCM format. 2. **Vapi Request Handling**: - Make sure your server processes incoming requests by validating the message type and text content, and generates audio data as a response. - Your server must respond with
Content-Type: application/octet-stream
and include the audio data in the response body. 3. **Authentication**: - Use the secret token in the
X-VAPI-SECRET
header for secure Vapi requests to your server if you've set it up. 4. **Timeout and Headers**: - Configure a timeout setting that suits your TTS processing capabilities. Typically, this is set in the assistant configuration. - Ensure any additional required headers are correctly set in your server's response. 5. **Testing**: - Test your
/synthesize
endpoint directly using a tool like
curl
to verify that it returns the correct audio format and handles authentication correctly. If your setup aligns with these guidelines but issues persist, check for any errors in your server logs that might indicate problems with receiving requests or returning valid responses. Adjust your server configuration as necessary based on those logs.
j
I checked everything
in fact my server endpoint isn't logging any request
c
Can you send me latest call_id? Will take a look into it.
d
@Jet Omnivore Did you manage to solve the problem? I’m having the same issue — I’m not receiving anything on the backend.
j
Yes I did solve it
d
Can you provide me with an example of your assistant configuration? I’m using the one recommended by VAPI, but I’m not receiving anything on my backend. The first message is never triggered.
@Jet Omnivore this my config: "voice": { "server": { "url": "https://xxxx/api/synthesize", "headers": { "session-id": "xxxx", "x-vapi-secret": "xxx" }, "timeoutSeconds": 45 }, "provider": "custom-voice", "chunkPlan": { "enabled": false }, "fallbackPlan": { "voices": [ { "voiceId": "21m00Tcm4TlvDq8ikWAM", "provider": "11labs" } ] }, "cachingEnabled": false }, "firstMessage": "https://xxxx/first_message/test.mp3", "firstMessageMode": "assistant-speaks-first"
@User
j
You are getting the same error "meeting has ended due to ejection"?
as there in the screenshot
4 Views