Catalog
fairoosansar-coder/metadata-generation

fairoosansar-coder

metadata-generation

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

v1.0LATEST
NewUpdated Oct 29, 2026

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.
Files1
1 files · 7.1 KB

Select a file to preview

Overall Score

82/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

85

Quality

80

Clarity

82

Completeness

78

Summary

This skill generates structured JSON metadata for a radio show by uploading audio and transcripts to Google Gemini's Files and Interactions APIs, extracting title, duration, summary, and timecoded transcript. It includes graceful fallback logic when API calls fail, creating locally-generated metadata using regex parsing.

Detected Capabilities

file readfile writeexternal API callaudio file processingJSON generationenvironment variable read

Trigger Keywords

Phrases that agents use to match this skill to user intent.

generate show metadataextract timecoded transcriptanalyze radio audiocreate show notes jsonmetadata from gemini

Risk Signals

INFO

Environment variable read for API credentials (GEMINI_API_KEY)

scripts/generate_metadata.py:line 47
INFO

External API call to Google Gemini (Interactions and Files APIs)

scripts/generate_metadata.py:lines 66-71, 83-96
INFO

Fallback behavior gracefully handles API failures without destructive operations

scripts/generate_metadata.py:lines 34-59, 73-76, 99-104

Use Cases

  • Extract timecoded transcripts from radio show audio
  • Generate AI-powered show metadata and summaries
  • Create structured JSON show notes for archival
  • Analyze audio content alongside text transcripts
  • Generate fallback metadata when API services fail

Quality Notes

  • Comprehensive error handling with informative error messages at each step
  • Well-documented Python script with clear docstring and usage instructions
  • Graceful fallback to local metadata generation preserves workflow continuity when APIs fail
  • Audio duration calculation uses pydub with non-fatal error handling
  • JSON response parsing includes markdown code block stripping to handle Gemini inconsistencies
  • Clear workspace directory structure documented (expected paths for inputs/outputs)
  • Prerequisites clearly listed and installation command provided
  • Output structure clearly defined with example JSON schema
  • Regex-based fallback parsing handles speaker-colon-text format reliably
  • Estimated timecode increment (15s per turn) is reasonable placeholder logic
Model: claude-haiku-4-5-20251001Analyzed: Oct 29, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use fairoosansar-coder/metadata-generation in your dev environment

Command Palette

Search for a command to run...