# Podcast Generate

> Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).

- Skill: `zeroix07/podcast-generate` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add zeroix07/podcast-generate`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zeroix07/podcast-generate/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: MIT
- Author: zeroix07 (https://skillmd.com/u/zeroix07)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/zeroix07/podcast-generate

---


# Podcast Generate Skill (TypeScript version)

Podcast scripts and audio are automatically generated based on information provided by users or Internet search results.

This Skill is suitable for:
- Quick understanding and podcasting of long text content
- Audio presentation of knowledge-based content
- In-depth interpretation and discussion of hot topics
- Real-time information search and podcast production

---

## Capability description

### What can this Skill do?
- **Generate from file**: Receive a piece of information (txt/md/docx/pdf and other text formats) and generate conversation podcast scripts and audio
- **Internet search generation**: Based on user-specified topics, search the latest information online and generate podcast scripts and audios
- Automatically control the duration and automatically adjust according to the length of the content (3-20 minutes)
- Generate podcast scripts in Markdown format (can be manually edited)
- Use z-ai TTS to synthesize high-quality audio and stitch it into the final podcast

### What this Skill is not currently doing
- No mp3/subtitles/time stamps generated
- Does not support podcast roles of three or more people
- No background music or sound effects added

---

## Documents and Responsibilities

This Skill consists of the following files:

- `generate.ts`
  Unified entrance (supports file mode and search mode)
  - **File Mode**: Read text files uploaded by users → generate podcasts
  - **Search mode**: Call web-search skill to obtain information → generate podcasts
  - Use z-ai-web-dev-sdk for LLM script generation
  - Use z-ai-web-dev-sdk for TTS audio generation
  - Automatically splice audio clips
  - Only output the final file

- `readme.md`
  Instructions for use

- `SKILL.md`
  Current file describing Skill capabilities, boundaries and usage conventions

- `package.json`
  Node.js project configuration and dependencies

- `tsconfig.json`
  TypeScript compilation configuration

---

## Input and output conventions

### Enter (choose one of the two)

**Method 1: File upload**
- An information document (txt / md / docx / pdf and other text formats)
- There is no limit to the data length, Skill will automatically compress it to the appropriate length

**Method 2: Online search**
- User specifies a search topic
- Automatically call web-search skill to obtain relevant content
- Integrate multiple search results as data sources

### Output (only output 2 files)

- `podcast_script.md`
  Podcast script (Markdown format, manually editable)

- `podcast.wav`
  The final spliced podcast audio

**Do not output intermediate files** (such as segments.jsonl, meta.json, etc.)

---

## Operation mode

### Depends on the environment
- Node.js 18+
- z-ai-web-dev-sdk (installed)
- web-search skill (for network search mode)

**Not required** z-ai CLI

### Install dependencies
```bash
npm install
```

---

## Usage example

### Generate podcasts from files

```bash
npm run generate -- --input=test_data/material.txt --out_dir=out
```

### Internet search generates podcasts

```bash
# Search and generate podcasts based on topics
npm run generate -- --topic="The latest AI technology breakthrough" --out_dir=out

#Specify search topic and duration
npm run generate -- --topic="Quantum computing application scenarios" --out_dir=out --duration=8

# Search and generate single-player podcasts
npm run generate -- --topic="Impact of climate change" --out_dir=out --mode=single-male
```

---

## Parameter description

| Parameters | Description | Default value |
|------|------|--------|
| `--input` | Input data file path (optional with --topic) | - |
| `--topic` | Search topic keywords (optional with --input) | - |
| `--out_dir` | Output directory (required) | - |
| `--mode` | Podcast mode: dual / single-male / single-female | dual |
| `--duration` | Manually specify the number of minutes (3-20); 0 means automatic | 0 |
| `--host_name` | Host/anchor name | Xiaopu |
| `--guest_name` | Guest name | Hammer |
| `--voice_host` | Host voice | xiaochen |
| `--voice_guest` | Guest voice | chuichui |
| `--speed` | Speech speed (0.5-2.0) | 1.0 |
| `--pause_ms` | Inter-segment pause in milliseconds | 200 |

---

## Available sounds

| Sound | Features |
|------|------|
| xiaochen | Calm and professional |
| chuichui | lively and cute |
| tongtong | warm and friendly |
| jam | English gentleman |
| kazi | clear standards |
| douji | natural and smooth |
| luodo | Infectious |

---

## Technical architecture

### generate.ts (unified entrance)
- **File Mode**: Read user uploaded files → generate podcasts
- **Search mode**: Call web-search skill → Get information → Generate podcast
- **LLM**: use `z-ai-web-dev-sdk` (`chat.completions.create`)
- **TTS**: Use `z-ai-web-dev-sdk` (`audio.tts.create`)
- **Not required** z-ai CLI
- Automatically splice audio clips
- Only the final file is output, intermediate files are automatically cleaned

### LLM call
- System prompt: Podcast script writer role
- User prompt: contains information + hard constraints + breathing requirements
- Output verification: word count, structure, role tags
- Automatic retries: up to 3 times

### TTS call
- Use `zai.audio.tts.create()`
- Support custom timbre and speaking speed
- Automatically splice multiple wav clips
- Temporary files are automatically cleaned

---

## Output example

### podcast_script.md (snippet)
```markdown
**Xiaopu**: Hello everyone, welcome to today’s podcast. Today we are going to talk about an interesting topic...

**Hai Chui**: Yes, this topic is really interesting. I've also been paying attention recently...

**Xiaopu**: Speaking of which, I would like to give you an example...
```

---

## License

MIT
