Skip to content

baranasoftware/video-transcriptions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Transcriptions

Demo of using Whisper for video transcriptions.

Setup

Follow set up instructions at https://github.com/openai/whisper.

  • Install OpenAI Whisper:
pip install -U openai-whisper
  • Install ffmpeg into your environment:
sudo apt update && sudo apt install ffmpeg
  • Run using python3
python3 transcribe.py 
import whisper
import os

model = whisper.load_model("turbo")
for file in os.listdir("data"):
    if file.endswith((".mp4", ".mkv", ".mov", ".mp3", ".wav")):
        path = os.path.join("data", file)
        result = model.transcribe(path)
        with open(path + ".srt", "w") as f:
            f.write(result["text"])

Demo

Transcripts were generated for two samples:

About

Demo of using Whisper for video transcriptions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages