Skip to content

Add subtitles to videos by feeding audio to vosk-api (offline nn speech-to-text)

Notifications You must be signed in to change notification settings

themultiplexer/videosubtool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Subtool

Add subtitles to video by feeding audio to vosk and resulting text into (soft-)subtitled mkv. All spoken words are extracted into a json file for further processing, like searching in a subtitled video.

Requirements

Packages

  • ffmpeg-python
  • vosk

Download e.g. german from and rename folder to model.

Generating Subtitles / Extracting Words

subtool.py <input_video_filename>

Outputs:

  • <input_video_filename>.mkv - Video with subtitles
  • <input_video_filename>.json - List of sspoken words with timestamp and accuracy of detected words (directly from vosk)
  • <input_video_filename>.ass - Subtitles in SubStation Alpha Format
  • output.wav - Temporary Audio file

About

Add subtitles to videos by feeding audio to vosk-api (offline nn speech-to-text)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages