Text-to-speech, transcription, and voice cloning for the MikeOS ecosystem.
646 languages, on MikeOS hardware. Base URL https://voice-api.osmike.com.
Every /v1/* endpoint requires a caller identity. Two schemes are accepted:
| Scheme | Header | Notes |
|---|---|---|
| OAuth Bearer (preferred) | Authorization: Bearer <JWT> | RS256 JWT from account.osmike.com, validated locally via JWKS. |
| Legacy API key | X-API-KEY: <key> | Resolved to a user via account.osmike.com (cached ~5 min). |
Missing/invalid credentials → 401. The public audio endpoint (below) needs no auth.
| Field | Type | Description |
|---|---|---|
text | string (required) | The text to speak. May contain voice tags. |
voice | string | A voice id from /v1/voices, one of your cloned ids, or "random" (default → a Quick English voice). |
language | string | Optional ISO 639-1 hint. Omit to auto-detect. |
speed | number | 0.5–2.0 (default 1.0). |
Short/cached requests render synchronously and return 200; slow ones return
202 with a job_id to poll. Either way the audio is a
content-addressed MP3 at url.
curl -X POST https://voice-api.osmike.com/v1/tts \
-H "X-API-KEY: $KEY" -H 'Content-Type: application/json' \
-d '{"text":"Welcome to MikeOS.","voice":"expr-voice-2-f","speed":1.0}'
# → {"status":"done","url":"/audio/<md5>.mp3","voice":"expr-voice-2-f",
# "duration_ms":1840,"cached":0,"new":1}
# or, for a slow render:
# → 202 {"status":"queued","job_id":"…","voice":"…","poll":"/v1/tts/<job_id>"}
Assign voices (and per-span speed) inside one text for dialogue/multi-voice. Text
outside a tag uses the request voice. A Designer/cloned span renders as one call for a
consistent speaker.
<osmike_voice id="atlas">Hi, I'm Atlas.</osmike_voice>
<osmike_voice id="ivy" speed="1.1">And I'm Ivy!</osmike_voice>
Back to the default narrator here.
When you omit language, the input language is detected automatically (all languages).
Non-English text is routed to a multilingual voice; an English-only "Quick" voice is upgraded
automatically. An explicit language always wins.
curl https://voice-api.osmike.com/v1/tts/$JOB -H "X-API-KEY: $KEY"
# → {"job_id":"…","status":"queued|processing|done|error",
# "url":"/audio/<md5>.mp3","duration_ms":154008,"cached":2,"new":24}
multipart/form-data. English-first; the engine handles other languages too.
| Field | Type | Description |
|---|---|---|
audio | file (required) | Audio clip (wav/mp3/m4a/webm/ogg…). |
language | string | ISO 639-1 (default en); auto to detect. |
response_format | string | json (default) · text · srt · vtt · verbose_json. |
curl -X POST https://voice-api.osmike.com/v1/stt \
-H "X-API-KEY: $KEY" -F audio=@clip.wav -F language=en
# → {"text":"…transcribed text…","language":"en"}
Returns the catalog: Quick (English, fast) + Designer (voice-design) voices, each with
{id,name,group,engine,requires_login}. Use an id as the voice in TTS.
Create a private voice from a reference sample. Only clone your own voice, or a voice you have explicit permission to use — consent is required and recorded.
| Field | Type | Description |
|---|---|---|
name | string (required) | A label for the voice. |
sample | file (required) | ~10–30 s reference recording of the voice. |
consent | file | A short recording of the speaker giving consent. |
consent_text | string (required) | The spoken consent statement, as text. |
attest | bool (required) | Must be true — you own the voice or have permission. |
curl -X POST https://voice-api.osmike.com/v1/voices/clone \
-H "X-API-KEY: $KEY" \
-F name="My narration" -F sample=@me.wav \
-F consent=@consent.wav -F consent_text="I consent to cloning my voice." -F attest=true
# → 201 {"id":"<profile_id>","name":"My narration","kind":"clone"}
# then synthesize with it:
curl -X POST https://voice-api.osmike.com/v1/tts \
-H "X-API-KEY: $KEY" -H 'Content-Type: application/json' \
-d '{"text":"Spoken in my cloned voice.","voice":"<profile_id>"}'
List or delete your cloned voices. Deleting also revokes the stored consent. A cloned voice is
usable only by the caller who created it (others get 400 unknown voice).
Public, no auth — an opaque, content-addressed MP3 (the id is unguessable). This is the
url returned by TTS/jobs.
| Code | Meaning |
|---|---|
400 | Bad request (e.g. unknown voice id). |
401 | Missing/invalid auth. |
413 | Text/audio too large (see per-endpoint caps). |
422 | Validation error (missing required field / consent). |
429 | Rate limited — back off and retry. |
502 / 503 / 504 | Engine error / feature unavailable / timeout. |
Errors return JSON {"detail":"…"} (or {"error":…,"message":…} for gated flows).