# 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:
```bash
pip install youtube-doc
```
Alternatively, you can clone the repository from GitHub:
```bash
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:
```bash
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
```bash
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:
```bash
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:
```bash
git clone https://github.com/gomleksiz/ytdoc.git
cd ytdoc
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Run tests (if available):
```bash
pytest tests/
```
## License
This project is licensed under the MIT License - see the [LICENSE](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](https://github.com/gomleksiz/ytdoc).
---
Feel free to reach out if you encounter any issues or have suggestions for improvements!
Raw data
{
"_id": null,
"home_page": "https://github.com/gomleksiz/youtube-doc",
"name": "youtube-doc",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "youtube video helper library",
"author": "Huseyin Gomleksizoglu",
"author_email": "huseyim@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/01/05/745e3bcfca2894c779ea20c9721dd67968b359707f938111dedce01d2a35/youtube-doc-0.1.0.tar.gz",
"platform": null,
"description": "# youtube-doc\n\n`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.\n\n## Features\n\n- **Audio Extraction**: Extracts audio from video files.\n- **Transcription**: Transcribes the extracted audio using OpenAI's Whisper model.\n- **Transcription Correction**: Corrects errors in the transcription to ensure accuracy.\n- **Script Rewriting**: Enhances storytelling by rewriting scripts to make them more exciting.\n- **YouTube Title & Description Generation**: Generates compelling YouTube titles and descriptions based on the corrected transcription.\n\n## Installation\n\nYou can install `youtube-doc` via PyPI:\n\n```bash\npip install youtube-doc\n```\n\nAlternatively, you can clone the repository from GitHub:\n\n```bash\ngit clone https://github.com/gomleksiz/ytdoc.git\ncd ytdoc\npip install .\n```\n\n## Usage\n\nThe main functionality of `youtube-doc` is accessible through a command-line interface (CLI). Below are some examples of how to use it:\n\n### Basic Command\n\nTo extract audio from a video file, transcribe it, correct the transcription, rewrite the script (optional), and generate a YouTube title and description:\n\n```bash\nytdoc <video_path> <output_path> <additional_prompt>\n```\n\n### Options\n\n- `--no-extract`: Skip audio extraction if you already have an audio file.\n- `--no-transcribe`: Skip transcription if you already have a transcript.\n- `--no-fix`: Skip transcription correction if you don't need it or have already corrected it.\n- `--rewrite`: Rewrite the script to make it more engaging.\n\n### Example\n\n```bash\nytdoc my_video.mp4 output_audio.mp3 \"Include tips on video editing\"\n```\n\nThis command will:\n1. Extract audio from `my_video.mp4`.\n2. Save the extracted audio as `output_audio.mp3`.\n3. Transcribe the extracted audio.\n4. Correct any errors in the transcription.\n5. Generate a compelling YouTube title and description with additional context provided by `\"Include tips on video editing\"`.\n\n## Environment Variables\n\nEnsure that you have set up your OpenAI API key as an environment variable:\n\n```bash\nexport OPENAI_API_KEY='your_openai_api_key'\n```\n\n## Development Setup\n\nIf you want to contribute or modify this project, follow these steps:\n\n1. Clone the repository:\n ```bash\n git clone https://github.com/gomleksiz/ytdoc.git\n cd ytdoc\n ```\n\n2. Install dependencies:\n ```bash\n pip install -r requirements.txt\n ```\n\n3. Run tests (if available):\n ```bash\n pytest tests/\n ```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any changes or improvements.\n\n## Author\n\nHuseyin Gomleksizoglu \nEmail: huseyim@gmail.com \n\nFor more information, visit [GitHub Repository](https://github.com/gomleksiz/ytdoc).\n\n---\n\nFeel free to reach out if you encounter any issues or have suggestions for improvements!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A helper package for creating title and description for your YouTube videos based on transcription.",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/gomleksiz/youtube-doc"
},
"split_keywords": [
"youtube",
"video",
"helper",
"library"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ea368e3d59c4229d09fc8ebddd9a2c583fba6662db084695b0593e5045f1afe7",
"md5": "81f6aee689050b35ffc9f9bccf7cc78b",
"sha256": "5a919985d297f5ef3c98f57fab0543c7bbc36d33a63d541c650de5253c2f1302"
},
"downloads": -1,
"filename": "youtube_doc-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "81f6aee689050b35ffc9f9bccf7cc78b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5342,
"upload_time": "2024-08-13T04:28:31",
"upload_time_iso_8601": "2024-08-13T04:28:31.430280Z",
"url": "https://files.pythonhosted.org/packages/ea/36/8e3d59c4229d09fc8ebddd9a2c583fba6662db084695b0593e5045f1afe7/youtube_doc-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0105745e3bcfca2894c779ea20c9721dd67968b359707f938111dedce01d2a35",
"md5": "88a062db65463cc81c5648156f1bf879",
"sha256": "1c4da973cc73c1a84c0c5e53d2cf563446a7f76b17f991529dd31e4a322ae4be"
},
"downloads": -1,
"filename": "youtube-doc-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "88a062db65463cc81c5648156f1bf879",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5220,
"upload_time": "2024-08-13T04:28:33",
"upload_time_iso_8601": "2024-08-13T04:28:33.136742Z",
"url": "https://files.pythonhosted.org/packages/01/05/745e3bcfca2894c779ea20c9721dd67968b359707f938111dedce01d2a35/youtube-doc-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-13 04:28:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gomleksiz",
"github_project": "youtube-doc",
"github_not_found": true,
"lcname": "youtube-doc"
}