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 reachlocalhost; use your own reverse proxy or a tunnel for testing).
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 yourADAPTER_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.
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/synthesizeand 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 ofWS /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, or503withRetry-Afterwhen synthesis is at capacity, so a VapifallbackPlanvoice can take over. See Error Handling. - Expression tags such as
[laugh]in the text Vapi sends are passed to Lokutor unchanged.