gemini-stt
Transcribe audio files using Google's Gemini API or Vertex AI
What this skill does
# Gemini Speech-to-Text Skill Transcribe audio files using Google's Gemini API or Vertex AI. Default model is `gemini-2.0-flash-lite` for fastest transcription. ## Authentication (choose one) ### Option 1: Vertex AI with Application Default Credentials (Recommended) ```bash gcloud auth application-default login gcloud config set project YOUR_PROJECT_ID ``` The script will automatically detect and use ADC when available. ### Option 2: Direct Gemini API Key Set `GEMINI_API_KEY` in environment (e.g., `~/.env` or `~/.clawdbot/.env`) ## Requirements - Python 3.10+ (no external dependencies) - Either GEMINI_API_KEY or gcloud CLI with ADC configured ## Supported Formats - `.ogg` / `.opus` (Telegram voice messages) - `.mp3` - `.wav` - `.m4a` ## Usage ```bash # Auto-detect auth (tries ADC first, then GEMINI_API_KEY) python ~/.claude/skills/gemini-stt/transcribe.py /path/to/audio.ogg # Force Vertex AI python ~/.claude/skills/gemini-stt/transcribe.py /path/to/audio.ogg --vertex # With a specific model python ~/.claude/skills/gemini-stt/transcribe.py /path/to/audio.ogg --model gemini-2.5-pro # Vertex AI with specific project and region python ~/.claude/skills/gemini-stt/transcribe.py /path/to/audio.ogg --vertex --project my-project --region us-central1 # With Clawdbot media python ~/.claude/skills/gemini-stt/transcribe.py ~/.clawdbot/media/inbound/voice-message.ogg ``` ## Options | Option | Description | |--------|-------------| | `<audio_file>` | Path to the audio file (required) | | `--model`, `-m` | Gemini model to use (default: `gemini-2.0-flash-lite`) | | `--vertex`, `-v` | Force use of Vertex AI with ADC | | `--project`, `-p` | GCP project ID (for Vertex, defaults to gcloud config) | | `--region`, `-r` | GCP region (for Vertex, default: `us-central1`) | ## Supported Models Any Gemini model that supports audio input can be used. Recommended models: | Model | Notes | |-------|-------| | `gemini-2.0-flash-lite` | **Default.** Fastest transcription speed. | | `gemini-2.0-flash` | Fast and cost-effective. | | `gemini-2.5-flash-lite` | Lightweight 2.5 model. | | `gemini-2.5-flash` | Balanced speed and quality. | | `gemini-2.5-pro` | Higher quality, slower. | | `gemini-3-flash-preview` | Latest flash model. | | `gemini-3-pro-preview` | Latest pro model, best quality. | See [Gemini API Models](https://ai.google.dev/gemini-api/docs/models) for the latest list. ## How It Works 1. Reads the audio file and base64 encodes it 2. Auto-detects authentication: - If ADC is available (gcloud), uses Vertex AI endpoint - Otherwise, uses GEMINI_API_KEY with direct Gemini API 3. Sends to the selected Gemini model with transcription prompt 4. Returns the transcribed text ## Example Integration For Clawdbot voice message handling: ```bash # Transcribe incoming voice message TRANSCRIPT=$(python ~/.claude/skills/gemini-stt/transcribe.py "$AUDIO_PATH") echo "User said: $TRANSCRIPT" ``` ## Error Handling The script exits with code 1 and prints to stderr on: - No authentication available (neither ADC nor GEMINI_API_KEY) - File not found - API errors - Missing GCP project (when using Vertex) ## Notes - Uses Gemini 2.0 Flash Lite by default for fastest transcription - No external Python dependencies (uses stdlib only) - Automatically detects MIME type from file extension - Prefers Vertex AI with ADC when available (no API key management needed)
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.