Transcribe YouTube videos using Whisper models
Adopts faster_whisperer, a cTransformer's based model for faster transcription.
Usage
from youscribe 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()
Metadata
Release files for youscribe 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| youscribe-0.0.3.tar.gz | 7.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| youscribe-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.5 kB
Release files / youscribe-0.0.3.tar.gz
| Download URL | youscribe-0.0.3.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
909d53c1876838d298e68868585570d90fae5a310ddb772ca0c8ac045b8d6d20
|
|
BLAKE2b-256 checksum How to use checksums |
497f6b5cb1d2dc3606e8536a33a0da1a99ad4bdfd6bd425c6626e9f9276fc4ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.10
|
Release files / youscribe-0.0.3-py3-none-any.whl
| Download URL | youscribe-0.0.3-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b64f879a91c025091ae22e8e6885e09b3cf7c635bf0e4dde5052fcb9e3a5304
|
|
BLAKE2b-256 checksum How to use checksums |
a54c5d189f8ee6211b2a1d06df8604eeb231f34e813e5c57a72f1b58fce54b4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.10
|
Security for youscribe 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.