Skip to content

Libraries & SDK

The easiest way to use VoiceLab TTS/STT without wiring raw HTTP.

Package name is still aisha-ai (npm + PyPI). Same API key, same backend.

RuntimeInstallImport
Node.js 18+npm install aisha-aiimport { AishaClient } from 'aisha-ai'
Python 3pip install aisha-aifrom aisha_ai import AishaClient
CLI (no install)npx aisha-ai ...

Links: npm · PyPI · source

1. Get a key

  1. Create a key in VoiceLab app.
  2. Export it:
bash
export AISHA_API_KEY=your_api_key

2. CLI (fastest smoke test)

bash
npx aisha-ai tts "Salom dunyo" --model Gulnoza --out salom.wav
npx aisha-ai stt ./audio.wav
npx aisha-ai history tts
npx aisha-ai history stt

Useful flags:

  • --out <path> — write TTS audio to disk
  • --json — machine-readable STT output
  • --model Gulnoza / --mood Neutral / --speed 1.0 — Uzbek TTS options

3. Node.js

bash
npm install aisha-ai
ts
import { AishaClient } from "aisha-ai";

const client = new AishaClient({
  apiKey: process.env.AISHA_API_KEY!,
});

// Text → speech
const tts = await client.tts({
  transcript: "Salom dunyo",
  language: "uz",
  model: "Gulnoza",
  mood: "Neutral",
  speed: 1,
  // optional: outputPath: "./salom.wav",
});
console.log(tts.audioUrl);

// Speech → text
const stt = await client.stt({
  file: "./audio.wav",
  language: "uz",
});
console.log(stt.transcript);

// History
await client.ttsHistory({ page: 1, limit: 10 });
await client.sttHistory({ page: 1, limit: 10 });

Async TTS (webhook):

ts
const job = await client.tts({
  transcript: "Async example",
  language: "uz",
  webhookNotificationUrl: "https://example.com/webhooks/tts",
});
// poll with client.ttsStatus(job.taskId) when you need status

4. Python

bash
pip install aisha-ai
python
from aisha_ai import AishaClient

client = AishaClient()  # reads AISHA_API_KEY

tts = client.tts(transcript="Salom dunyo", language="uz", model="Gulnoza")
print(tts.audio_url)

stt = client.stt(file="./audio.wav", language="uz")
print(stt.transcript)

What the SDK covers today

FeatureMethods
TTS sync / asynctts(), ttsStatus(), ttsHistory()
STT short audiostt(), sttHistory()

For long-form STT v2, realtime WebSocket, and gRPC, use the HTTP/WS/gRPC docs under TTS / STT in the sidebar — those are not fully wrapped yet.

When to use SDK vs raw API

  • SDK / CLI — app backends, scripts, demos, agent tool handlers
  • Raw HTTP — non-Node/Python stacks, custom streaming, v2 long STT
  • Agents — give them llms-api.txt + this page; see For AI agents

Next