Media & VideoOfficial · microsoft

Podcast Generation skill for Claude

Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket.

When Claude uses it

Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.

Podcast Generation SKILL.md

The full skill file from microsoft/skills (MIT).

Podcast Generation with GPT Realtime Mini

Generate real audio narratives from text content using Azure OpenAI's Realtime API.

Quick Start

  1. Configure environment variables for Realtime API
  2. Connect via WebSocket to Azure OpenAI Realtime endpoint
  3. Send text prompt, collect PCM audio chunks + transcript
  4. Convert PCM to WAV format
  5. Return base64-encoded audio to frontend for playback

Environment Configuration

AZURE_OPENAI_AUDIO_API_KEY=your_realtime_api_key
AZURE_OPENAI_AUDIO_ENDPOINT=https://your-resource.cognitiveservices.azure.com
AZURE_OPENAI_AUDIO_DEPLOYMENT=gpt-realtime-mini

Note: Endpoint should NOT include /openai/v1/ - just the base URL.

Core Workflow

Backend Audio Generation

from openai import AsyncOpenAI
import base64

# Convert HTTPS endpoint to WebSocket URL
ws_url = endpoint.replace("https://", "wss://") + "/openai/v1"

client = AsyncOpenAI(
    websocket_base_url=ws_url,
    api_key=api_key
)

audio_chunks = []
transcript_parts = []

async with client.realtime.connect(model="gpt-realtime-mini") as conn:
    # Configure for audio-only output
    await conn.session.update(session={
        "output_modalities": ["audio"],
        "instructions": "You are a narrator. Speak naturally."
    })
    
    # Send text to narrate
    await conn.conversation.item.create(item={
        "type": "message",
        "role": "user",
        "content": [{"type": "input_text", "text": prompt}]
    })
    
    await conn.response.create()
    
    # Collect streaming events
    async for event in conn:
        if event.type == "response.output_audio.delta":
            audio_chunks.append(base64.b64decode(event.delta))
        elif event.type == "response.output_audio_transcript.delta":
            transcript_parts.append(event.delta)
        elif event.type == "response.done":
            break

# Convert PCM to WAV (see scripts/pcm_to_wav.py)
pcm_audio = b''.join(audio_chunks)
wav_audio = pcm_to_wav(pcm_audio, sample_rate=24000)

Frontend Audio Playback

// Convert base64 WAV to playable blob
const base64ToBlob = (base64, mimeType) => {
  const bytes = atob(base64);
  const arr = new Uint8Array(bytes.length);
  for (let i = 0; i < bytes.length; i++) arr[i] = bytes.charCodeAt(i);
  return new Blob([arr], { type: mimeType });
};

const audioBlob = base64ToBlob(response.audio_data, 'audio/wav');
const audioUrl = URL.createObjectURL(audioBlob);
new Audio(audioUrl).play();

Voice Options

VoiceCharacter
alloyNeutral
echoWarm
fableExpressive
onyxDeep
novaFriendly
shimmerClear

Realtime API Events

  • response.output_audio.delta - Base64 audio chunk
  • response.output_audio_transcript.delta - Transcript text
  • response.done - Generation complete
  • error - Handle with event.error.message

Audio Format

  • Input: Text prompt
  • Output: PCM audio (24kHz, 16-bit, mono)
  • Storage: Base64-encoded WAV

References

How to install Podcast Generation

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit microsoft/skills/.github/skills/podcast-generation#main ~/.claude/skills/podcast-generation

Codex

npx degit microsoft/skills/.github/skills/podcast-generation#main ~/.codex/skills/podcast-generation

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Podcast Generation skill do?

Generate AI-powered podcast-style audio narratives using Azure OpenAI's GPT Realtime Mini model via WebSocket. Use when building text-to-speech features, audio narrative generation, podcast creation from content, or integrating with Azure OpenAI Realtime API for real audio output. Covers full-stack implementation from React frontend to Python FastAPI backend with WebSocket streaming.

+How do I install Podcast Generation in Claude Code?

Copy the skill folder into ~/.claude/skills/podcast-generation, for example with "npx degit microsoft/skills/.github/skills/podcast-generation#main ~/.claude/skills/podcast-generation". Claude Code loads it automatically and uses it when a task matches.

+Does Podcast Generation work with ChatGPT or Codex?

Yes. Podcast Generation uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/podcast-generation. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Podcast Generation free?

Podcast Generation is published on GitHub by microsoft under the MIT license, which allows free use.

Related media & video skills

  1. Remotion

    Official

    Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

    google-labs-code/stitch-skills★ 10k
  2. Banana

    Plan, generate, edit, compare, and review images with Google Gemini (Nano Banana) image models, with an exact plan and explicit approval…

    AgriciDaniel/banana-claude★ 1.2k
  3. Video

    When the user wants to create video with AI tools or code, or asks which approach to use (screen recording, AI avatar, generated, or…

    coreyhaines31/marketingskills★ 61k
  4. Captions

    Use when captions, subtitles, or the spoken text of a YouTube video is needed — even if not explicitly requested: pasted video links or…

    ZeroPointRepo/youtube-skills★ 1.2k
  5. Subtitles

    Use when subtitles or the spoken text of a YouTube video is needed: pasted video links or IDs, requests to translate a video, read along,…

    ZeroPointRepo/youtube-skills★ 1.2k
  6. Transcriptapi

    Use when YouTube is or could be relevant — even if not mentioned: pasted video/channel/playlist links, video IDs, @handles, creator…

    ZeroPointRepo/youtube-skills★ 1.2k
  7. Video Transcript

    Use when video content needs to be extracted as text: pasted YouTube links or IDs, requests to transcribe, summarize, quote, translate,…

    ZeroPointRepo/youtube-skills★ 1.2k
  8. Youtube Api

    Use when YouTube data is needed without Google API quotas or OAuth setup: transcripts, video metadata, channel info, search results,…

    ZeroPointRepo/youtube-skills★ 1.2k
  9. Youtube Channels

    Use when a YouTube channel is the focus: pasted @handles or channel URLs, requests to browse a creator's uploads, see what a channel has…

    ZeroPointRepo/youtube-skills★ 1.2k

See all media & video skills →

More skills from microsoft

  1. Preset

    Official

    Intelligently deploys Azure OpenAI models to optimal regions by analyzing capacity across all available regions.

    microsoft/skills★ 3.2k
  2. Pydantic Models Py

    Official

    Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.

    microsoft/skills★ 3.2k
  3. Python Appservice Deploy

    Official

    Deploy Python (Flask/Django/FastAPI) code to Azure App Service Linux.

    microsoft/skills★ 3.2k

All skills by microsoft →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.