Skip to main content
Vapi lets you bring your own speech providers: a custom transcriber (a WebSocket that receives the call audio and returns transcripts) and a custom voice (an HTTP endpoint that returns raw audio for a sentence). Lokutor is not a built-in Vapi provider. The open-source vapi-lokutor-adapter implements both of Vapi’s protocols and forwards to the Lokutor API, so you can use Lokutor in a Vapi assistant today by running that small service yourself.
The adapter was tested against Vapi’s published protocol documentation with a local mock, and against the live Lokutor API. It has not yet been run on a Vapi account. Treat the first call as a test, and tell us if Vapi behaves differently from its documentation.

How it fits together

Recognition covers English, Spanish, Catalan, Galician, Basque, Portuguese, French, Italian and German (languages). Voices are the slots F1-F5 and M1-M5. Usage is billed to your Lokutor account at the rate card prices: synthesis per character and recognition per second of audio sent. Every transcriber connection also counts as one of your account’s concurrent sessions.

1. Run the adapter

You need a Lokutor API key and a public HTTPS address for the adapter (Vapi cannot reach localhost; use your own reverse proxy or a tunnel for testing).
Always set ADAPTER_SECRET: without it, anyone who finds the URL can spend your Lokutor balance. The adapter accepts it as an x-vapi-secret header or as Authorization: Bearer <secret>. The other settings (default voice and language, upstream URL, timeout) are in the repository README.

2. Create the credential in Vapi

In the Vapi dashboard, add a Custom Credential of type Bearer Token whose token is your ADAPTER_SECRET, and note its id.

3. Configure the assistant

Vapi does not send a voice id to a custom voice, so put the voice and language in the server URL’s query string. For the transcriber, language fixes the recognition language; leave it out and Lokutor detects it.
Replace adapter.example.com with your adapter’s address. Use any language model Vapi supports; the model section is Vapi’s, not Lokutor’s.

Behaviour to know about

  • The voice is not streamed. The adapter waits for the whole sentence from POST /tts/synthesize and then answers, so time to first audio is the synthesis time of the full sentence plus the network hop to the adapter, not the streaming first-audio latency of WS /ws/tts.
  • Only the customer channel is transcribed. Vapi’s second (assistant) channel is ignored.
  • End of speech is Lokutor’s. An utterance ends after about 0.7 s without speech (Speech-to-Text); Vapi’s own endpointing settings do not apply to a custom transcriber.
  • Errors. If Lokutor refuses a synthesis (unknown voice, balance, capacity) the adapter answers 502, or 503 with Retry-After when synthesis is at capacity, so a Vapi fallbackPlan voice can take over. See Error Handling.
  • Expression tags such as [laugh] in the text Vapi sends are passed to Lokutor unchanged.
If you want a full voice agent rather than only speech providers, the hosted agent API runs recognition, the language model, tools and synthesis in one connection.