Skip to main content

Faster YouTube Summary

Faster YouTube Summary is a powerful tool designed to quickly generate detailed summaries of YouTube videos using the Groq API. This tool can deliver a comprehensive summary of a YouTube video in just 2 seconds (provided the video has native captions).

Features

  • Fast summaries: Generate detailed summaries in a few seconds.
  • Multilingual support: Generate summaries in multiple languages.
  • FASTER mode: Toggle between faster summary generation or higher-quality summaries.
  • CLI support: Generate YouTube summaries directly from your terminal.

Installation

To install the necessary dependencies, run the following command:

pip install fasteryoutubesummary

Setup

Faster YouTube Summary leverages the Groq API to provide fast and accurate responses from large language models (LLMs). To use this tool, you'll need a Groq API key.

  1. Obtain your API key from the Groq Console:
    Get your Groq API key

  2. Once you have your API key, set it as an environment variable:

export FYS_GROQ="YOUR_API_KEY"

For Windows users:

  • Command Prompt:

    set FYS_GROQ="YOUR_API_KEY"
    
  • PowerShell:

    $env:FYS_GROQ="YOUR_API_KEY"
    

Basic Usage in Python

After setting up, you can use Faster YouTube Summary in your Python project with the following code:

from fasteryoutubesummary import get_video_summary
import os

url = input("Enter the URL of the YouTube video: ")
api_key = os.environ.get("FYS_GROQ")
summary = get_video_summary(url, api_key, return_summary_only=False)

print(summary)

Programmatic Options:

  • url and api_key are required parameters.
  • return_summary_only: If True, returns only the summary text (default: True). If False, it generates a website summary.

To receive the summary as plain text only:

from fasteryoutubesummary import get_video_summary
import os  

url = input("Enter the URL of the YouTube video: ")
api_key = os.environ.get("FYS_GROQ")
summary = get_video_summary(url, api_key, return_summary_only=True)

print(summary)

Command-Line Interface (CLI) Usage

You can also generate YouTube summaries directly from the command line using the fys command after installing the package.

Basic CLI Command

fys https://www.youtube.com/watch?v=VIDEO_ID

This will generate a text summary of the specified YouTube video.

Command-Line Options

fys [URL] [OPTIONS]
  • URL: The YouTube video URL (required).
  • -f, --faster: Enables faster mode (FASTER), prioritizing speed over accuracy.
  • -w, --website: Generates a website summary instead of plain text.
  • -l, --language [LANGUAGE]: Sets the output language. Supported languages: ENGLISH, SPANISH, GERMAN, FRENCH, ITALIAN, JAPANESE.

Example Usages

1. Basic text summary:

fys https://www.youtube.com/watch?v=o-2ybJPgtjA

2. Generate summary in faster mode:

fys https://www.youtube.com/watch?v=o-2ybJPgtjA --f

3. Generate a website summary:

fys https://www.youtube.com/watch?v=o-2ybJPgtjA --w

4. Generate a summary in Japanese:

fys https://www.youtube.com/watch?v=o-2ybJPgtjA --language JAPANESE

5. Combine multiple options (faster mode and website summary in Japanese):

fys https://www.youtube.com/watch?v=o-2ybJPgtjA --f --w --language JAPANESE

Multilingual Output

Thanks to the Groq API, Faster YouTube Summary supports multiple languages. To generate a summary in a different language, use the language parameter:

from fasteryoutubesummary import get_video_summary
import os  

url = input("Enter the URL of the YouTube video: ")
api_key = os.environ.get("FYS_GROQ")
summary = get_video_summary(url, api_key, language='JAPANESE', return_summary_only=True)

print(summary)

Supported Languages:

Language Language Code
English ENGLISH
Spanish SPANISH
German GERMAN
French FRENCH
Italian ITALIAN
Japanese JAPANESE

FASTER Mode

Although the default model is optimized for accuracy, Faster YouTube Summary provides an optional FASTER mode for speed optimization:

fys https://www.youtube.com/watch?v=o-2ybJPgtjA --f

In this mode, summaries are generated faster, though with slightly reduced accuracy.


License

Faster YouTube Summary is licensed under the MIT License. See the LICENSE file for more details.


Contribution

Contributions are welcome! If you'd like to improve this package, feel free to submit a pull request or open an issue on GitHub.


Contact

For any questions or support, feel free to reach out via email.


Metadata

Release files for fasteryoutubesummary 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fasteryoutubesummary 3.1.0
File Size Uploaded
fasteryoutubesummary-3.1.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fasteryoutubesummary 3.1.0
File Interpreter ABI Platform
fasteryoutubesummary-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 kB

Release files / fasteryoutubesummary-3.1.0.tar.gz

Download URL fasteryoutubesummary-3.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b2cf09c299f4ec02b2ad97e2760a9947aaa76f824577a819ba480d0ceb53925f
BLAKE2b-256 checksum
How to use checksums
6251108be400abac51dc3898b27b4cb3fae597f5517433e55f845c03ac7f808d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.3

Release files / fasteryoutubesummary-3.1.0-py3-none-any.whl

Download URL fasteryoutubesummary-3.1.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8312188deb3fb1cdc5d1c1b4584d7b1fe0ccc54f163c62055ca4d7f42ee6953f
BLAKE2b-256 checksum
How to use checksums
01a478651ced5290b7abef95d4cd4f53d6a2a0f86247351248ff318a9eb0d0e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.1

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page