Към всички skills

Audio to SRT Converter

dean9703111 · Инструменти

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 ti

Оригинален текст · няма потвърден превод на български

Първо прочетете инструкцията.

Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.

Оригинален SKILL.md
GitHub хранилище
Звезди на репото
216
Лиценз
Не е посочен. Проверете в репозитория.
Последна проверка на записа
Няма посочена дата

Добавете в своя инструмент.

Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.

npx skills add dean9703111/ai-agent-skill-for-video-workflow

Страницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.

Откъс от SKILL.md

Началото на файла на автора, без превод.

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

Целият SKILL.md в GitHub