SDKs & Libraries
Use our official SDKs to integrate VoiceMaker into your applications with minimal
code. Both libraries are published as myvoicemaker and cover all five modules:
ASR, TTS, Animate, Explain, and Usage.
Python SDK
Installation
pip install myvoicemakerQuick start
from myvoicemaker import VoiceMaker
client = VoiceMaker(api_key="vmk_live_a1b2c3d4e5f6_8h9i0jKLmnOPqrSt")
# Generate speech
result = client.tts.generate(
text="Ẹ kú àárọ̀.",
voice_id="amara-okafor-female-conversational",
language="yo",
)
print(result.audio_url)
# Transcribe and wait for the result
job = client.asr.transcribe("https://example.com/audio.wav", language="ha")
final = client.asr.poll(job.job_id, timeout_seconds=120)
print(final.text)Available methods
| Method | Description |
|---|---|
client.asr.transcribe(...) | Submit a transcription from a URL |
client.asr.transcribe_file(...) | Submit a transcription from a local file |
client.asr.get_result(job_id) | Fetch a transcription result |
client.asr.list(...) | List transcription jobs |
client.asr.poll(job_id) | Wait for a job to complete |
client.asr.stream(...) | Real-time streaming transcription over WebSocket |
client.tts.list_voices(...) | List available voices |
client.tts.generate(...) | Generate speech (mode="async" queues the job instead) |
client.tts.get_result(id) / client.tts.poll(id) | Fetch / wait for an async TTS job |
client.tts.stream(...) | Real-time streaming speech synthesis over WebSocket |
myvoicemaker.chunk_text(...) | Split text into sentence-sized chunks for streaming |
client.animate.generate(...) | Submit a lip-sync animation |
client.animate.get_result(job_id) | Fetch an animation result |
client.animate.poll(job_id) | Wait for an animation to complete |
client.usage.get_balance() | Get the credit balance |
client.usage.get_breakdown(...) | Get usage by module |
client.explain.process(...) | Explain, summarize, translate, or simplify text |
Node.js SDK
Installation
npm install myvoicemaker
# or
bun add myvoicemakerQuick start
import { VoiceMaker } from "myvoicemaker";
const client = new VoiceMaker({ apiKey: "vmk_live_a1b2c3d4e5f6_8h9i0jKLmnOPqrSt" });
// Generate speech
const result = await client.tts.generate({
text: "Ẹ kú àárọ̀.",
voice_id: "amara-okafor-female-conversational",
language: "yo",
});
console.log(result.audio_url);
// Transcribe and wait for the result
const job = await client.asr.transcribe({
audio: "https://example.com/audio.wav",
language: "ha",
});
const final = await client.asr.poll(job.job_id, { timeoutMs: 120_000 });
console.log(final.text);
// Real-time streaming (browsers, Node >= 22, Bun, Deno)
const stream = client.asr.stream({ language: "yo" });
stream.on("transcript", (t) => console.log(t.is_final ? "FINAL" : "…", t.text));
stream.sendAudio(pcmChunk); // PCM16LE mono
await stream.close();
// Real-time streaming TTS: hear audio while later text still synthesizes
import { createPcmPlayer } from "myvoicemaker";
const tts = client.tts.stream({ voiceId: "amaka", language: "auto" });
const player = createPcmPlayer(); // browser Web Audio helper
tts.on("audio", ({ data }) => player.enqueue(data));
tts.sendText("Barka da zuwa. Yaya kake a yau?");
await tts.close();The JavaScript SDK exposes the same modules with camelCase method names
(listVoices, getResult, getBalance, getBreakdown) and typed error classes
(AuthenticationError, InsufficientCreditsError, RateLimitError, and more).
Errors in both SDKs name the SDK method that failed and carry the API's
errorCode as err.code / e.code — see Error Codes for the
catalog and the class each code maps to.
Streaming helpers chunkText, createPcmPlayer (browser playback) and
pcmChunksToWav (WAV assembly) ship with the package. See
Transcription → Real-time streaming and
Text-to-Speech → Real-time streaming
for the full streaming protocols.
REST API only
If your language isn't listed above, you can call the REST API directly — every
endpoint is documented in this reference. Both SDKs default to the base URL
https://api.myvoicemaker.ai and target the /dev/v1 routes.