Affect Effect Eng - Script 2023
Affect Effect Eng - Script 2023
Narrator: "Are you battling a mountain of video tutorials, taking up space, and craving
your attention? Here's a solution - automate video summarization using free and open-
source tools! You don't need to be a programming wizard for this – just a Windows PC
with a decent graphics card is enough.
All the scripts are in a github repo. The link is in the video below. Everything is open
sourced and free. Whisper A I is a English speech recognition library from Open A I.
First Part: extract audio frome video. We'll be leveraging two programs: Chocolatey, a
package manager for Windows, and F F M peg, an open-source software for audio
extraction.
Step 1 Install Chocolatey. Open PowerShell with administrator rights. Navigate to the
start menu, search for "PowerShell", right-click, and choose "Run as administrator".
Now run the following commands to install Chocolatey.
Step 2 - Install F F M peg. Chocolatey simplifies the installation process. All you need is
this short command!
After the installation, confirm it by running 'ffmpeg -version'.
Step 3 - Run script to extract audio. Now, let's dive into the main tasks – extracting
audio and transcribing it. Create a main folder. Your video can be in the main folder or in
subfolder. A little note - the default Windows PowerShell 5 will process one video file at
a time. If you're not dealing with a ton of videos, this is okay. But, for larger batches,
consider downloading PowerShell 7, use the option B and run the extraction using multi
thread.
Eng script 1
A. Powershell 5 option
3. copy and paste to run the single-thread audio to video powershell 5 script
4. copy and paste to run the multi-threads audio to video powershell 7script
After running the audio extraction script, you will see a new m p 3 folder in your main
folder.
Narrator: "Now that we've converted our video content into audio, it's time for second
part transforming audio into text with Whisper AI.
First off, we'll need a Whisper module. download it, extract it and move the folder to this
location. Change the path to your user name.
Eng script 2
'C:\Users\XXXX\Documents\WindowsPowerShell\Modules', where 'XXXX' is your
username.
Next, you'll need a Whisper A I model for transcribing. I recommend using 'g g m l
medium' for its optimal balance of transcription quality and processing speed.
Now, let's get to transcribing. Here's the script you'll need. Remember, you need to
adjust the model path and the mp3 folder path
Now, let's get to transcribing. Here's the script you'll need. Remember, you must adjust
the model path to where you've saved the downloaded Whisper model and video folder
path
With this script, you can transcribe all the audio files in one go!
Narrator: "And there you have it! Your video tutorial is now summarized, thanks to the
power of AI. Now you can grasp the essence of your lengthy video content in a fraction
of the time. Happy summarizing!"
Eng script 3
# Define the path to the folder containing the video files
$videoFolderPath = "G:\summary\mp3"
# Transcribe all *.mp3 and *.m4a files in the defined folder and its subfolders
Get-ChildItem -Path $videoFolderPath -Recurse -include *.mp3, *.m4a | Transcribe-File $Mod
el | foreach { $_ | Export-Text (Join-Path -Path $videoFolderPath -ChildPath ($_.SourceNam
e + ".txt")) }
####!!!
# need to run PowerShell 7
####!!!!
Eng script 4
# Convert video to mp3
$mp3Path = Join-Path -Path $subDirectoryPath -ChildPath ($_.BaseName + '.mp3')
ffmpeg -i $_.FullName -vn -acodec libmp3lame $mp3Path
}
powershell 5
Prompt:
Please provide an in-depth summary of the key ideas and details in the provided passage. I
nclude the following in your summary:
An introduction briefly describing the overall topic and purpose of the passage
A detailed breakdown of each main idea or section, summarizing the key points and supporti
Eng script 5
ng details
Examples, quotes, or specific data used in the passage to illustrate the concepts
An explanation of how ideas connect and build off each other
A conclusion restating the main purpose and highlighting the most important takeaways
Be comprehensive but concise in summarizing all relevant points and information
Use your own words as much as possible while accurately representing the original content
Please write your response in multiple paragraphs, providing as much relevant detail and e
xpansion on the passage as you can
Eng script 6