staruhub/ClaudeSkills / lab/Geek-skills-podcast-generator
podcast-generator
Verified用火山引擎 Podcast AI 模型生成中文双人对话播客。当用户要把文章、报告、话题文本转成播客音频、生成对话式音频内容时使用,需要环境具备火山引擎 APP_ID 和 ACCESS_KEY。支持 mp3/ogg_opus/pcm/aac、语速调节、自定义音色、断点续传。不用于:单人朗读式 TTS(用普通语音合成)、英文播客(模型主要优化中文)、播客文稿本身的撰写(先用写作类 skill 产出文本再来)。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.6 KB |
| references/api_reference.md | markdown | 4.8 KB |
| scripts/generate_podcast.py | script | 13.3 KB |
references/api_reference.md
View on GitHub# Volcano Engine Podcast API Reference
## API Endpoint
**WebSocket URL:** `wss://openspeech.bytedance.com/api/v3/sami/podcasttts`
## Authentication Headers
| Header | Required | Description | Example Value |
|--------|----------|-------------|---------------|
| X-Api-App-Id | Yes | APP ID from Volcano Console | your-app-id |
| X-Api-Access-Key | Yes | Access Token from Console | your-access-key |
| X-Api-Resource-Id | Yes | Resource ID for podcast service | volc.bigmodel.podcaster |
| X-Api-App-Key | Yes | Fixed value | aGjiRDfUWi |
| X-Api-Request-Id | No | UUID for tracking | 67ee89ba-7050-4c04-a3d7... |
**Get credentials:** https://console.volcengine.com/speech/service/10028
## Request Parameters
### Core Parameters
| Field | Type | Required | Description | Default |
|-------|------|----------|-------------|---------|
| action | number | Yes | Generation type: 0=generate podcast | 0 |
| input_text | string | Yes | Podcast topic text (truncated at 25k chars) | — |
| input_id | string | No | Unique ID for this podcast request | auto-generated |
| scene | string | No | Podcast scenario for statistics | deep_research |
### Audio Configuration
| Field | Type | Required | Description | Default |
|-------|------|----------|-------------|---------|
| audio_config.format | string | No | Audio format: mp3/ogg_opus/pcm/aac | pcm |
| audio_config.sample_rate | number | No | Sample rate in Hz | 24000 |
| audio_config.speech_rate | number | No | Speed adjustment: -50 to 100 (100=2x) | 0 |
| use_head_music | boolean | No | Add opening music effect | false |
### Speaker Configuration
| Field | Type | Required | Description | Default |
|-------|------|----------|-------------|---------|
| speaker_info.random_order | boolean | No | Randomize speaker order | true |
| speaker_info.speakers | array | No | List of speaker voice IDs | [default pair] |
**Default speakers:**
- `zh_male_dayixiansheng_v2_saturn_bigtts` (male)
- `zh_female_mizaitongxue_v2_saturn_bigtts` (female)
### Retry Configuration (for resuming)
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| retry_info.retry_task_id | string | No | Task ID from incomplete generation |
| retry_info.last_finished_round_id | number | No | Last successfully completed round |
## WebSocket Protocol
### Binary Protocol Structure
All messages use binary protocol with 4-byte header + payload.
**Header format:**
| Byte | Bits 7-4 | Bits 3-0 | Description |
|------|----------|----------|-------------|
| 0 | Protocol version | Header size (4x) | Always: 0x11 (v1, 4-byte) |
| 1 | Message type | Message flags | Varies by message |
| 2 | Serialization | Compression | JSON=0x10, Raw=0x00 |
| 3 | Reserved | Reserved | Always: 0x00 |
### Event Types
#### Session Events
| Code | Name | Direction | Description |
|------|------|-----------|-------------|
| 1 | StartSession | Client→Server | Start generation |
| 150 | SessionStarted | Server→Client | Generation started |
| 152 | SessionFinished | Server→Client | Generation completed |
| 2 | FinishConnection | Client→Server | Close connection |
| 52 | ConnectionFinished | Server→Client | Connection closed |
#### Podcast Data Events
| Code | Name | Direction | Description |
|------|------|-----------|-------------|
| 360 | PodcastSpeaker | Server→Client | Round started (metadata) |
| 361 | PodcastTTSResponse | Server→Client | Audio data chunk |
| 362 | PodcastTTSRoundEnd | Server→Client | Round completed |
### Message Flow
1. Client: StartSession (event 1) with parameters
2. Server: SessionStarted (event 150)
3. **Loop for each round:**
- Server: PodcastSpeaker (360)
- Server: PodcastTTSResponse (361) - multiple times
- Server: PodcastTTSRoundEnd (362)
4. Server: SessionFinished (event 152)
5. Client: FinishConnection (event 2)
6. Server: ConnectionFinished (event 52)
## Request Examples
### Basic Generation
```json
{
"input_id": "test_001",
"input_text": "分析下当前的大模型发展",
"action": 0,
"audio_config": {
"format": "mp3",
"sample_rate": 24000,
"speech_rate": 0
}
}
```
### Resume Generation
```json
{
"input_text": "分析下当前的大模型发展",
"action": 0,
"retry_info": {
"retry_task_id": "previous-session-id",
"last_finished_round_id": 5
}
}
```
## Error Codes
| Code | Message | Description |
|------|---------|-------------|
| 20000000 | ok | Success |
| 45000000 | quota exceeded | Concurrent limit exceeded |
| 55000000 | server error | Generic server error |
## Best Practices
1. **Always close connections properly** - Send FinishConnection after SessionFinished
2. **Handle interruptions** - Save task_id and last_finished_round_id for resume
3. **Monitor quotas** - Avoid concurrent request limits
4. **Validate input** - Check text length ≤ 25k characters
5. **Log responses** - Save X-Tt-Logid for debugging
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |