mcpbeat Sign in

Audio to SRT Converter Agent Skill

This skill should be used when the user asks to "convert audio to srt", "generate subtitles from audio", "create srt from mp3/wav/m4a/flac", "transcribe audio to subtitles", or needs to generate SRT subtitle files from audio files (MP3, WAV, M4A, FLAC, etc.) with customizable character limits and timeline adjustments.

3k tokens
context cost
the whole folder, loaded on every use
2
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
200
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/dean9703111/ai-agent-skill-for-video-workflow --skill Audio to SRT Converter

The instruction itself

18 sections, as written by the author

Audio to SRT Converter

This skill provides a Python-based workflow for converting audio files (MP3, WAV, M4A, FLAC, etc.) into SRT subtitle files with automatic speech recognition, customizable text formatting, and timeline optimization.

Purpose

Convert audio files (MP3, WAV, M4A, FLAC, etc.) into properly formatted SRT subtitle files with:

  • Automatic speech recognition and transcription
  • Support for multiple audio formats (MP3, WAV, M4A, FLAC, and more)
  • Customizable character limits per subtitle line (default: 22 characters, minimum: 4 characters)
  • Automatic timeline gap filling (gaps < 0.3s are merged)
  • Environment and dependency validation
  • Output naming convention: origin.srt

When to Use This Skill

Use this skill when:

  • Converting audio files to subtitle format
  • Generating transcriptions with timeline information
  • Creating SRT files for video editing or accessibility
  • Processing Chinese or multilingual audio content

Core Workflow

1. Environment Validation

Before processing, validate:

  • Python 3.7+ is installed
  • Required packages are available (see Dependencies section)
  • Input MP3 file exists and is readable
  • Output directory is writable

2. Audio Transcription

Process the audio file using speech recognition:

  • Load audio file (supports MP3, WAV, M4A, FLAC, etc.)
  • Perform speech-to-text conversion
  • Extract timestamps for each segment
  • Handle silence detection and word boundaries

3. Text Formatting

Format transcribed text according to parameters:

  • Split text into lines based on character limit
  • Ensure minimum 4 characters per line
  • Respect word boundaries when possible
  • Handle Chinese character counting correctly

4. Timeline Optimization

Adjust subtitle timing:

  • Identify gaps between subtitle segments
  • Merge segments when gap < 0.3 seconds
  • Extend previous subtitle end time to next subtitle start time
  • Maintain synchronization with audio

5. SRT Generation

Create final SRT file:

  • Format according to SRT specification
  • Number subtitles sequentially
  • Use proper timestamp format (HH:MM:SS,mmm)
  • Save as origin.srt

Using the Conversion Script

The main conversion script is located at scripts/audio_to_srt.py.

Basic Usage

python scripts/audio_to_srt.py <audio_file> [--max-chars MAX_CHARS]

Parameters

  • audio_file (required): Path to the input audio file (MP3, WAV, M4A, FLAC, etc.)
  • --max-chars (optional): Maximum characters per subtitle line (default: 22, minimum: 4)

Examples

See examples/usage_example.sh for complete usage examples.

Dependencies

The script requires the following Python packages:

  • openai-whisper - For speech recognition
  • pydub - For audio processing
  • ffmpeg - System dependency for audio handling

Install with:

pip install openai-whisper pydub
brew install ffmpeg  # macOS

Output Format

The generated SRT file follows this format:

1
00:00:00,000 --> 00:00:03,500
這是第一行字幕

2
00:00:03,500 --> 00:00:07,200
這是第二行字幕

Additional Resources

Scripts

  • scripts/audio_to_srt.py - Main conversion script with environment validation
  • scripts/check_environment.py - Standalone environment checker

Examples

  • examples/usage_example.sh - Complete usage examples with different parameters

Other skills for the same job

different authors, same section of the catalogue
Canvas Design
by anthropics
vendor ×13

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

1388k tokens
Algorithmic Art
by anthropics
vendor ×10

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

15k tokens scripts
Image Enhancer
by frostant
×6

Improves the quality of images, especially screenshots, by enhancing resolution, sharpness, and clarity. Perfect for preparing images for presentations, documentation, or social media posts.

635 tokens
Video Downloader
by CommandCodeAI
×4

Downloads videos from YouTube and other platforms for offline viewing, editing, or archival. Handles various formats and quality options.

671 tokens
Histolab
by christophacham
×3

Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.

18k tokens
Omero Integration
by christophacham
×3

Microscopy data management platform. Access images via Python, retrieve datasets, analyze pixels, manage ROIs/annotations, batch processing, for high-content screening and microscopy workflows.

32k tokens
Pydicom
by christophacham
×3

Python library for working with DICOM (Digital Imaging and Communications in Medicine) files. Use this skill when reading, writing, or modifying medical imaging data in DICOM format, extracting pixel data from medical images (CT, MRI, X-ray, ultrasound), anonymizing DICOM files, working with DICOM metadata and tags, converting DICOM images to other formats, handling compressed DICOM data, or processing medical imaging datasets. Applies to tasks involving medical image analysis, PACS systems, radiology workflows, and healthcare imaging applications.

13k tokens scripts
Transformers
by christophacham
×3

This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning models on custom datasets.

13k tokens

How to use it

Copy the folder

Take dean9703111/audio to srt converter from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.

Install what it needs

The instructions reference pip, brew. Without those the skill loads but fails at the first command.