# Prepare podcast audio

Convert raw recordings to distribution-ready audio files

"Airwave" (a podcast hosting app like Transistor) receives WAV or FLAC uploads from creators. Podcast directories want MP3 or AAC.

## API

<CodeGroup labels={["CLI", "TypeScript", "Python", "curl"]}>
```bash
ittybit audio \
  -i https://airwave-app.com/episodes/raw/ep-42.wav \
  --format mp3 \
  --quality high
```

```typescript
const task = {
  input: 'https://airwave-app.com/episodes/raw/ep-42.wav',
  kind: 'audio',
  options: {
    format: 'mp3',
    quality: 'high',
  },
};

const res = await fetch('https://api.ittybit.com/jobs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ITTYBIT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(task),
});
const data = await res.json();
```

```python

task = {
    "input": "https://airwave-app.com/episodes/raw/ep-42.wav",
    "kind": "audio",
    "options": {
        "format": "mp3",
        "quality": "high",
    },
}

res = requests.post(
    "https://api.ittybit.com/jobs",
    headers={"Authorization": f"Bearer {api_key}"},
    json=task,
)
data = res.json()
```

```bash
TASK='{
  "input": "https://airwave-app.com/episodes/raw/ep-42.wav",
  "kind": "audio",
  "options": {
    "format": "mp3",
    "quality": "high"
  }
}'

curl -X POST https://api.ittybit.com/jobs \
  -H "Authorization: Bearer $ITTYBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$TASK"
```

</CodeGroup>

## CLI

```bash
ittybit audio \
  -i ep-42.wav \
  -o ep-42.mp3 \
  --quality high
```

## Multiple formats

Apple Podcasts prefers AAC. Spotify accepts both. Publish both:

```bash
ittybit audio \
  -i ep-42.wav \
  -o ep-42.mp3 \
  --quality high

ittybit audio \
  -i ep-42.wav \
  -o ep-42.aac \
  --quality high
```

## From video recordings

Many podcasters record on Zoom or Riverside (video). Extract just the audio:

```bash
ittybit audio \
  -i ep-42-video.mp4 \
  -o ep-42.mp3 \
  --quality high
```

## Trim intro/outro

Cut dead air from the start and rambling from the end:

```bash
ittybit audio \
  -i ep-42.wav \
  -o ep-42.mp3 \
  --start 5 \
  --end 3540 \
  --quality high
```

## Quality guide for podcasts

| Quality  | Use case                              |
| -------- | ------------------------------------- |
| `high`   | Primary distribution (Apple, Spotify) |
| `medium` | Web player preview                    |
| `low`    | RSS feed sample / trailer             |