A helper package for creating title and description for your YouTube videos based on transcription.
Project description
youtube-doc
youtube-doc
is a Python package designed to assist in creating titles and descriptions for your YouTube videos based on transcriptions. This tool extracts audio from video files, transcribes the audio, corrects transcription errors, and generates engaging YouTube titles and descriptions.
Features
- Audio Extraction: Extracts audio from video files.
- Transcription: Transcribes the extracted audio using OpenAI's Whisper model.
- Transcription Correction: Corrects errors in the transcription to ensure accuracy.
- Script Rewriting: Enhances storytelling by rewriting scripts to make them more exciting.
- YouTube Title & Description Generation: Generates compelling YouTube titles and descriptions based on the corrected transcription.
Installation
You can install youtube-doc
via PyPI:
pip install youtube-doc
Alternatively, you can clone the repository from GitHub:
git clone https://github.com/gomleksiz/ytdoc.git
cd ytdoc
pip install .
Usage
The main functionality of youtube-doc
is accessible through a command-line interface (CLI). Below are some examples of how to use it:
Basic Command
To extract audio from a video file, transcribe it, correct the transcription, rewrite the script (optional), and generate a YouTube title and description:
ytdoc <video_path> <output_path> <additional_prompt>
Options
--no-extract
: Skip audio extraction if you already have an audio file.--no-transcribe
: Skip transcription if you already have a transcript.--no-fix
: Skip transcription correction if you don't need it or have already corrected it.--rewrite
: Rewrite the script to make it more engaging.
Example
ytdoc my_video.mp4 output_audio.mp3 "Include tips on video editing"
This command will:
- Extract audio from
my_video.mp4
. - Save the extracted audio as
output_audio.mp3
. - Transcribe the extracted audio.
- Correct any errors in the transcription.
- Generate a compelling YouTube title and description with additional context provided by
"Include tips on video editing"
.
Environment Variables
Ensure that you have set up your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your_openai_api_key'
Development Setup
If you want to contribute or modify this project, follow these steps:
-
Clone the repository:
git clone https://github.com/gomleksiz/ytdoc.git cd ytdoc
-
Install dependencies:
pip install -r requirements.txt
-
Run tests (if available):
pytest tests/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.
Author
Huseyin Gomleksizoglu
Email: huseyim@gmail.com
For more information, visit GitHub Repository.
Feel free to reach out if you encounter any issues or have suggestions for improvements!
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
Built Distribution
Hashes for youtube_doc-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a919985d297f5ef3c98f57fab0543c7bbc36d33a63d541c650de5253c2f1302 |
|
MD5 | 81f6aee689050b35ffc9f9bccf7cc78b |
|
BLAKE2b-256 | ea368e3d59c4229d09fc8ebddd9a2c583fba6662db084695b0593e5045f1afe7 |