Skip to content

Commit

Permalink
cleanup and added test
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes committed Nov 7, 2023
1 parent 3a4189b commit 81a7016
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
install: venv dependencies
${ROOT_DIR}.venv/Scripts/pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 81a7016

Please sign in to comment.