SDKs

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

LanguagePackageInstallRuntime
JavaScript and TypeScript@humain-voice/sdknpm install @humain-voice/[email protected]Node.js or Bun (ES2021)
Pythonhumain-voice (import humain_voice)python -m pip install humain-voice==0.18.1Python 3.10 or newer
Browser (Voice Agent)@humain-voice/agentnpm install @humain-voice/[email protected] livekit-clientModern browsers
GoComing soon

Clients by workflow

Each workflow has its own client. To choose a workflow, see Concepts.

WorkflowJavaScript classPython class
Batch transcriptionBatchTranscribeClientstt.BatchTranscribeClient
Fast transcriptionFastTranscriptionClientstt.FastTranscriptionClient
Realtime transcriptionRealtimeClientstt.RealtimeClient
Live diarizationRealtimeDiarizationClientstt.RealtimeDiarizationClient
Text to speechTTSClienttts.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: finally in JavaScript, async with in Python.
  • Errors carry the code and retryable fields of the ErrorResponse. Branch on code, never on message text.
  • On TTS_INPUT_NOT_ALLOWED, change the text before you retry. On TTS_MODERATION_UNAVAILABLE, back off and retry. See Error codes.

Next steps

On this page