Skip to content

Commit

Permalink
Add support for running FastWhisperAPI locally
Browse files Browse the repository at this point in the history
  • Loading branch information
3choff committed May 22, 2024
1 parent 0013c44 commit 1d1d667
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ Edit config.py to select the models you want to use:
git clone https://github.com/3choff/FastWhisperAPI.git
cd FastWhisperAPI
```
***Install the required packages:***
```shell
pip install -r requirements.txt
```
***Run the API***
```shell
fastapi run main.py
```
***Alternative Setup and Run Methods***

The API can also run directly on a Docker container or in Google Colab.

***Docker:***

***Build a Docker container:***
```shell
docker build -t fastwhisperapi .
Expand All @@ -114,9 +128,7 @@ Edit config.py to select the models you want to use:
```shell
docker run -p 8000:8000 fastwhisperapi
```
***Alternative Setup and Run Methods***

The API can also run directly on a local machine or in Google Colab. Refer to the repository documentation for these methods: https://github.com/3choff/FastWhisperAPI/blob/main/README.md
Refer to the repository documentation for the Google Colab method: https://github.com/3choff/FastWhisperAPI/blob/main/README.md

## Model Options ⚙️

Expand Down
2 changes: 1 addition & 1 deletion voice_assistant/transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def transcribe_audio(model, api_key, audio_file_path, local_model_path=None):

elif model == 'fastwhisperapi':
url = "http://localhost:8000/v1/transcriptions"

files = {
'file': (audio_file_path, open(audio_file_path, 'rb')),
}
Expand Down

0 comments on commit 1d1d667

Please sign in to comment.