From 417aaf6e5fe11b2f2007953847ba1a854291e9ac Mon Sep 17 00:00:00 2001 From: theSoberSobber Date: Sat, 2 Mar 2024 00:38:53 +0530 Subject: [PATCH] bhai --- .github/workflows/gen.yml | 43 +++++++++++++++++++++++++-------------- .gitignore | 1 + .gitmodules | 3 +++ lib/whisper | 1 + 4 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 .gitmodules create mode 160000 lib/whisper diff --git a/.github/workflows/gen.yml b/.github/workflows/gen.yml index 165c221..650fc18 100644 --- a/.github/workflows/gen.yml +++ b/.github/workflows/gen.yml @@ -12,34 +12,47 @@ jobs: 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 system dependencies - run: | - sudo apt-get update - sudo apt-get install -y ffmpeg - sudo apt-get install -y libmagick++-dev - - name: Install Python dependencies run: | python -m pip install --upgrade pip python -m pip install moviepy pytube gtts - # Make downloader.sh and generate.sh scripts executable - - name: Make scripts executable - run: | - chmod +x models/downloader.sh - chmod +x generate.sh - - # Run downloader.sh script - - name: Run downloader.sh - run: ./models/downloader.sh large-v1 + # 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 diff --git a/.gitignore b/.gitignore index 0fbe1fd..e71f4bd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ final_video_with.mp4 models/* !models/downloader.sh output/* +main diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0e0684f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/whisper"] + path = lib/whisper + url = https://github.com/ggerganov/whisper.cpp diff --git a/lib/whisper b/lib/whisper new file mode 160000 index 0000000..25d313b --- /dev/null +++ b/lib/whisper @@ -0,0 +1 @@ +Subproject commit 25d313b38b1f562200f915cd5952555613cd0110