Skip to content

Interactive web tool for automatically ⚙️ transcribing and subtitling videos from URL or file uploads in your chosen language. The transcript appears alongside the video player, complete with embedded subtitles.

License

Notifications You must be signed in to change notification settings

LD239/WebTranscript

Repository files navigation

📝 WebTranscript

Interactive web tool for automatically ⚙️ transcribing and subtitling videos from URL or file uploads in your chosen language. The transcript appears alongside the video player, complete with embedded subtitles.

Explore this GitHub demo page to interact with a pre-processed video file.

preview_app

📝 Generate transcripts with subtitles and video preferences (URL/file) for selected languages 🗨️.

📝 Generate summaries with LLM for quick overviews 📄.

🗨️ Select languages for transcription and subtitling.

💾 Save file with video, transcript, subtitles and timestamps in one file.

📂 Load a file containing the video, transcript, subtitles and timestamps.

Skip Mode selects segments of the transcript to be skipped during playback.

Edit Mode to edit the transcript.

🔊 Single tap mode tap a word once to play.

🕓 Toggles the timestamps on and off.


🐳 Build & Launch ( Docker )

Make sure you have Docker installed.

docker build -t transcript-app -f transcript.dockerfile .
docker run -p 5000:5000 -p 6379:6379 transcript-app
# Stop Redis if it's running locally on that port (6379) or change port:
# sudo systemctl stop redis-server

🐧 Build & Launch ( Linux )

# installation apt-dependencies: Python (3.8 to 3.11), pip, git, redis and ffmpeg
sudo apt update && sudo apt install python3-pip python3-venv git redis-server ffmpeg

# clone git-repo
git clone git@github.com:LD239/WebTranscript.git && cd WebTranscript

# create virtual environment
python3 -m venv transcript-env
source transcript-env/bin/activate

# install pip-dependencies
python3 -m pip install -r requirements.txt

⌨️ bash 1 [start worker]:

sudo systemctl start redis-server
sudo systemctl status redis-server
./transcript-env/bin/celery -A app.celery worker --pool=threads --purge

⌨️ bash 2 [start webserver]:

source transcript-env/bin/activate
python3 app.py

🔍 Details

🏛️ Overview
+-----------------+                                +-----------------+
|   Frontend      |                                |   Web Server:   |
|  User Interface |                                |      Flask      |
+-------+---------+                                +--------+--------+
        |                                                   |                
        | HTTP Request/Response                             | HTTP Request/Response
        |-------------------------------------------------->|
        |                                                   |
        |                                                   |                
        |                    +------------------------------+   
        |                    |                              |
        |                    |                              |
        |                    |                              |
        |      +-------------v--------------+               |
        |      | task processing:           |               |
        |      | Celery + Redis             |               |
        |      +-------------+--------------+               |
        |                    |                              |
        |                    | Async Tasks                  |
        |                    |                              |
        |      +-------------v--------------+               |
        |      | video/audio download       |               |
        |      | yt_dlp                     |               |
        |      +-------------+--------------+               |
        |                    |                              |
        |                    | Video                        |
        |                    |                              |
        |      +-------------v--------------+               |
        |      | audio handling:            |               |
        |      | ffmpeg                     |               |
        |      +----------------------------+               |
        |                    |                              |
        |                    | Audio                        |
        |                    |                              |      
        |      +-------------v--------------+               |
        |      | transcription:             |               |
        |      | Whisper                    |               |
        |      +----------------------------+               |
        |                    |                              |
        |                    | Transcribed Text             |
        |                    |                              |
        |      +-------------v--------------+               |
        |      | translation:               |               |
        |      | googletrans or NLLB        |               |
        |      +----------------------------+               |
        |                    |                              |
        |<-------------------+                              |
        |    Translated Text with Timestamps + Video        |
        +-------------------------------------------------->|
        |                                                   |
        |<--------------------------------------------------+
        |     Updates (Translated Transcriptions, etc.)     |
        |                                                   |
📌 Acknowledge

The software is provided under the ⚖️ MIT licence, but please check the licence terms 📜 of the following: essential tools. Without them, this project wouldn't run smoothly.

📝 Next Steps

  • Add a GUI feature to select a time range in a video for transcription.
  • Enhance the GUI to fine-tune word timestamp.
  • Ensure the GUI is responsive and works on all devices
  • Fix the Summary-Service to work with loaded local files.
  • Add front-end options in JavaScript for users to select different backend services like Ollama, Groq, or OpenAI.
  • Improve application setup with Docker Compose.

Releases

No releases published

Packages

No packages published