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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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