Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLS Model Code From Scratch #13

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

anushkasaxena07
Copy link

@anushkasaxena07 anushkasaxena07 commented May 3, 2024

#2 [DMP 2024]: Auto Subtitler for Indian Languages #2
Please find below a description of a Python script that can generate SRT (SubRip) files for videos in Tamil, Telugu, and Kannada languages. The script takes a video file and a corresponding text file as input and generates SRT files with subtitles for the given video content. Here is a step-by-step guide on how the script works and what you need to run it:

  1. Purpose: The script is designed to generate SRT files with subtitles for Tamil, Telugu, and Kannada videos. The output file will have the same name as the input video file, with the language appended at the end (for example, example_video_Tamil.srt).

  2. How it Works:

    • The script first loads the video content and the text content from the provided files.
    • Depending on the language chosen (Tamil, Telugu, or Kannada), it aligns and segments the text to synchronize with the video content.
    • The alignment and segmentation are language-specific, with separate methods for Tamil, Telugu, and Kannada.
    • Finally, it creates SRT files with the generated subtitles.
  3. What's Needed:

    • Video File: You need a video file in a format that can be processed. Make sure to provide the correct path to the video file (for example, example_video.mp4 in this script).
    • Text File: You need a text file containing the transcript or dialogue of the video. This text should correspond to the language of the video. Provide the path to this file (for example, example_text.txt in this script).
    • Dependencies: The script relies on Python's standard library and does not require any additional dependencies.
  4. Running the Script:

    • Save the script into a Python file (for example, subtitle_generator.py).
    • Place your video file and text file in the same directory as the script.
    • Run the script in a Python environment.
    • It will generate SRT files for each language specified (Tamil, Telugu, and Kannada), each named after the video file with the language appended (for example, example_video_Tamil.srt).
    • Check the console output for confirmation of successful SRT generation.

Please note that the placeholder methods (load_video, align_and_segment_tamil, align_and_segment_telugu, align_and_segment_kannada) in the script need to be replaced with actual implementations tailored to your requirements, especially for loading the video and aligning/segmenting the text based on the language.

@anushkasaxena07
Copy link
Author

#10 done

@anushkasaxena07
Copy link
Author

#11 done

@anushkasaxena07
Copy link
Author

issue #13 #2 #11 #10 #12 done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant