feat: one step implement

This commit is contained in:
Tutorial Builder
2026-06-16 13:04:29 +03:30
parent adda6c42b2
commit cad4e681c3
2 changed files with 225 additions and 36 deletions
+43 -13
View File
@@ -4,11 +4,11 @@ Small helper scripts for creating timed tutorial voiceovers from `.srt` files an
## Files
- `scripts/make_voiceover_macos.py` — creates timed WAV/optional MP3 voiceover on macOS
- `scripts/make_voiceover_windows.py` — creates timed WAV/optional MP3 voiceover on Windows
- `scripts/combine_video_audio.py` — replaces video audio and exports final MP4
- `subtitles/` — optional place to keep SRT files
- `output/` — optional place to save generated audio/video files
- `video-generator/scripts/combine_video_audio.py` — one-step final video generation, or two-step audio replacement
- `video-generator/scripts/make_voiceover_macos.py` — creates timed WAV/optional MP3 voiceover on macOS
- `video-generator/scripts/make_voiceover_windows.py`creates timed WAV/optional MP3 voiceover on Windows
- `video-generator/subtitles/` — optional place to keep SRT files
- `video-generator/output/` — optional place to save generated audio/video files
## Install
@@ -33,14 +33,42 @@ brew install ffmpeg
Python is already available on most Macs. If needed, install it from `python.org`.
## Create voiceover
## One-step flow: create final video from SRT
Run from the `video-generator` folder. Pass your own SRT and output paths.
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
```powershell
python scripts/make_voiceover_windows.py `
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
```bash
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
```powershell
python video-generator/scripts/make_voiceover_windows.py `
--srt "video-generator/subtitles/your_subtitles.srt" `
--voice "Microsoft David Desktop" `
--rate 0 `
@@ -61,7 +89,7 @@ python video-generator/scripts/make_voiceover_macos.py \
`--mp3` is optional. Use WAV when combining with video.
## Combine video + audio
## Two-step flow: combine video + audio
This removes the original video audio and uses the generated voiceover.
@@ -100,9 +128,10 @@ Good tutorial voices: `Microsoft David Desktop`, `Microsoft Mark` if available.
Windows speed uses `-10` to `10`:
```powershell
python video-generator/scripts/make_voiceover_windows.py `
python video-generator/scripts/combine_video_audio.py `
--video "video-generator/input/your_video.mp4" `
--srt "video-generator/subtitles/your_subtitles.srt" `
--wav "video-generator/output/voiceover.wav" `
--output "video-generator/output/final_video.mp4" `
--voice "Microsoft David Desktop" `
--rate 2
```
@@ -120,9 +149,10 @@ Good tutorial voices: `Daniel`, `Reed (English (US))`, `Eddy (English (UK))`.
Speed example:
```bash
python video-generator/scripts/make_voiceover_macos.py \
python video-generator/scripts/combine_video_audio.py \
--video "video-generator/input/your_video.mp4" \
--srt "video-generator/subtitles/your_subtitles.srt" \
--wav "video-generator/output/voiceover.wav" \
--output "video-generator/output/final_video.mp4" \
--voice "Daniel" \
--rate 190
```