npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

audiopod

v2.1.0

Published

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

Downloads

107

Readme

AudioPod Node.js SDK

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

npm version Node 16+ License: MIT

Installation

npm install audiopod
# or
yarn add audiopod

Quick Start

import AudioPod from "audiopod";

// Initialize client
const client = new AudioPod({ apiKey: "ap_your_api_key" });

// Separate audio into 6 stems
const result = await client.stems.separate({
  url: "https://youtube.com/watch?v=VIDEO_ID",
  mode: "six",
});

// Download stems
for (const [stem, url] of Object.entries(result.download_urls)) {
  console.log(`${stem}: ${url}`);
}

Stem Separation

Extract individual audio components from mixed recordings.

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 |

Examples

import AudioPod from "audiopod";

const client = new AudioPod({ apiKey: "ap_your_api_key" });

// Six-stem separation from YouTube
const job = await client.stems.extract({
  url: "https://youtube.com/watch?v=VIDEO_ID",
  mode: "six",
});
console.log(`Job ID: ${job.id}`);

// Wait for completion
const result = await client.stems.waitForCompletion(job.id);
console.log(result.download_urls);

// Or use the convenience method (extract + wait)
const result = await client.stems.separate({
  url: "https://youtube.com/watch?v=VIDEO_ID",
  mode: "six",
});

// From local file
const result = await client.stems.separate({
  file: "./song.mp3",
  mode: "four",
});

// Extract only vocals
const result = await client.stems.separate({
  url: "https://youtube.com/watch?v=VIDEO_ID",
  mode: "single",
  stem: "vocals",
});

// Get available modes
const modes = await client.stems.modes();
modes.modes.forEach((m) => {
  console.log(`${m.mode}: ${m.description}`);
});

API Wallet

Check balance and manage your wallet.

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

// Estimate cost
const estimate = await client.wallet.estimate("stem_extraction", 180);
console.log(`Estimated cost: ${estimate.cost_usd}`);

// Get usage history
const usage = await client.wallet.usage();
usage.logs.forEach((log) => {
  console.log(`${log.service_type}: ${log.amount_usd}`);
});

Other Services

// Transcription
const job = await client.transcription.create({ url: "https://..." });
const result = await client.transcription.waitForCompletion(job.id);

// Voice cloning
const voice = await client.voice.clone({
  file: "./sample.wav",
  name: "My Voice",
});

// Music generation
const song = await client.music.generate({
  prompt: "upbeat electronic dance music",
});

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

// Speaker diarization
const speakers = await client.speaker.diarize({ url: "https://..." });

Error Handling

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

try {
  const client = new AudioPod({ apiKey: "ap_..." });
  const result = await client.stems.separate({ url: "...", mode: "six" });
} 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

export AUDIOPOD_API_KEY="ap_your_api_key"
// Client reads from env automatically
const client = new AudioPod();

TypeScript Support

Full TypeScript support with exported types:

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

Documentation

License

MIT License - see LICENSE for details.