No project description provided
Project description
Transcribe YouTube videos using Whisper models
Adopts faster_whisperer, a cTransformer's based model for faster transcription.
Usage
from youtescribe import transcribe
transcript = transcribe(url="https://www.youtube.com/watch?v=9bZkp7q19f0")
transcript.text()
Prompting
By default, the video title and description are used as prompts to the transcription model. But you can also specify your own prompt:
transcript = transcribe(
url="https://www.youtube.com/watch?v=9bZkp7q19f0",
prompt="Enter prompt here"
)
You can also choose not to include prompt by setting prompt=False
.
transcript = transcribe(
url="https://www.youtube.com/watch?v=9bZkp7q19f0",
prompt=False
)
Working with WhisperTranscript
objects
The transcribe()
function, if executed successfully, will return a WhisperTranscript
object. You can view the transcript as plain text, SRT-formatted text, or a Python dictionary.
transcript = transcribe(
url="https://www.youtube.com/watch?v=9bZkp7q19f0",
prompt=False
)
transcript.text()
transcript.srt()
transcript.json()
transcript.segment
Customise Whisper model
In the transcribe function, you can pass your own custom Whisper model:
from youtescribe import WhisperTranscriber
from youtescribe import models
custom_transcriber = WhisperTranscriber(model_size = models.TINY_EN, cpu_threads=6, device="auto")
transcript = transcribe(
url="https://www.youtube.com/watch?v=9bZkp7q19f0",
transcriber=custom_transcriber
)
transcript.text()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
youscribe-0.0.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for youscribe-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60c2ff4dc905aaff645bee741db99f7c4d84a32f8cb5392d117301bdb7ce970a |
|
MD5 | 753ec9bfa2fcd1f36f1e58f4a58cefa6 |
|
BLAKE2b-256 | e2c1494066d16af9b5ea2eb418cdf20c79e222265e6d17626087971526b6d8fd |