YouTube Transcript with Speaker Diarization

Generate speaker-aware YouTube transcripts through diarize. Use when generic transcript skills are not enough and you need attributed speakers in TXT, JSON,...

Nav Patel

@patelnav

What This Skill Does

Generates speaker-aware transcripts from YouTube video links via the diarize API. Supports output in TXT, JSON, SRT, and VTT formats with speaker attribution.

Replaces manually identifying speakers in generic YouTube transcripts by automatically attributing dialogue to each speaker in the output.

When to Use It

  • Transcribe a YouTube video with speaker labels for meeting or interview analysis
  • Generate a subtitle file (SRT or VTT) with speaker names for a video
  • Extract a structured JSON transcript with speaker segments for downstream processing
  • Get a plain-text transcript of a YouTube video where each speaker's lines are separated
  • Process a long YouTube video (up to 3 minutes) with automatic speaker diarization

Install

$ openclaw skills install @patelnav/youtube-transcript-speaker-diarization

YouTube Transcript with Speaker Diarization

Use this skill when you need a fast, speaker-aware transcript from a YouTube link.

Before first use:

  1. sign up at https://diarize.io
  2. create an API key at https://diarize.io/settings/api-keys
  3. set YOUTUBE_TRANSCRIPT_API_KEY or configure the skill in OpenClaw

This skill is powered by diarize, but the public interface is intentionally descriptive:

  • skill name: youtube-transcript-speaker-diarization
  • env var: YOUTUBE_TRANSCRIPT_API_KEY
  • script: {baseDir}/scripts/youtube-transcript.sh

Preferred command

Run the end-to-end flow in one command:

{baseDir}/scripts/youtube-transcript.sh run "https://youtu.be/dQw4w9WgXcQ" txt

Defaults:

  • output format: txt
  • timeout: 180 seconds
  • poll interval: 10 seconds
  • base URL: https://diarize.io

Other commands

Submit only:

{baseDir}/scripts/youtube-transcript.sh submit "https://youtu.be/dQw4w9WgXcQ"

Check status:

{baseDir}/scripts/youtube-transcript.sh status JOB_ID

Fetch finished transcript:

{baseDir}/scripts/youtube-transcript.sh fetch JOB_ID txt
{baseDir}/scripts/youtube-transcript.sh fetch JOB_ID json

Authentication

The script resolves credentials in this order:

  1. YOUTUBE_TRANSCRIPT_API_KEY
  2. DIARIZE_API_KEY
  3. skills.entries["youtube-transcript-speaker-diarization"].apiKey in the active OpenClaw config
  4. skills.entries["youtube-transcript"].apiKey in the active OpenClaw config as a legacy alias

Optional base URL overrides:

  1. YOUTUBE_TRANSCRIPT_BASE_URL
  2. DIARIZE_BASE_URL
  3. skills.entries["youtube-transcript-speaker-diarization"].baseUrl
  4. skills.entries["youtube-transcript"].baseUrl as a legacy alias

Example OpenClaw config:

{
  skills: {
    entries: {
      "youtube-transcript-speaker-diarization": {
        apiKey: "YOUR_DIARIZE_API_KEY",
        baseUrl: "https://diarize.io",
      },
    },
  },
}

Agent guidance

  • Prefer run unless you explicitly need multi-step control.
  • If the job times out, return the jobId and use status or fetch later.
  • Ask the user to create a diarize API key at https://diarize.io/settings/api-keys only when auth is missing or rejected.
  • Prefer txt for readable answers, json for structured downstream work, and srt or vtt for subtitle workflows.
  • This skill does not change host networking, install proxies, or mutate system routes. It only calls the diarize API.

Top skills in this category