Skip to main content

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:

  1. Extract audio from my_video.mp4.
  2. Save the extracted audio as output_audio.mp3.
  3. Transcribe the extracted audio.
  4. Correct any errors in the transcription.
  5. 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:

  1. Clone the repository:

    git clone https://github.com/gomleksiz/ytdoc.git
    cd ytdoc
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube-doc-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youtube_doc-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file youtube-doc-0.1.0.tar.gz.

File metadata

  • Download URL: youtube-doc-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for youtube-doc-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c4da973cc73c1a84c0c5e53d2cf563446a7f76b17f991529dd31e4a322ae4be
MD5 88a062db65463cc81c5648156f1bf879
BLAKE2b-256 0105745e3bcfca2894c779ea20c9721dd67968b359707f938111dedce01d2a35

See more details on using hashes here.

File details

Details for the file youtube_doc-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: youtube_doc-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for youtube_doc-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a919985d297f5ef3c98f57fab0543c7bbc36d33a63d541c650de5253c2f1302
MD5 81f6aee689050b35ffc9f9bccf7cc78b
BLAKE2b-256 ea368e3d59c4229d09fc8ebddd9a2c583fba6662db084695b0593e5045f1afe7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page