custom voice idle message doesn't work
# support
a
The problem is: From VAPI doesn't send me the request to my api custom voice. The other request is ok. This is the call id = 019a58c4-bbe2-7ee4-97eb-2f35d3c47d54 This is my config for custom voice: if (clientConfig?.squad?.isCustomVoice || sessionData?.isCustomVoice) { console.log("Usamos custom voice"); finalAssistant.voice = { provider: "custom-voice", server: { url:
https://api-channel-voice-${process.env.projectId}.europe-southwest1.run.app/api/synthesize
, credentialId: process.env.VAPI_CUSTOM_VOICE_CREDENTIAL_ID, headers: { 'x-cache-id': sessionData.idCache, 'x-session-id': sessionData.sessionId }, timeoutSeconds: 12 }, cachingEnabled: false, chunkPlan: { enabled: true }, fallbackPlan: { voices: [ { "provider": "11labs", "voiceId": "21m00Tcm4TlvDq8ikWAM" } ] } }; finalAssistant.firstMessageMode = "assistant-speaks-first-with-model-generated-message"; finalAssistant.hooks = [ { on: "customer.speech.timeout", options: { timeoutSeconds: 12, // dispara el idle a los 6s de silencio del usuario triggerMaxCount: 3, // hasta 3 veces durante la llamada triggerResetMode: "onUserSpeech" }, do: [{ type: "say", exact: ["¿Sigues ahí?", "¿Puedo ayudarte con algo más?"] }] } ]; } https://cdn.discordapp.com/attachments/1435944637830271116/1435944638136451072/image.png?ex=69467fa8&is=69452e28&hm=744b6540d01cb0232bfd9326eb622fc9a07a20d641df090b9955272f48c42d28&
c
Hi aivini, Here’s a quick summary of what happened based on the call logs you provided: --- ✅ What Went Wrong During the idle-message trigger, Vapi attempted to synthesize the phrase: “¿Puedo ayudarte con algo más?” But your custom voice server at:
Copy code
https://api-channel-voice-441671391645.europe-southwest1.run.app/api/synthesize
failed to return audio. The logs show: - The customer.speech.timeout hook fired correctly. - Vapi attempted the say action. - Speech synthesis failed (“Couldn't Generate Speech / Couldn't Get Speech”). - Because the synthesis never succeeded, the say request could not be completed. Shortly after, the call ended and Twilio’s WebSocket closed, which is why you see messages about not being able to send bytes — these are consequences, not causes. --- ✅ Root Cause The failure came directly from your custom voice service. Possible reasons: - The endpoint timed out (12-second timeout is set) - The service was down or unreachable - The response format wasn’t valid audio - Credentials/headers failed - The server returned an error status --- ✅ Fallback Not Used Your fallback plan (ElevenLabs voice) should have been triggered, but the logs don’t show any fallback attempt, meaning the failure likely happened before the fallback mechanism was invoked. --- ✅ Next Steps You’ll want to: 1. Check your custom TTS endpoint logs for errors at the timestamp around 2025-11-06T10:45:03.841Z. 2. Confirm the endpoint responds quickly enough (<12 seconds). 3. Test manually (e.g., curl) that the endpoint can synthesize the idle-message text. 4. Consider reducing complexity inside the custom TTS or increasing timeout temporarily.
a
Hi Kyle, Context • We’re using a custom-voice TTS service that returns PCM 16-bit mono @16kHz. • All regular say messages reach our /api/synthesize endpoint and play perfectly. • Only the idle message (triggered by customer.speech.timeout) never reaches our endpoint — there’s no incoming HTTP request for it in our Cloud Run logs. ⸻ Verification done 1. We tested the endpoint manually from Postman using the same payload Vapi sends: { "message": { "type": "voice-request", "text": "¿Puedo ayudarte con algo más?", "sampleRate": 16000, "voice": { "provider": "11labs", "voiceId": "7QQzpAyzlKTVrRzQJmTE", "model": "eleven_flash_v2_5" } } } and the same headers (X-Vapi-Secret, Content-Type: application/json). ✅ The endpoint responds in ~300–1600 ms and streams valid PCM audio. ✅ Postman correctly plays the returned audio after converting the PCM to WAV. ✅ Regular calls from Vapi (non-idle) hit the endpoint and stream fine. 2. During idle triggers, Vapi logs show: Hook ran on customer.speech.timeout and said: ¿Puedo ayudarte con algo más? Voice input: "¿Puedo ayudarte con algo más?" But our API never receives the POST that should correspond to that say. ⸻ Observation • Regular say events generate requests like: [PRE] POST /api/synthesize ua=axios/1.8.3 secret=yes TTFB ~300–1600 ms, ~50–80 KB streamed • For idle messages, there’s no POST at all to our service — even though the hook fires according to Vapi’s logs. • Since Postman and normal calls both work, it looks like the issue occurs before Vapi dispatches the HTTP request for the idle say. ⸻ Questions for your team Can you confirm that idle say uses the same voice provider pipeline as regular say? I need your help please Thanks, aivini
Hello Any updates? Thanks 🙂
Dont worry , The bug is hard to solve.
c
To answer your question, the same voice provider is used for
idle
messages as it is for
say
messages