This project involves converting video speech to text using the Whisper ASR model and generating subtitles. The code is designed for a specific use case and includes features such as splitting the text into lines, creating captions, and overlaying them on the original video.
- Clone the repository:
git clone <repository-url>
- Install the required dependencies using the provided pip installations and apt-get commands.
- Mount Google Drive to access video files:
drive.mount('/content/drive')
- Provide the path to the input video:
input_video_path = "/content/drive/MyDrive/video/sample.mp4"
- Run the notebook to convert the video to text, split it into lines, and generate subtitles.
- Adjust parameters such as
MaxChars
,MaxDuration
, andMaxGap
in the code as needed. - The final output video with subtitles will be saved as
output.mp4
in the specified Google Drive location.
Make sure to install these dependencies before running the code.