audra
v0.2.4
Published
Audra v2 TTS client with browser login (`npx audra login`)
Maintainers
Readme
audra
Audra v2 TTS client with browser login (like Modal setup).
Install
npm install audraOn first install in an interactive terminal, you'll be prompted to open a browser link and approve CLI access. Skip with:
AUDRA_SKIP_LOGIN=1 npm install audraLogin
npx audra loginOpens https://audratalks.com/cli/connect — sign in or create an account, click Authorize CLI, and your key is saved to ~/.config/audra/credentials.json.
Manual key (dashboard)
npx audra login --manualPaste a key from audratalks.com/dashboard.
Usage
import { Audra } from "audra";
// Uses ~/.config/audra/credentials.json or AUDRA_API_KEY
const client = new Audra();
const audio = await client.speech({
text: "Hello[pause:1.2s]world",
voice: "kore",
delivery_profile: "podcast_v3",
normalize: true,
});
const { audio: captionedAudio, captions } = await client.speechCaptioned({
text: "Hello captioned world",
voice: "kore",
});
// captions.words → [{ word, start, end }, ...]
const phonemes = await client.phonemize({ text: "Roth IRA", voice: "kore" });
// phonemes.backend, phonemes.phonemes, phonemes.supports_ipa_markup
const batch = await client.speechBatch({
voice: "kore",
delivery_profile: "podcast_v3",
commercial: true,
segments: [
{ text: "Intro.", pause_after_ms: 900 },
{ text: "Body copy.", pause_after_ms: 0 },
],
});Errors throw AudraApiError with status, code, and body.
Migration guide: https://audratalks.com/migrate
