The problem — A sourcing agent gets a WhatsApp voice message: "5,000 units of IMD cases for iPhone 16 Pro Max, target $1.10, in a US warehouse within two weeks." Answering it means converting a factory-gate price into a landed cost — freight, volumetric weight, duty, MOQ breaks — then writing it up in English: 20-40 minutes of spreadsheet work per inquiry, every time. What we built — VoiceQuote turns that into one conversation. A salesperson speaks the inquiry in Chinese; the agent listens, decides which tools to call, computes the quotation, speaks the result back — risks included — and puts a client-ready English quotation on screen. How AssemblyAI is used — One WebSocket to the Voice Agent API (wss://agents.assemblyai.com/v1/ws) carries the whole loop: streaming STT (Universal-3 Pro), LLM routing and TTS, with no third-party glue. We publish the agent once via POST /v1/agents — system prompt, voice, greeting, 26 domain keyterms, two JSON-Schema tools. The model decides when to call analyze_inquiry and generate_quotation; the browser executes them and returns results on the same socket. GET /v1/sessions/{id} gives the per-turn timeline behind our video's numbers. The decision that matters — Every number in the quotation comes from a pure function, never from a language model: the model may listen, decide and speak, but it may not invent a price. Our first version let the LLM write it outright: a 3,924-character quotation was truncated to 356 characters mid-sentence, and numbers drifted between runs. The rewritten engine is deterministic and self-checking — it rejects its own output if the client-facing part contains Chinese, has no price, omits the Incoterm, or ends mid-sentence. Measured, not claimed — Live deployment: session.ready 0.58 s, 336 ms time-to-first-audio, 2/2 tool calls with no timeouts, and a 4,241-character client-facing quotation containing zero Chinese characters. 176 unit tests pass across 16 files.
Category tags: