From 81a70167074125f9baf152888bbd34ee72f25eba Mon Sep 17 00:00:00 2001 From: johannes <> Date: Tue, 7 Nov 2023 12:35:58 +0100 Subject: [PATCH] cleanup and added test --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ Makefile | 8 ++++---- README.md | 11 ++--------- 3 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1510652 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: test +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: '0 3 15 * *' # once every per month on the 15th at 03:00 UTC + +jobs: + build: + strategy: + matrix: + platform: [windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - name: Install Python 3 + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Run Makefile + run: make venv dependencies diff --git a/Makefile b/Makefile index 5bc2d26..6b7aea5 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,15 @@ venv: # install dependecies .PHONY: dependencies dependencies: - ${ROOT_DIR}/.venv/Scripts/pip install -U openai-whisper + ${ROOT_DIR}.venv/Scripts/pip install -U openai-whisper .PHONY: update_whisper update_whisper: - ${ROOT_DIR}/.venv/Scripts/pip install openai-whisper --upgrade + ${ROOT_DIR}.venv/Scripts/pip install openai-whisper --upgrade # installs torch for Windows systems with Cuda # see link below for how to install torch for other environments # https://pytorch.org/get-started/locally/ .PHONY: install -install: venv dependecies - ${ROOT_DIR}/.venv/Scripts/pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 \ No newline at end of file +install: venv dependencies + ${ROOT_DIR}.venv/Scripts/pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 \ No newline at end of file diff --git a/README.md b/README.md index ed81e61..ff798fe 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Whisper Makefile -Contains a Makefile to install [whisper](https://github.com/openai/whisper). -Currently, it is set to work on Windows systems only. +Contains a Makefile to install [whisper](https://github.com/openai/whisper) on Windows. ## Motivation @@ -48,18 +47,12 @@ Ensure you have [make](https://gnuwin32.sourceforge.net/packages/make.htm) insta ## How to run whisper After activating the `.venv` environment by running. -Here is how to do this on Windows: +Here is how to do activate it on Windows: ```powershell .\.venv\Scripts\Activate.ps1 ``` -And this is the command for MAC and Linux: - -```bash -./.venv/Scripts/activate -``` - You can use the `whisper` CLI. To create subtitles for a file you run