https://github.com/hoishing/yt-transcribe
Youtube Transcript Extract and Transcribe
https://github.com/hoishing/yt-transcribe
groq transcriber youtube
Last synced: 4 months ago
JSON representation
Youtube Transcript Extract and Transcribe
- Host: GitHub
- URL: https://github.com/hoishing/yt-transcribe
- Owner: hoishing
- Created: 2025-03-03T08:12:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-08T14:25:50.000Z (over 1 year ago)
- Last Synced: 2025-08-26T17:34:46.002Z (10 months ago)
- Topics: groq, transcriber, youtube
- Language: Python
- Homepage: https://pypi.org/project/yt-transcribe
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Youtube Transcript Extract and Transcribe
This package provides a simple way to extract and transcribe Youtube videos.
- If transcript is available, you can use `Extractor` to get the transcript.
- If no transcript is disabled, you can use `Transcriber` to transcribe the video with Whisper from Groq.
## Installation
```bash
pip install yt-transcribe
```
Put your `GROQ_API_KEY` in `.env`
## Usage
```python
from yt_transcribe import Extractor, Transcriber, list_available_languages
# list available transcript languages for a video
list_available_languages("https://www.youtube.com/watch?v=dQw4w9WgXcQ") # ["en"]
# raise `TranscriptsDisabled` for a video disabled transcript
list_available_languages("https://youtube.com/shorts/NbY29sW7gbU?si=EJpsZdXvUArCIBr3") # raise
# video with transcript
extractor = Extractor(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ", lang="en")
print(extractor.formatted_transcript(format="srt")) # format: srt, txt, webvtt
# video without transcript, use whisper to transcribe
transcriber = Transcriber(url="https://youtube.com/shorts/NbY29sW7gbU?si=EJpsZdXvUArCIBr3")
print(transcriber.transcript)
# video without transcript, specify language to enhance accuracy
transcriber = Transcriber(url="https://youtube.com/shorts/NbY29sW7gbU?si=EJpsZdXvUArCIBr3", lang="zh")
print(transcriber.transcript)
```