PROMPT CANVAS CANVAS

Role & Context

You are a Senior AI Infrastructure Engineer specializing in Speech-to-Text and NLP Pipelines. Your task is to design an automated pipeline that ingests meeting audio, performs speaker diarization (identifying who is speaking), transcribes the audio, and finally utilizes an LLM to generate a speaker-aware meeting summary.

Input Data

  • Primary Goal:
  • Desired Transcription Format:

Step-by-Step Instructions

  1. Analyze the primary_goal to determine the specific downstream tasks required (e.g., action item extraction, sentiment analysis, CRM logging).
  2. Within a dedicated thinking block, architect the pipeline flow:
    • Phase 1: Audio Preprocessing & Diarization (e.g., using open-source models like PyAnnote or a managed service).
    • Phase 2: Transcription (e.g., using OpenAI's Whisper model on segmented audio chunks).
    • Phase 3: Merging (Combining transcriptions with speaker IDs based on timestamps to match the transcription_format).
    • Phase 4: LLM Synthesis (Passing the diarized transcript to an LLM like GPT-4o for summarization).
  3. Provide the overarching system architecture.
  4. Write the core integration code (in Python) that glues the diarization output with the Whisper transcription and formatting logic.

Constraints

  • Ensure the code gracefully handles overlapping speech segments if the chosen diarization method supports it.
  • Provide clear instructions on how to structure the final prompt sent to the LLM to maximize the utility of the speaker labels.
# Role & Context
You are a Senior AI Infrastructure Engineer specializing in Speech-to-Text and NLP Pipelines. Your task is to design an automated pipeline that ingests meeting audio, performs speaker diarization (identifying who is speaking), transcribes the audio, and finally utilizes an LLM to generate a speaker-aware meeting summary.

# Input Data
- Primary Goal: 
- Desired Transcription Format: 

## Step-by-Step Instructions
1. Analyze the `primary_goal` to determine the specific downstream tasks required (e.g., action item extraction, sentiment analysis, CRM logging).
2. Within a dedicated thinking block, architect the pipeline flow:
   - **Phase 1: Audio Preprocessing & Diarization** (e.g., using open-source models like PyAnnote or a managed service).
   - **Phase 2: Transcription** (e.g., using OpenAI's Whisper model on segmented audio chunks).
   - **Phase 3: Merging** (Combining transcriptions with speaker IDs based on timestamps to match the `transcription_format`).
   - **Phase 4: LLM Synthesis** (Passing the diarized transcript to an LLM like GPT-4o for summarization).
3. Provide the overarching system architecture.
4. Write the core integration code (in Python) that glues the diarization output with the Whisper transcription and formatting logic.

## Constraints
- Ensure the code gracefully handles overlapping speech segments if the chosen diarization method supports it.
- Provide clear instructions on how to structure the final prompt sent to the LLM to maximize the utility of the speaker labels.
🚀 Copy Compiled Prompt & Launch in:

Speaker-Aware Meeting Intelligence Pipeline

Productivity 2026-08-08T00:00:00Z
👁️ 0

Key Capabilities

  • Automated Audio Diarization Strategy: Build out logic that flawlessly maps transcribed text segments to distinct speaker IDs, solving the "who said what" problem in multi-participant recordings.
  • Optimized Prompt Chains for Summarization: Deploy specialized NLP prompt templates to extract decisions, sentiment, and follow-up tasks on a per-speaker basis.
  • End-to-End Pipeline Architecture: Receive step-by-step guidance on connecting audio ingestion, diarization engines (like PyAnnote), and OpenAI LLMs into a seamless automated workflow.

Underlying Mechanism

This prompt utilizes a Markdown-structured Chain of Thought (CoT) to enforce a sequential processing pipeline. By cleanly separating the audio processing phase (diarization and transcription) from the synthesis phase (LLM summarization), the AI generates robust, modular code that correctly passes speaker-labeled transcripts into subsequent generative models without context loss.

Ideal Use Cases

  • Engineering internal tooling to summarize Zoom, Teams, or Google Meet recordings automatically.
  • Developing B2B SaaS products focused on conversation intelligence (e.g., sales call analysis).
  • Automating interview transcriptions for journalism, HR, or qualitative research.

When NOT to Use (Anti-Patterns)

  • Processing single-speaker audio like podcasts or monologues where diarization adds unnecessary overhead.
  • When building strict real-time applications where offline diarization latency (e.g., PyAnnote) is unacceptable.

Pro Tip

Use the {{transcription_format}} variable to specify exactly how you want the diarized output structured (e.g., [Speaker A]: Text) so the pipeline's downstream summarization prompts can parse it flawlessly without hallucinating speaker identities.

Source Reference: Build a Speaker-Aware Meeting Intelligence Pipeline with Audio Diarization

🎯 Real Output Example

Generated using this exact prompt structure with the default variable values.

Pipeline Architecture

  1. Ingestion: Load audio file (WAV/MP3).
  2. Diarization: Run PyAnnote.audio to generate a timeline of speaker turns.
  3. Transcription: Slice audio based on turns and run Whisper-1 to get text.
  4. Synthesis: GPT-4o extracts decisions and maps action items.

Core Python Integration

from pydub import AudioSegment
from openai import OpenAI

client = OpenAI()

def process_speaker_turns(audio_path, diarization_turns):
    audio = AudioSegment.from_file(audio_path)
    full_transcript = ""
    
    for turn in diarization_turns:
        # Slice audio
        chunk = audio[turn.start_ms : turn.end_ms]
        chunk.export("temp.wav", format="wav")
        
        # Transcribe chunk
        with open("temp.wav", "rb") as f:
            res = client.audio.transcriptions.create(model="whisper-1", file=f)
            
        # Format according to specified transcription_format
        full_transcript += f"{turn.speaker} [{turn.start_ms} - {turn.end_ms}]: {res.text}\n"
        
    return full_transcript

🧬 Prompt Variables & Input Reference

Variable Tag What to Enter Default Example Value
{{primary_goal}} What is the end goal of analyzing the meeting? (e.g., Extracting engineering action items, analyzing sales prospect objections). Generate a concise summary of decisions made and assign action items to specific individuals.
{{transcription_format}} How should the intermediate transcript be formatted before sending to the LLM? SPEAKER_ID [START_TIME - END_TIME]: TRANSCRIPT_TEXT

📋 How to Use This Prompt

1

Customize on Prompt Canvas

Click any {{variable}} directly on the canvas to choose a ⚡ Quick Preset or type your own value in the popover editor.

2

Copy Compiled Prompt

Click Copy Prompt to grab the ready-to-run prompt with your custom inputs already injected—or save it to your ⭐ Prompt Vault.

3

1-Click Launch in AI

Hit the ChatGPT, Claude, DeepSeek, or Gemini launch buttons to copy and open your preferred model in one click.