Skip to main content

youtube-ai-resume

Generate concise AI summaries of YouTube videos from the command line.

It works in two steps:

  1. Downloads the video caption (subtitles) with pytubefix.
  2. Sends the caption to the OpenAI API and returns a summary in the language you choose.

PyPI Python Version License


Features

  • Zero-setup CLI → youtube-ai-resume <video_url>
  • Summaries in any language (default en_US)
  • Works with models like gpt-4.1-mini (configurable)
  • Rich-formatted output with colours
  • Usable as a library (import youtube_ai_resume)

Installation

# Python ≥ 3.9
pip install youtube-ai-resume

Or, from source for development:

git clone https://github.com/fberbert/youtube-ai-resume.git
cd youtube-ai-resume
pip install -e ".[dev]"     # editable + dev tools

Quick start

Command Line Usage

export OPENAI_API_KEY="sk-..."
youtube-ai-resume https://www.youtube.com/watch?v=Ht2QW5PV-eY

Sample output:

Summary:

The speaker, Dashish, an engineer on OpenAI’s product team, discusses advancements in AI agents that integrate improved models with powerful tools to 
enhance user experience. Key points include:

- **Symbiotic Improvement**: Better tools enable more capable AI agents, which in turn can utilize more powerful tools, creating a continuous cycle of 
enhancement.
- **Agent Capabilities**: The AI agent can access various personal tools and data sources, such as Gmail and Google Calendar, through connectors to perform
complex tasks.
- **Use Case - Booking a Tennis Tournament Itinerary**:
  - The agent is tasked with planning a detailed itinerary for a tennis tournament in Palm Springs, focusing on semi-final dates.
  - It checks the tournament schedule, the user’s calendar availability, flight options, hotel bookings, match attendance, and dining plans.
  - The agent uses a visual browser and personal data access to gather and coordinate all necessary information.
- **User Experience**: The agent automates the research and planning process, handling logistical details like travel time and meeting schedules, then 
notifies the user with a comprehensive plan to review.
- **Benefit**: This automation frees users from mundane tasks, allowing them to focus on the core activities they care about.

Overall, the presentation highlights how integrating AI models with personal data and external tools can create intelligent agents that manage complex, 
personalized planning tasks efficiently.

Library usage

from youtube_ai_resume import caption, summarizer

txt = caption.fetch_caption("Ht2QW5PV-eY")
summary = summarizer.summarize(
    transcript=txt,
    api_key="sk-…",
    model="gpt-4.1-mini",
    out_lang="en_US"
)
print(summary)

Proxy Support (Optional)

If you need to access YouTube or OpenAI via a proxy (for example, in cloud environments or to bypass IP restrictions), you can configure HTTP and HTTPS proxies in your config file.

How to configure

Add the following fields to your ~/.config/youtube-ai-resume/config.json:

{
  "proxy_http": "http://username:password@proxy_ip:proxy_port",
  "proxy_https": "http://username:password@proxy_ip:proxy_port"
}

Example:

{
  "proxy_http": "http://fabio:xxxx@187.84.229.156:3128",
  "proxy_https": "http://fabio:xxxx@187.84.229.156:3128"
}

If you do not need a proxy, simply leave these fields blank or omit them.

Design rationale:

  • Proxy configuration is optional and does not affect local usage.
  • The format is compatible with standard Python libraries and environment variables (HTTP_PROXY, HTTPS_PROXY).
  • Credentials and port are included in the URL for authenticated proxies.

Security note: Never share your proxy password publicly.


Voice narration (Text-to-Speech) [Optional]

You can optionally have the summary narrated aloud using Google Cloud Text-to-Speech (TTS).

Optional Requirements (only if you want voice narration)

  • A service account key (JSON) with permission to use TTS
  • The dependencies google-cloud-texttospeech and playsound (already included in requirements.txt)

Optional Setup

  1. Create a project in Google Cloud and enable the Text-to-Speech API.
  2. Generate and download a service account credentials file (JSON).
  3. Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your credentials file:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account.json"

The default path is ~/.config/youtube-ai-resume/.google-credentials.json. You can customize this path in your config file.

{
    "google_credentials": "~/.config/youtube-ai-resume/.google-credentials.json"
}

Usage

  • To hear the summary narration, add the --voice option to the command:
youtube-ai-resume --voice 'https://www.youtube.com/watch?v=Ht2QW5PV-eY'
  • To enable narration by default, add to your config.json:
{
    "voice_enabled": true
}

You can customize voice, language, and speed in config.json (see code examples).


You can set the OpenAI API key as an environment variable or in a config file.

Environment variable:

OPENAI_API_KEY="sk-..."

Config file at ~/.config/youtube-ai-resume/config.json (auto-created on first run) lets you change the default model.

{
    "model": "gpt-4.1-mini",
    "out_lang": "en"
}

Development

Contributions are welcome!

Fork ➜ branch ➜ PR.

ruff check . and pytest must pass.

Describe your change clearly.

License

Released under the MIT License – see LICENSE.

Author

Fabio Berbert fberbert@gmail.com

I am open for job opportunities and collaborations.

References

Metadata

Release files for youtube-ai-resume 0.0.17

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

Source distribution (sdist)

Source distribution for youtube-ai-resume 0.0.17
File Size Uploaded
youtube_ai_resume-0.0.17.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for youtube-ai-resume 0.0.17
File Interpreter ABI Platform
youtube_ai_resume-0.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 20.5 kB

Release files / youtube_ai_resume-0.0.17.tar.gz

Download URL youtube_ai_resume-0.0.17.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b3562a0d86c3e0ba6a096cedab96840693f5a04bd91e05b4a34b9f5c75200acc
BLAKE2b-256 checksum
How to use checksums
69b562aedf25c5a1c4b353a236a8ee3ee1ad582e6a564706d65f92ab0464316a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / youtube_ai_resume-0.0.17-py3-none-any.whl

Download URL youtube_ai_resume-0.0.17-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78ad012baaa10c6849527b1706f18c33698b4f0ab2a62e858d89e7cdf2911f98
BLAKE2b-256 checksum
How to use checksums
33acb490131772b21a1ab62f01673b619fe00545e24b2c7264cb9e0b51a90e41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.17 This release

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

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