Agent skill
gemini-caption-transcribe
Transcribe audio/video using Gemini 2.5/3 Pro API with structured output
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/gemini-caption-transcribe
SKILL.md
Gemini Transcription Skill
Use this skill to transcribe audio or video files using Google's Gemini API.
Installation
# Using uv (recommended)
uv pip install gemini-caption-skills
# Or using pip
pip install gemini-caption-skills
Prerequisites
Get Your API Key
- Visit: https://aistudio.google.com/apikey
- Sign in with your Google account
- Click "Create API Key"
- Copy the key
Configure API Key (choose one)
Option 1: Save to config (recommended)
from gemini_caption import set_api_key
set_api_key("your-api-key-here")
Config location: ~/.config/gemini-caption/config.json
Option 2: Environment variable
export GEMINI_API_KEY="your-api-key-here"
Option 3: Project .env file
# In your project root, create .env
GEMINI_API_KEY=your-api-key-here
Verify Setup
from gemini_caption import get_api_key
print(get_api_key()) # Should print your key
Usage
From URL (YouTube, etc.)
import asyncio
from gemini_caption import GeminiTranscriber
transcriber = GeminiTranscriber(verbose=True)
transcript = asyncio.run(transcriber.transcribe_url("https://www.youtube.com/watch?v=VIDEO_ID"))
print(transcript)
From Local File
import asyncio
from gemini_caption import GeminiTranscriber
transcriber = GeminiTranscriber(verbose=True)
transcript = asyncio.run(transcriber.transcribe_file("/path/to/audio.mp3"))
transcriber.write(transcript, "output.md")
Sync API
from gemini_caption import GeminiTranscriber
transcriber = GeminiTranscriber()
transcript = transcriber.transcribe_sync("/path/to/video.mp4")
Output Format
The transcriber produces markdown output with:
- Table of Contents with timestamps
- Chapter sections with
## [HH:MM:SS] Titleheaders - Speaker labels in
**Speaker Name:**format - Timestamps at the end of each paragraph
[HH:MM:SS] - Non-speech events like
[Music] [00:00:08]
Configuration
from gemini_caption.transcription import TranscriptionConfig, GeminiTranscriber
config = TranscriptionConfig(
model_name="gemini-2.5-pro-preview-05-06", # or "gemini-3.0-pro"
language="zh", # Optional: force specific language
verbose=True,
use_thinking=True, # Enable Gemini thinking mode
)
transcriber = GeminiTranscriber(config=config)
Prompt Customization
The system prompt is loaded from src/gemini_caption/prompts/transcription_gem.txt.
You can modify this file to customize transcription behavior.
Key Features
- Verbatim transcription (no translation)
- Automatic speaker identification from metadata/audio
- Chapter generation from YouTube descriptions or topic shifts
- Filler words preserved (um, uh, like)
- Mixed-language support
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?