From deepdub-tts
Add Deepdub text-to-speech, voice cloning, streaming speech, voice presets, or Deepdub SDK/API usage to JavaScript, Python, REST, or CLI projects. Use when the user mentions Deepdub, TTS, text-to-speech, speech synthesis, voice generation, voicePromptId, voiceReference, audio streaming, or generating audio files.
How this skill is triggered — by the user, by Claude, or both
Slash command
/deepdub-tts:deepdub-ttsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to make Deepdub TTS integration frictionless and production-ready.
Use this skill to make Deepdub TTS integration frictionless and production-ready.
DEEPDUB_API_KEY to env docs, never hardcode user keys.voicePromptIdvoiceReference from an audio file, buffer, or base64DEEPDUB_API_KEYdd-00000000000000000000000065c9cbfe50a537cf-1ec8-4714-b07e-c589ab76be4bbd1b00bb-be1c-4679-8eaa-0fcbfd4ff773en-US unless user asks otherwisemp3 for REST/file downloads, wav for WebSocket streamingnpm install @deepdub/nodepip install deepdubhttps://restapi.deepdub.ai/api/v1https://restapi.eu.deepdub.ai/api/v1{ eu: true } in Node or DD_EU=1 in envPrefer the SDK default model unless the user asks for a specific model. Node SDK 2.x documents dd-etts-3.2 as the latest default. The public quickstart and Python SDK examples commonly use dd-etts-3.0.
For simple server-side generation, use HTTP mode so mp3, sampleRate, and voiceReference work consistently:
const fs = require("node:fs");
const { DeepdubClient } = require("@deepdub/node");
const deepdub = new DeepdubClient(process.env.DEEPDUB_API_KEY, {
protocol: "http",
});
const audio = await deepdub.tts("Hello from Deepdub.", {
voicePromptId: process.env.DEEPDUB_VOICE_PROMPT_ID,
locale: "en-US",
format: "mp3",
});
fs.writeFileSync("output.mp3", audio);
Use WebSocket mode when the app needs low-latency chunks:
const { DeepdubClient } = require("@deepdub/node");
const deepdub = new DeepdubClient(process.env.DEEPDUB_API_KEY);
await deepdub.connect();
try {
await deepdub.generateToFile("output.wav", "Streaming speech.", {
voicePromptId: process.env.DEEPDUB_VOICE_PROMPT_ID,
locale: "en-US",
onChunk: (chunk) => console.log(`chunk ${chunk.length}`),
});
} finally {
deepdub.disconnect();
}
from pathlib import Path
from deepdub import DeepdubClient
client = DeepdubClient()
audio = client.tts(
text="Hello from Deepdub.",
voice_prompt_id="bd1b00bb-be1c-4679-8eaa-0fcbfd4ff773",
locale="en-US",
format="mp3",
)
Path("output.mp3").write_bytes(audio)
For streaming:
import asyncio
from pathlib import Path
from deepdub import DeepdubClient
async def main():
client = DeepdubClient()
audio = bytearray()
async with client.async_connect() as conn:
async for chunk in conn.async_tts(
text="Streaming audio in real time.",
voice_prompt_id="bd1b00bb-be1c-4679-8eaa-0fcbfd4ff773",
locale="en-US",
format="wav",
sample_rate=16000,
):
audio.extend(chunk)
Path("streamed.wav").write_bytes(audio)
asyncio.run(main())
When a user wants a terminal-only path, prefer the packaged CLI first:
npx @deepdub/agent-plugin tts \
--text "Hello from Deepdub" \
--voice-prompt-id bd1b00bb-be1c-4679-8eaa-0fcbfd4ff773 \
--out output.mp3
Raw REST fallback:
curl -X POST https://restapi.deepdub.ai/api/v1/tts \
-H "Content-Type: application/json" \
-H "x-api-key: $DEEPDUB_API_KEY" \
-d '{
"targetText": "Hello from Deepdub",
"locale": "en-US",
"voicePromptId": "bd1b00bb-be1c-4679-8eaa-0fcbfd4ff773"
}' \
--output output.mp3
DEEPDUB_API_KEY, optionally DEEPDUB_VOICE_PROMPT_ID, DD_EU.voicePromptId/voice_prompt_id or voiceReference/voice_reference is provided.duration or tempo, not both.disconnect() or an async context manager.node plugin/skills/deepdub-tts/scripts/scaffold-deepdub.js --language js --out ./deepdub-demo.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub deepdub-ai/deepdub-agent-plugin --plugin deepdub-tts