Skip to content

Generate Video

Generate Video #3

Workflow file for this run

name: Generate Video
on:
workflow_dispatch:
inputs:
scriptInput:
description: 'Text script input (required)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# Install essential packages
- name: Install essential packages
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y make
sudo apt-get install -y g++
# Checkout repository recursively
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
# Change directory to whisper submodule and build it
- name: Build whisper submodule
run: |
cd lib/whisper
cmake -B build
cmake --build build
# Move the main binary to the root of the project
- name: Move main binary to project root
run: |
mv lib/whisper/build/bin/main .
# Set up Python and install Python dependencies
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # You can specify a specific Python version here
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install moviepy pytube gtts
# Make the generate.sh script executable
- name: Make script executable
run: chmod +x generate.sh
# Generate the video using the provided text script
- name: Generate Video
run: |
# Accessing the input provided by the user
script="${{ github.event.inputs.scriptInput }}"
# Run the generate.sh script with the provided text as argument
./generate.sh "$script"
# Upload the generated video as an artifact
- name: Upload Video Artifact
uses: actions/upload-artifact@v2
with:
name: final_video_with_audio
path: final_video_with_audio.mp4