yt-text

command module
v0.0.0-...-428c202 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

README

yt-text

Download audio from YouTube and convert it to text using yt-dlp and OpenAI Whisper.

This tool operates as a web server that accepts a YouTube URL (or any other URL supported by yt-dlp) and returns the video's transcript. Alternatively, you can run transcribe.py directly to transcribe a video.

Features

  • Download audio from YouTube and other supported platforms
  • Convert audio to text using OpenAI Whisper
  • Operates as a web server for easy URL submission
  • Direct transcription via transcribe.py

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/yt-text.git
    cd yt-text
    
  2. (Optional) Create a virtual environment and activate it:
    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Run the web server:
    go run main.go
    

Usage

  • To transcribe a video directly, run:
    python transcribe.py <youtube-url>
    
    You can also specify the model name to use for transcription:
    python transcribe.py <youtube-url> --model <model_name>
    
    The default model is base.en. You can choose from other models like tiny, small, medium, large, etc. For more models, visit available models and languages.

Examples

  • Transcribe a video using the default model:
    python transcribe.py <youtube-url>
    
  • Transcribe a video using the base model:
    python transcribe.py <youtube-url> --model base
    

License

This project is licensed under the GNU Affero General Public License (AGPL) version 3. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Acknowledgements

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL