Video Generator Voiceover
Small helper scripts for creating timed tutorial voiceovers from .srt files and replacing a video's original audio with the generated voiceover.
Files
video-generator/scripts/combine_video_audio.py— one-step final video generation, or two-step audio replacementvideo-generator/scripts/make_voiceover_macos.py— creates timed WAV/optional MP3 voiceover on macOSvideo-generator/scripts/make_voiceover_windows.py— creates timed WAV/optional MP3 voiceover on Windowsvideo-generator/subtitles/— optional place to keep SRT filesvideo-generator/output/— optional place to save generated audio/video files
Install
Windows
winget install Gyan.FFmpeg
Install Python from python.org or Microsoft Store, then reopen PowerShell and check:
ffmpeg -version
python --version
macOS
brew install ffmpeg
Python is already available on most Macs. If needed, install it from python.org.
One-step flow: create final video from SRT
Use this when you already have the tutorial video and the .srt narration file. It creates temporary voiceover audio, removes the video's original audio, exports the final MP4, and deletes temporary voice parts automatically.
Windows
python video-generator/scripts/combine_video_audio.py `
--video "video-generator/input/your_video.mp4" `
--srt "video-generator/subtitles/your_subtitles.srt" `
--voice "Microsoft David Desktop" `
--rate 0 `
--output "video-generator/output/final_video.mp4"
macOS
python video-generator/scripts/combine_video_audio.py \
--video "video-generator/input/your_video.mp4" \
--srt "video-generator/subtitles/your_subtitles.srt" \
--voice "Daniel" \
--rate 185 \
--output "video-generator/output/final_video.mp4"
--voice and --rate are optional. If omitted, the script uses the default voice and speed for your operating system.
Two-step flow: create voiceover
Use this when you want to review or edit the generated audio before combining it with the video.
Windows
python video-generator/scripts/make_voiceover_windows.py `
--srt "video-generator/subtitles/your_subtitles.srt" `
--voice "Microsoft David Desktop" `
--rate 0 `
--wav "video-generator/output/voiceover.wav" `
--mp3 "video-generator/output/voiceover.mp3"
macOS
python video-generator/scripts/make_voiceover_macos.py \
--srt "video-generator/subtitles/your_subtitles.srt" \
--voice "Daniel" \
--rate 185 \
--wav "video-generator/output/voiceover.wav" \
--mp3 "video-generator/output/voiceover.mp3"
--mp3 is optional. Use WAV when combining with video.
Two-step flow: combine video + audio
This removes the original video audio and uses the generated voiceover.
Windows
python video-generator/scripts/combine_video_audio.py `
--video "video-generator/input/your_video.mp4" `
--audio "video-generator/output/voiceover.wav" `
--output "video-generator/output/final_video.mp4"
macOS
python video-generator/scripts/combine_video_audio.py \
--video "video-generator/input/your_video.mp4" \
--audio "video-generator/output/voiceover.wav" \
--output "video-generator/output/final_video.mp4"
Use absolute paths if files are outside this folder.
Voice and speed options
Windows voice list
Add-Type -AssemblyName System.Speech
$synth = New-Object System.Speech.Synthesis.SpeechSynthesizer
$synth.GetInstalledVoices() | ForEach-Object { $_.VoiceInfo.Name }
Good tutorial voices: Microsoft David Desktop, Microsoft Mark if available.
Windows speed uses -10 to 10:
python video-generator/scripts/combine_video_audio.py `
--video "video-generator/input/your_video.mp4" `
--srt "video-generator/subtitles/your_subtitles.srt" `
--output "video-generator/output/final_video.mp4" `
--voice "Microsoft David Desktop" `
--rate 2
To add voices: Settings > Time & language > Speech > Manage voices > Add voices.
macOS voice list
say -v '?'
Good tutorial voices: Daniel, Reed (English (US)), Eddy (English (UK)).
Speed example:
python video-generator/scripts/combine_video_audio.py \
--video "video-generator/input/your_video.mp4" \
--srt "video-generator/subtitles/your_subtitles.srt" \
--output "video-generator/output/final_video.mp4" \
--voice "Daniel" \
--rate 190
Optional advanced options
These options are not needed for normal usage.
--audio-output "output/voiceover.wav"— saves a copy of the generated voiceover WAV in one-step mode.--keep-temp— keeps temporary voice parts for debugging. By default, temporary files are deleted.--volume 1.2— changes voiceover volume. Default is1.0.--silence-padding 0.15— adds a small pause after each caption if the SRT time slot has enough space. Default is0.0.--sample-rate 48000— changes generated audio sample rate. Default is44100.--channels 1— changes generated audio channels. Use1for mono or2for stereo. Default is2.--reencode-video— re-encodes video with H.264 if the copied video output has compatibility issues.
Example:
python video-generator/scripts/combine_video_audio.py \
--video "video-generator/input/your_video.mp4" \
--srt "video-generator/subtitles/your_subtitles.srt" \
--output "video-generator/output/final_video.mp4" \
--audio-output "video-generator/output/voiceover.wav" \
--volume 1.2 \
--silence-padding 0.15 \
--sample-rate 48000 \
--channels 2
Notes
If a caption has too much text for its time slot, the script keeps the SRT timing and trims the speech. Fix that by increasing the subtitle duration, shortening the sentence, or increasing speed.