Skip to main content

Speech with a little more personality

Hey, kittens. Welcome in. KittenML makes small speech models that pay attention to more than the words: EmoKitten ASR preserves expression in a transcript, while KittenTTS turns text into a voice with one of three tiny, free models.

Every hosted API is available from one hostname:

https://api.kittenml.com

Choose an endpoint

ProtocolEndpointUse it for
HTTPSPOST /v1/audio/transcriptionsTranscribe a complete audio file
WebSocketWSS /v1/stt/realtimeStream audio and receive partial transcripts
WebRTC/v1/realtime/client_secrets + /v1/realtime/callsStream a browser microphone without exposing a permanent API key
HTTPSPOST /v1/audio/speechStream generated speech

Upload STT, realtime STT, and streaming TTS are the three public inference operations. Realtime STT supports both server-side WebSocket clients and browser WebRTC clients. Older realtime helper routes are not part of the public contract.

All three endpoints require a KittenML API key. The KittenTTS 0.8 models are free, but authentication is still required.

The fastest way to learn the API is to run an example, change it, and see what happens. Test it. Break it. If something sounds strange, tell us what you heard.

Create or manage an API key in the KittenML Playground.

Try speech to text

export KITTENML_API_KEY="sk_kitten_live_..."

curl --fail-with-body -sS \
https://api.kittenml.com/v1/audio/transcriptions \
-H "Authorization: Bearer $KITTENML_API_KEY" \
-F "file=@speech.wav" \
-F "model=emokittenasr-realtime" \
-F "response_format=json"

An abridged response looks like this:

{
"text": "A cold, lucid indifference reigned in his soul.",
"enriched_text": "[low][slow]A (cold), [pause_short] (lucid) (indifference) reigned in his (soul).[/slow][/low]",
"accent": "General American",
"request_id": "<request-id>"
}

text is the clean transcript. enriched_text, accent, and tags are KittenML extensions that preserve vocal delivery information when the model detects it.

Try text to speech

curl --fail-with-body -sS \
https://api.kittenml.com/v1/audio/speech \
-H "Authorization: Bearer $KITTENML_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "kitten-tts-mini-0.8",
"input": "Hello from the KittenML API.",
"voice": "Bella",
"response_format": "mp3",
"stream_format": "audio"
}' \
--output kitten-output.mp3

Next steps