Audio transcription (ElevenLabs Scribe)
/SKILLTranscribe audio or video files using the ElevenLabs Speech-to-Text API (Scribe v2). Accepts a file path and optional parameters, reads the API key from the project's .env file, and returns a formatte
--- name: elevenlabs-transcribe description: Transcribes audio/video files using ElevenLabs Scribe v2API . Use when transcribing audio files, generating transcripts, or converting speech to text. argument-hint: <audio-file> [--output transcript.txt] [--language eng] [--num-speakers 2] [--keyterms "term1" "term2"] --- <objective> Transcribe audio or video files using the ElevenLabs Speech-to-TextAPI (Scribe v2). Accepts a file path and optional parameters, reads theAPI key from the project’s .env file, and returns a formatted transcription with speaker diarization and audio event tagging. </objective > <quick_start > Via slash command: /elevenlabs-transcribe path/to/audio.mp3 /elevenlabs-transcribe path/to/audio.mp3 --output transcript.txt --num-speakers 3 Requirements: -ELEVENLABS_API_KEY in the project’s.env file -uv installed (dependencies are automatically installed via PEP 723) </quick_start > <prerequisites> Before transcribing, verify: 1. **uv is available (dependencies are automatically installed via inline script metadata:no venv or manual pip install required) 2. TheAPI key is configured** in the `.env file where Claude is running: ` ELEVENLABS_API_KEY=your-key-here ` 3. **Audio file exists** and is a supported format (mp3, wav, mp4, m4a, ogg, flac, webm, etc.) **MUST** stop if the API key is missing : inform the user to add it to their .env file. </prerequisites> <process> **Step 1: Parse user input** Extract the audio file path and any options from $ARGUMENTS or the user's message. Supported options: - --output <path> or -o <path> : where to save the transcript - --language <code> : ISO-639 language code (e.g., eng, spa, fra, deu, jpn, zho) - --num-speakers <n> : max speakers in the audio (1-32) - --keyterms "term1" "term2" : words/phrases to bias transcription towards - --timestamps none|word|character : timestamp granularity - --no-diarize : disable speaker identification - --no-audio-events : disable audio event tagging - --json : output full JSON response **Step 2: Validate the audio file** Confirm the file path exists. Expand ~ paths. The script handles validation automatically but check early for a clear error message. **Step 3: Check for API key** `bash grep -q "ELEVENLABS_API_KEY=" .env 2>/dev/null && echo "API key configured" || echo "API key missing" ` If missing, tell the user to add ELEVENLABSAPIKEY = to their .env file and **stop**. **Step 4: Run transcription** Dependencies are installed automatically by uv via inline script metadata (PEP 723). No venv or manual pip install needed. Basic transcription (diarize + audio events + auto language): `bash uv run ~/.claude/skills/elevenlabs-transcribe/scripts/transcribe.py "<audio_file_path>" ` With output file and options: `bash uv run ~/.claude/skills/elevenlabs-transcribe/scripts/transcribe.py "<audio_file_path>" --output transcript.txt --language eng --num-speakers 3 ` With key terms for better accuracy: `bash uv run ~/.claude/skills/elevenlabs-transcribe/scripts/transcribe.py "<audio_file_path>" --keyterms "technical term" "product name" ` Full JSON response: `bash uv run ~/.claude/skills/elevenlabs-transcribe/scripts/transcribe.py "<audio_file_path>" --json --output result.json ` **Step 5: Present results** Format the transcription output cleanly for the user. If diarization is enabled, group text by speaker. Highlight any audio events detected. Example output: ` [Speaker 0]: Hello, how are you doing today? [Speaker 1]: I'm doing great, thanks for asking! (laughter) ` </process> <script_options> | Flag | Description | Default | |------|-------------|---------| | <file> | Path to audio/video file (required) | - | | --output <path>, -o | Save transcription to file | stdout | | --language <code> | ISO-639 code (eng, spa, fra, deu, jpn, zho) | auto-detect | | --num-speakers <n> | Max speakers in audio (1-32) | auto-detect | | --keyterms "t1" "t2" | Terms to bias transcription towards (max 100) | none | | --timestamps <level> | Granularity: none, word, character | word | | --no-diarize | Disable speaker identification | diarize enabled | | --n