MJ::Arcana::VoiceService
The voice service — ported out of the arcana server.
Arcana supplies the bus; it should not also own every provider integration, or it becomes a monolith with a bus inside it. The TTS provider code stays in arcana-ai (a library); what moves here is the EXPOSURE of it as a service.
Ported with one change worth having: arcana only ever exposed OpenAI, while arcana-ai has had a complete ElevenLabs provider sitting unused. Both are offered here, chosen per call.
Constants
arcana-ai's list stops at v2.5. Any model name passes through to ElevenLabs as given, but callers read this list to see what's there, so v3 has to be on it.
The fastest line measured came back in 0.6 s (Flash); a v3 sentence takes 3-5 s.
--- music ---------------------------------------------------------------------------
Eleven Music, called directly: arcana-ai has no music provider. It sings, but it takes no voice id, so a song is in a voice's manner, not its voice.
A plan or prompt it won't take comes back as one of these, often with a suggestion.
How long to wait for the provider to send something. OpenAI's gpt-4o-mini-tts sends its events only once the clip is done, which took 65-81 s for a 4-5 s clip on 2026-10-21, past arcana-ai's old fixed 60 s. 110 s answers inside the 120 s Overlore waits, rather than after it has given up.
--- the queue ------------------------------------------------------------------------
A request waits in its lane until there's room, so a burst queues here instead of being refused there. Two rules keep the queue honest.
- What nobody waits for isn't made. The caller gives up after its own wait
(Overlore: 120 s for a line), but its request stays queued, and once made it is
billed all the same. So a request whose caller has less than MIN_LEFT of its wait
left when its turn comes is answered
expired, unmade and unbilled. The wait runs from the envelope's timestamp, the sender's clock: fine on one host. - ElevenLabs at its limit anyway is waited out. The lanes keep mj under the plan's
limit, so a 429
concurrent_limit_exceededmeans someone else on the account (the website, another program) has lines running. ElevenLabs refuses those at once, unbilled; mj tries again after a pause while the caller still waits, then answersbusy.