# audiopod

> Official AudioPod SDK + CLI for Node.js - Professional Audio Processing powered by AI

Latest version **2.9.0** (published 2026-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install audiopod
pnpm add audiopod
yarn add audiopod
bun add audiopod
```

Provides the command `audiopod`.

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.9.0 |
| Published | 2026-08-05 |
| First published | 2025-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 3 |
| Unpacked size | 712.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | AudioPod AI |
| Maintainers | rakesh1002 |
| Keywords | audiopod, audio, ai, speech-to-text, transcription, text-to-speech, tts, voice-cloning, music-generation, stem-separation, denoiser, speaker-diarization |

## Links

- npm: https://www.npmjs.com/package/audiopod
- Repository: https://github.com/AudiopodAI/audiopod-sdk-node
- Homepage: https://audiopod.ai
- Issues: https://github.com/AudiopodAI/audiopod-sdk-node/issues
- npm.io page: https://npm.io/package/audiopod

## Dependencies (3)

- [ws](https://npm.io/package/ws.md) ^8.18.0
- [axios](https://npm.io/package/axios.md) ^1.7.7
- [form-data](https://npm.io/package/form-data.md) ^4.0.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.9.0 (latest) — 2026-08-05
- 2.8.2 — 2026-07-28
- 2.8.1 — 2026-07-24
- 2.8.0 — 2026-07-24
- 2.6.0 — 2026-07-24
- 2.7.0 — 2026-07-24
- 2.5.0 — 2026-06-18
- 2.3.0 — 2026-02-25
- 2.2.0 — 2026-01-31
- 2.1.0 — 2025-12-11

## README

# AudioPod Node.js SDK

Official Node.js SDK for [AudioPod AI](https://audiopod.ai) — an all-in-one AI
**audio** platform: music generation, text-to-speech (with directing), voice
cloning, stem separation, transcription, speaker separation, noise reduction,
and audiobook production.

This SDK is the **Platform (API + Agent)** surface of AudioPod — the developer
entry point alongside the [Python SDK](https://pypi.org/project/audiopod/), the
CLI, and the MCP server. **Start free** — mint a key, get free credits to try,
no card required. API usage is **pay-as-you-go** ($1 = 7,500 credits, credits
never expire).

[![npm version](https://badge.fury.io/js/audiopod.svg)](https://www.npmjs.com/package/audiopod)
[![Node 16+](https://img.shields.io/badge/node-16+-green.svg)](https://nodejs.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Installation

```bash
npm install audiopod
# or
yarn add audiopod
```

## Quick Start

```typescript
import AudioPod from "audiopod";

// Reads AUDIOPOD_API_KEY, or pass { apiKey: "ap_your_api_key" }
const client = new AudioPod();

// Text-to-speech
const job = await client.voice.speak({ text: "Welcome to AudioPod.", voiceId: 368 });
const done = await client.voice.waitForCompletion(job.id);
console.log(done.output_url);
```

Get a key at [audiopod.ai/dashboard/account/api-keys](https://www.audiopod.ai/dashboard/account/api-keys).

## Text-to-Speech

500+ voices across 85+ languages, with **inline directing** written straight
into the text.

```typescript
// Emotion, non-verbal sounds, pauses, and pronunciation — all inline in `text`
const job = await client.voice.speak({
  text: '[warm, unhurried] Good evening. [breathe] Tonight, a story. <break time="600ms"/> It begins in Worcester /ˈwʊstər/.',
  voiceId: 368,
});
```

- **Emotion / delivery** — a leading bracket per segment: `[whispering, tense] …`
- **Non-verbal sounds** — `[laugh] [sigh] [clear throat] [breathe] [cough] [yawn] [chuckle] [gasp] [groan]`
- **Pauses** — `<break time="500ms"/>` (≤10s each, ≤20 per request)
- **Pronunciation** — inline IPA between slashes: `Worcester /ˈwʊstər/`

Word-level timestamps (for follow-along / karaoke UIs) and **Voice Design**
(create a voice from a text description) are available via the REST API —
see [the docs](https://docs.audiopod.ai/api-reference/text-to-speech).

## Voice Cloning

```typescript
// Instant clone from a 5–30s reference clip
const voice = await client.voice.create({ name: "My Voice", audioFile: "./sample.wav" });

// Reuse the clone for TTS
const job = await client.voice.speak({ text: "Now in my own voice.", voiceId: voice.id });
```

Voice conversion (voice-to-voice) is available via the REST API — see
[Voice Changer](https://docs.audiopod.ai/api-reference/voice-changer).

## Music Generation

```typescript
// Duration is not tier-capped (10s–10min; -1 = model-decided)
const job = await client.music.generate({
  prompt: "upbeat synthwave, 120 BPM, driving bassline",
  duration: 60,
});
const song = await client.music.waitForCompletion(job.id);
```

## Stem Separation

Extract individual audio components from a mixed recording.

### Available Modes

| Mode        | Stems | Output                                                          |
| ----------- | ----- | --------------------------------------------------------------- |
| `single`    | 1     | Specified stem only (vocals, drums, bass, guitar, piano, other) |
| `two`       | 2     | Vocals + Instrumental                                           |
| `four`      | 4     | Vocals, Drums, Bass, Other                                      |
| `six`       | 6     | Vocals, Drums, Bass, Guitar, Piano, Other                       |
| `producer`  | 8     | + Kick, Snare, Hihat                                            |
| `studio`    | 12    | Full production toolkit                                         |
| `mastering` | 16    | Maximum detail                                                  |

```typescript
// From a local file (or pass { url: "https://.../song.mp3" })
const result = await client.stems.separate({ file: "./song.mp3", mode: "six" });
for (const [stem, url] of Object.entries(result.download_urls)) {
  console.log(`${stem}: ${url}`);
}

// Isolate just the vocals
const vocals = await client.stems.separate({ file: "./song.mp3", mode: "single", stem: "vocals" });
```

## Audio to MIDI

Convert a mix — or stems you already separated — into MIDI (bass, vocals,
piano by default; guitar is opt-in/experimental). It's a starting-point
transcription: tidy timing/lengths in your DAW, drums aren't transcribed
yet, and dynamics are approximate.

```typescript
// Standalone: split + transcribe in one call (default stems: bass, vocals, piano)
const result = await client.midi.transcribe({ file: "./song.mp3" });
console.log(result.merged_midi_url);

// Add-on: transcribe stems you already separated (bills the add-on rate only)
const stemJob = await client.stems.separate({ file: "./song.mp3", mode: "six" });
const midiJob = await client.midi.convertFromStemJob(stemJob.id);
for (const [stem, url] of Object.entries(midiJob.midi_urls ?? {})) {
  console.log(`${stem}: ${url}`);
}
```

## Transcription

```typescript
// Speaker labels + word timestamps
const job = await client.transcription.create({
  url: "https://example.com/meeting.mp3",
  speakerDiarization: true,
  wordTimestamps: true,
});
const result = await client.transcription.waitForCompletion(job.id);
```

Premium-accuracy transcription and real-time WebSocket streaming
(`client.transcription.stream(...)`) are also supported — see
[Speech-to-Text](https://docs.audiopod.ai/api-reference/speech-to-text).

## Other Audio Services

```typescript
// Speaker separation / diarization
const speakers = await client.speaker.diarize({ url: "https://example.com/interview.wav" });

// Noise reduction
const clean = await client.denoiser.denoise({ file: "./noisy.wav" });

// Audiobook production (manuscript → ACX-ready export)
const project = await client.audiobook.createProject({ title: "My Book", language: "en" });
```

## Audiobooks: paragraph-level control

Narration works at paragraph granularity — project → chapter → paragraph.

```typescript
// Manuscript parsing is async. waitForParse polls the project and throws
// immediately if the parse failed (instead of hanging forever).
await client.audiobook.waitForParse(projectId);

// One round-trip for the project plus its chapters.
const project = await client.audiobook.getProject(projectId, { includeChapters: true });
const chapterId = project.chapters![0].id;

// Omit page/perPage to get every paragraph in the chapter.
const { paragraphs, total } = await client.audiobook.listParagraphs(projectId, chapterId);

// Narrate a single paragraph (first take billed, first regeneration free).
const take = await client.audiobook.narrateParagraph(projectId, paragraphs[0].id, {
  voiceId: 42,
  direction: "warm, unhurried",
});
const status = await client.audiobook.getParagraph(projectId, paragraphs[0].id);

// Or queue one job for many paragraphs — omit both id lists for the whole project.
const batch = await client.audiobook.batchNarrate(projectId, { voiceId: 42, chapterIds: [chapterId] });
```

## OpenAI-Compatible Endpoints

Already have OpenAI-shaped audio code? Point it at AudioPod — set the client
base URL to `https://api.audiopod.ai/api/v1` and `Authorization: Bearer ap_...`.
The `/audio/speech`, `/audio/transcriptions`, and `/audio/translations`
endpoints behave like their OpenAI counterparts. See
[OpenAI compatibility](https://docs.audiopod.ai/api-reference/openai-compatibility).

## API Wallet

```typescript
const balance = await client.wallet.getBalance();
console.log(`Balance: ${balance.balance_usd}`);

const estimate = await client.wallet.estimateCost({ serviceType: "text_to_speech", durationSeconds: 180 });
console.log(`Estimated cost: ${estimate.cost_usd}`);
```

## Error Handling

```typescript
import AudioPod, {
  InsufficientBalanceError,
  AuthenticationError,
} from "audiopod";

try {
  const client = new AudioPod({ apiKey: "ap_..." });
  const job = await client.voice.speak({ text: "Hello", voiceId: 368 });
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.log("Invalid API key");
  } else if (error instanceof InsufficientBalanceError) {
    console.log(`Need more credits. Required: ${error.requiredCents} cents`);
  }
}
```

## Environment Variables

```bash
export AUDIOPOD_API_KEY="ap_your_api_key"
```

```typescript
// Client reads from env automatically
const client = new AudioPod();
```

## TypeScript Support

Full TypeScript support with exported types:

```typescript
import AudioPod, { StemExtractionJob, StemMode, WalletBalance } from "audiopod";
```

## Documentation

- [API Documentation](https://docs.audiopod.ai)
- [Text-to-Speech](https://docs.audiopod.ai/api-reference/text-to-speech)
- [Get API Key](https://www.audiopod.ai/dashboard/account/api-keys)

## License

MIT License - see [LICENSE](LICENSE) for details.

---
_Source: https://npm.io/package/audiopod · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
