module

MJ::Arcana::VoiceLanes

Which queue a voice request waits in, and how many of each run at once.

A lane is one limit a provider actually enforces, not one provider. ElevenLabs counts its models in families, each with its own ceiling per plan: on Starter, 3 at once for v3 and v2, and 6 for Flash and Turbo. Measured 2026-10-21: with three v3 lines running, a fourth was refused (429 concurrent_limit_exceeded), while a Flash line went straight through, its current-concurrent-requests header counting only itself against a maximum of 6. Songs are a third budget.

Like the camera's pools (PoolLimit), these are arcana-core lanes, waited for BEFORE a request takes a toolset slot, so a backlog in one lane holds up no other.

Lanes are per toolset. No provider serves both mj:camera and mj:voice under one limit today: OpenAI is in both, but limits each model on its own. A provider that did (Runware for speech as well as pictures) would need a lane the two toolsets share.

Constants

ELEVENLABS_PLANS = {"starter" => {3, 6}, "creator" => {5, 10}, "pro" => {10, 20}, "scale" => {15, 30}}

ElevenLabs' speech at once, by plan: v3 and v2, then Flash and Turbo (its models page and TTS FAQ, 2026-10-21; Starter's measured). A plan not listed here (Free, Business, Enterprise) gets Starter's, and a 429 is retried in any case.

OPENAI = 6
SONGS = 1

Songs: the plan allows 2 (Scale 5); 1 here, so songs, which take minutes, hold no more. OpenAI limits requests per minute rather than at once, so 6 is politeness.

SUBSCRIPTION = URI.parse("https://api.elevenlabs.io/v1/user/subscription")

Class methods

elevenlabs_tier

The account's plan ("starter", "pro", ...), asked of ElevenLabs when the service starts, so a change of plan takes a restart; nil if it can't be read.

Source
flash?(model : String) : Bool

eleven_flash_v2_5, eleven_turbo_v2_5 and their v2s share the higher limit.

Source
for(data : JSON::Any) : String | Nil

The lane for one request; nil for the tools that call no provider.

Source
limits(tier : String | Nil) : Hash(String, Int32)

How many of each lane run at once on the ElevenLabs plan tier.

Source