High Latency (10-15s) on Tool Call confirmation wi...
# support
p
I have an assistant who confirms the order. I initially passed the order context in variables, but now I do it using a tool. The data I want to pass is JSON. { "jobId": "2ee8880a-4051-450b-ba02-8880697bc4df", "shippingAddress": { "firstName": "Jan", "lastName": "xxxx", "address1": "Warszawska 100A/1", "city": "Katowice", "postalCode": "00-001", "countryCode": "PL", "phone": "+xxxxxxxxxxx" }, "items": [ { "sku": "M1", "name": "The Multi-location Snowboard", "qty": 1, "price": 693.45, "variantId": "47466035151073", "productId": "9198231847137" } ], "totals": { "subtotal": 642.08, "tax": 51.37, "grandTotal": 693.45 }, "productInstructions": { "replacements": [ { "toSku": "P2", "reason": "Brak na magazynie", "fromSku": "M1" } ] }, "store": { "id": "store_98rur3437", "platform": "shopify", "name": "Fashion Store", "domain": "fashion.example" }, "order": { "orderId": "6749360455905", "orderNumber": "1025", "createdAt": "2025-11-23T08:27:10+00:00", "updatedAt": "2025-11-23T08:27:10+00:00", "currency": "USD", "financialStatus": "pending" }, "customer": { "customerId": "8751628648673", "email": "karine.ruby@example.com", "firstName": "Jan", "lastName": "Kowalski", "phone": "+xxxxxxxxxxx", "fullName": "Jan xxxxxxxxxxx" }, "customerName": "Jan Kowalski" } But in both cases. After receiving it, the system triggers the first message. Then there's a 10-second pause, sometimes longer... and then it says its own thing. It's always the same. Calling the endpoint and returning the JSON takes a while. Can someone help me solve this?
v
Thank you for sharing the details of your setup and the latency issue you're experiencing with large JSON contexts. Based on the information I have found, I do not have specific technical guidance or troubleshooting steps to address the high latency in your tool call confirmation process. If you have any additional details or specific error messages, feel free to share them, and I'll do my best to assist further with the information available.
t
The pause you’re seeing is likely because the assistant waits for the JSON tool to fully return before sending the first message. A faster approach is to preload or stream the data so it’s ready immediately, or optimize the endpoint to reduce response time. This ensures smoother, real-time confirmations. Are you aiming for instant replies or is a short delay okay? @pstanek
p
even if I call everything without calling the request, there is no change { "customer": { "name": "Jan Kowalski", "number": "+xxxxx" }, "assistantId": "70c67be4-5eb5-4c5d-9a2b-9bddae2f995e", "phoneNumberId": "877cc848-f11d-452a-ad8f-99d09a0218ad", "assistantOverrides": { "variableValues": { "items": [ { "qty": 1, "sku": "M1", "name": "The Multi-location Snowboard", "price": 693.45, "productId": "9198231847137", "variantId": "47466035151073" } ], "order": { "orderId": "6749360455905", "currency": "USD", "createdAt": "2025-11-23T08:27:10+00:00", "updatedAt": "2025-11-23T08:27:10+00:00", "orderNumber": "1024", "financialStatus": "pending" }, "store": { "id": "store_98rur3437", "name": "Fashion Store", "domain": "fashion.example", "platform": "shopify" }, "totals": { "tax": 51.37, "subtotal": 642.08, "grandTotal": 693.45 }, "customer": { "email": "karine.ruby@example.com", "phone": "+xxxxx", "fullName": "Jan Kowalski", "lastName": "Kowalski", "firstName": "Jan", "customerId": "8751628648673" }, "customerName": "Jan Kowalski", ........ "productInstructions": { "replacements": [ { "toSku": "P2", "reason": "Brak na magazynie", "fromSku": "M1" } ] } } } }
c
Hi, could you please provide a call id where you experienced this issue? We would like to review the logs to identify the cause.
p
019b12f2-109d-7113-818a-c612ffc4cb00 - incorrect transcriber, incorrect speech recognition 019b1307-d1b9-7663-a241-65f33540da89 - incorrect transcriber, incorrect speech recognition Questions: 1. Regardless of the transcriber chosen, it incorrectly recognizes speech, based on various parameter combinations. 2. Long pause between client and agent understanding (slow transcription). 3. Suggestions for a natural Polish voice that correctly pronounces numbers. In short. The agent often doesn't understand what is being said to him... and there are long pauses when the client says something and waits... for the agent to respond...
c
Hi, Thanks for sharing the call IDs and details. We reviewed the logs (including
019b12f2-109d-7113-818a-c612ffc4cb00
) and based on what we’re seeing, here are our recommendations: Speech recognition (Polish): - We strongly recommend switching to Deepgram Nova-2 with
language: pl
. - Enable
numerals: true
,
smartFormat: true
, and add Polish number keywords (e.g. jeden, dwa, trzy…) to improve number recognition. - Alternatively, AssemblyAI (pl) can also work well with word boosting for numbers. Voice quality (Polish): - Best results for Polish pronunciation (especially numbers) come from ElevenLabs (e.g. Adam / multilingual models). - Azure Polish voices (e.g.
pl-PL-MarekNeural
) are a good fallback. Latency & long pauses: - The pauses are mainly caused by transcription endpointing and VAD. - Reduce
endpointing
to \~250ms and tune
vadThreshold
(\~0.5). - Use faster TTS models (e.g. ElevenLabs turbo variants). - Large JSON contexts are fine, but response latency improves when endpointing and silence timeouts are tightened. Why the agent “doesn’t understand”: - This is usually a combination of: - Suboptimal transcriber for Polish - Missing number keywords / numerals support - High endpointing values causing delayed transcripts If you’d like, we can help you apply a fully optimized Polish configuration and review additional call IDs after you deploy the changes. Best regards, Kyle Vapi Support