Theme
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.
| Runtime | Install | Import |
|---|---|---|
| Node.js 18+ | npm install aisha-ai | import { AishaClient } from 'aisha-ai' |
| Python 3 | pip install aisha-ai | from aisha_ai import AishaClient |
| CLI (no install) | — | npx aisha-ai ... |
1. Get a key
- Create a key in VoiceLab app.
- Export it:
bash
export AISHA_API_KEY=your_api_key2. 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 sttUseful 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-aits
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 status4. Python
bash
pip install aisha-aipython
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
| Feature | Methods |
|---|---|
| TTS sync / async | tts(), ttsStatus(), ttsHistory() |
| STT short audio | stt(), 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