YT2TEXT
Extract text from a YouTube video in a single command, using OpenAi's Whisper speech recognition model. It doesn't use disk, performs everything in memory.
INSTALL:
pip install yt2text
Whisper requires ffmpeg to be installed in your computer. Check Whisper's requirements https://github.com/openai/whisper#setup
USAGE:
You'll only interact with the get_text function. It takes a YouTube URL as an argument and returns the text as a string.
import yt2text
text = yt2text.get_text("https://www.youtube.com/watch?v=fLeJJPxua3E")
print(text)
OPTIONAL ARGUMENTS:
model: Set Whisper model (tiny,base,small,medium or large). Check here for details: https://github.com/openai/whisper#available-models-and-languages
Defaults to "base" which should be good enough for most cases. The first time you use a model, it will be downloaded first.
verbose Set True to print each step of the process. Defaults to False, it only prints if there is an error.
Usage with optional arguments
import yt2text
text = yt2text.get_text("https://www.youtube.com/watch?v=fLeJJPxua3E", model="medium", verbose=True)
print(text)
Contact
Raise an Issue in yt2text's GitHub repo https://github.com/atahanuz/yt2text
Metadata
Release files for yt2text 1.0.2
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 | |
|---|---|---|---|---|
| yt2text-1.0.2.tar.gz | 2.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yt2text-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / yt2text-1.0.2.tar.gz
| Download URL | yt2text-1.0.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b31f4920f7a69d0bb75acea9fab928b11f93277f370b2664936d2300c72ff766
|
|
BLAKE2b-256 checksum How to use checksums |
d7cc0c3667cb2acb961e9bcc67fa7c011947de7634a6c60d82eae3d948e5a21e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / yt2text-1.0.2-py3-none-any.whl
| Download URL | yt2text-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24b8846f860c411cd71a5aee3d6771927a687810a7e0b06f0961604785981af6
|
|
BLAKE2b-256 checksum How to use checksums |
a23606200f01b86132424dbbd7668701cc7e92906c7e5ece9a305fa0eb741cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for yt2text 1.0.2
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.