Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orhancavus/transcribe_video
Extract Subtitles from YouTube Videos with OpenAI Whisper and Insanely Fast Whisper
https://github.com/orhancavus/transcribe_video
insanely-fast speach-to-text whisper
Last synced: about 16 hours ago
JSON representation
Extract Subtitles from YouTube Videos with OpenAI Whisper and Insanely Fast Whisper
- Host: GitHub
- URL: https://github.com/orhancavus/transcribe_video
- Owner: orhancavus
- Created: 2025-01-08T22:43:10.000Z (about 21 hours ago)
- Default Branch: main
- Last Pushed: 2025-01-08T23:01:12.000Z (about 21 hours ago)
- Last Synced: 2025-01-09T00:21:49.291Z (about 20 hours ago)
- Topics: insanely-fast, speach-to-text, whisper
- Language: Python
- Homepage:
- Size: 20.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Extract Subtitles from YouTube Videos with OpenAI Whisper and Insanely Fast Whisper
Author : Orhan Cavus
Date : January 2025## Download Audio from YouTube
To download audio from a YouTube video, use the following command:
```bash
yt-dlp -x --audio-format mp3 -o "input/video_audio.%(ext)s"
```Example:
```bash
yt-dlp -x --audio-format mp3 -o "input/video_audio.%(ext)s" https://www.youtube.com/watch?v=0Vjh5d5rez0
```## Extract Text from Audio with Whisper
Use the following commands to extract text from the downloaded audio using Whisper:
```bash
whisper input/video_audio.mp3 --model medium
whisper input/video_audio.mp3 --model large --language English --output_format srt
whisper input/video_audio.mp3 --model medium --output_format -f {all} --output_dir output
whisper input/video_audio.mp3 --model medium -f all --output_dir output
whisper input/video_audio.mp3 --model medium --task translate -f srt --output_dir output
```## Extract Text from Audio with Insanely Fast Whisper
For faster transcription, use Insanely Fast Whisper:
[Insanely Fast Whisper GitHub Repository](https://github.com/Vaibhavs10/insanely-fast-whisper)
```bash
insanely-fast-whisper --file-name input/video_audio.mp3 --transcript-path output/output_new.srt --device mps
```## Installation
Install the required packages with the following commands:
```bash
pip install openai-whisper
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
```## Additional Links
- [YouTube to Transcript](https://youtubetotranscript.com/)