SDK Overview
Pick the HUMAIN Voice SDK for your server language, install it, and find the client for each workflow.
The JavaScript and Python SDKs wrap batch REST and Socket.IO. For HTTP streaming, call the
HTTP streaming API directly. For an OpenAI-compatible buffered
text-to-speech call (POST /v1/audio/speech), see the OpenAI-compatible speech guide (voice-dev today).
Available SDKs
| Language | Package | Install | Runtime |
|---|---|---|---|
| JavaScript and TypeScript | @humain-voice/sdk | npm install @humain-voice/[email protected] | Node.js or Bun (ES2021) |
| Python | humain-voice (import humain_voice) | python -m pip install humain-voice==0.18.1 | Python 3.10 or newer |
| Browser (Voice Agent) | @humain-voice/agent | npm install @humain-voice/[email protected] livekit-client | Modern browsers |
| Go | Coming soon |
Clients by workflow
Each workflow has its own client. To choose a workflow, see Concepts.
| Workflow | JavaScript class | Python class |
|---|---|---|
| Batch transcription | BatchTranscribeClient | stt.BatchTranscribeClient |
| Fast transcription | FastTranscriptionClient | stt.FastTranscriptionClient |
| Realtime transcription | RealtimeClient | stt.RealtimeClient |
| Live diarization | RealtimeDiarizationClient | stt.RealtimeDiarizationClient |
| Text to speech | TTSClient | tts.TTSClient |
| Voice Agent sessions (beta) | AgentClient (from @humain-voice/sdk/agent, 0.19.0-beta.1 or later) | agent.AgentClient (0.19.0b2 or later) |
Shared behavior
- Run every SDK on a server and keep the API key there. Connection settings are in Authentication.
- Create a client, use it, then close it:
finallyin JavaScript,async within Python. - Errors carry the
codeandretryablefields of theErrorResponse. Branch oncode, never on message text. - On
TTS_INPUT_NOT_ALLOWED, change the text before you retry. OnTTS_MODERATION_UNAVAILABLE, back off and retry. See Error codes.
Next steps
Models, languages, and voices
Look up every HUMAIN Voice language value, speech-to-text model, diarization level, text-to-speech model, and voice, with the matching SDK 0.18.1 constants.
JavaScript and TypeScript
Transcribe audio, build speaker timelines, and synthesize speech from Node.js or Bun with @humain-voice/sdk 0.18.1.