metadata-generation

Generate show metadata (JSON) containing timecoded transcript, title, duration, summary, and date by sending audio and transcript to Gemini.

npx skills add https://github.com/google-gemini/gemini-managed-agents-templates --skill metadata-generation

Metadata Generation

Generate a structured JSON file containing metadata for the radio show. This is done by sending the final mixed audio file and the original transcript back to Gemini.

Prerequisites

pip install google-genai

Workflow

  1. Read Inputs: Load the transcript from ./workspace/data/script.md and the final audio from ./workspace/audio/final/ai_radio.mp3.
  2. Upload Audio: Upload the audio file to the Gemini Files API.
  3. Generate Metadata: Call Gemini (e.g., gemini-3-flash-preview) using the Interactions API, passing the uploaded audio file and the transcript.
  4. Save Output: Save the resulting JSON to ./workspace/data/show_notes.json.

Python Code

The skill is implemented in scripts/generate_metadata.py.

# Example usage
python3 skills/metadata-generation/scripts/generate_metadata.py --workspace ./workspace

Output

The skill produces a JSON file at ./workspace/data/show_notes.json with the following structure:

{
  "show_title": "...",
  "show_duration": "...",
  "two_sentence_summary": "...",
  "date_of_generation": "YYYY-MM-DD",
  "timecoded_transcript": [
    {
      "timecode": "MM:SS",
      "speaker": "...",
      "text": "..."
    },
    ...
  ]
}

Error Handling

  • If the audio file is missing, the script will fail.
  • If the transcript is missing, it will fail.
  • If the Gemini API call fails, it will report the error and exit.

More skills from google-gemini

greeter
google-gemini
A friendly greeter skill
official
code-reviewer
google-gemini
Automated code review for local changes and remote pull requests with structured analysis across correctness, maintainability, and security. Supports both local file system changes (staged and unstaged) and remote PRs (by number or URL) with automatic GitHub CLI checkout Analyzes code across seven dimensions: correctness, maintainability, readability, efficiency, security, edge case handling, and test coverage Runs optional preflight verification suites (e.g., npm run preflight ) to catch...
official
review-duplication
google-gemini
Use this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing…
official
reconciliation
google-gemini
Reconcile loaded expenses against the pre-parsed invoice database, flagging discrepancies like amount mismatches, missing invoices, and merchant mismatches…
official
gemini-api-cli
google-gemini
Guide for using the Gemini API CLI tool. Use when you need to interact with the Gemini API via the command line, manage agents, or generate media (images,…
official
agent-tui
google-gemini
Main Agents: Do NOT use this skill directly. If you need to test the TUI, invoke the `tui_tester` subagent. Drive terminal UI (TUI) applications…
official
async-pr-review
google-gemini
Trigger this skill when the user wants to start an asynchronous PR review, run background checks on a PR, or check the status of a previously started async PR…
official
behavioral-evals
google-gemini
Guidance for creating, running, fixing, and promoting behavioral evaluations. Use when verifying agent decision logic, debugging failures, debugging prompt…
official