Skip to content
/ PSYT Public

PowerShell Module for Retrieving YouTube Transcripts

License

Notifications You must be signed in to change notification settings

Blindpete/PSYT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSYT

drawing

PowerShell Module for Retrieving YouTube Transcripts

Using the Module

Install-Module -Name PSYT

Example

Reqirements:

In this example, we will retrieve the transcript of a YouTube video and then generate a summary of the main points and key takeaways from the transcript using the GPT-4o-mini model.

# Source: https://youtu.be/OHQFObW6PXA
$transcriptParams = @{
    videoId            = 'OHQFObW6PXA'
    IncludeTitle       = $true
    IncludeDescription = $true
}

$transcript = Get-Transcript @transcriptParams

$summaryInput = @"
# Title:
$($transcript.title)

# Description:
$($transcript.description)

# Transcript:
$($transcript.transcript | Out-String)
"@

$summaryParams = @{
    Instructions = 'Write a concise summary of the with 3-5 bullet points that highlight the key points or takeaways from the video transcript, include the title and details from the description.'
    model        = 'gpt-4o-mini'
    UserInput    = $summaryInput
}

$summary = ai @summaryParams
$summary | glow

Output

Summary of "AI Development for a Non-Developer"

  • Introduction to Generative AI: The video guides non-developers on utilizing GPT models and explains the basics of AI application development using Python.

  • Setting Up the Environment: Instructions on installing Python, necessary libraries (like Azure Identity and OpenAI API), and the Azure CLI to set up the development environment.

  • Creating and Deploying Models: The video details the process of creating an OpenAI resource in Azure, deploying a GPT model, and using Azure AI Studio for model management.

  • Building a Simple GPT Application: Steps to create a text-based application for interacting with the GPT model, including managing user input, tracking memory of interactions, and handling tokens effectively.

  • Final Thoughts: Emphasis on the simplicity of the coding process, encouragement to explore AI tools like Copilot and GPT for coding assistance, and the importance of using orchestration tools for more complex development in the future.


TODO

  • Add more examples
  • Fix encode issue
  • Add getting video description
  • Add getting video title
  • Add getting video chapters

About

PowerShell Module for Retrieving YouTube Transcripts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published