All apps · 0 apps
Whisper-API-Server
Docker app from grtgbln's Repository
Overview
Readme
View on GitHubWhisper API server
Drop-in replacement for the OpenAI's Whisper API using the same API but running locally.
Modified from https://github.com/morioka/tiny-openai-whisper-api.
Setup
With Docker compose (recommended)
Install Docker, then run:
docker build -t didmar/whisper-api-server .
docker run -d -p 127.0.0.1:8000:8000 -v .cache:/root/.cache:rw didmar/whisper-api-server --workers 1
# Customize number of workers is needs to handle multiple requests in parallel
Or use Docker compose:
docker compose up --build -d
Without Docker
Requires python >= 3.10, pip and virtualenv.
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
python3 main.py
Usage
Check out the API documentation at http://localhost:8000/docs.
For example:
curl -sSfLO https://upload.wikimedia.org/wikipedia/commons/2/2b/American_English_sound_%22h%22_%28female%29.wav
curl --request POST \
--url "http://localhost:8000/v1/audio/transcriptions" \
--header 'Content-Type: multipart/form-data' \
--form file=@American_English_sound_%22h%22_%28female%29.wav \
--form model=whisper-1
# {"text":" Hot hole high. Hu. Hu. Hu. Behind. Hu. Hu."}
Development setup
We use Poetry to manage dependencies, Ruff for linting and Black for formatting.
The poetry.lock file is committed to the repository.
When adding a new dependency, use poetry add <package> and commit the updated poetry.lock file.
If the dependency is only needed for development, add the --dev flag.
# Automatically update the dependencies to the latest compatible version
poetry update
# Use the export commands to update the frozen requirements files
poetry export -f requirements.txt --output requirements.txt
poetry export --only dev -f requirements.txt --output dev-requirements.txt
# Setup pre-commit hooks (See https://pre-commit.com/)
pre-commit install
Install Whisper-API-Server on Unraid in a few clicks.
Find Whisper-API-Server in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Categories
Download Statistics
Related apps
Explore more like this
Explore allDetails
didmar/whisper-api-serverRuntime arguments
- Network
bridge- Privileged
- false
Template configuration
Container Port: 8000
- Target
- 8000
- Default
- 8000
- Value
- 8000
Path to the cache directory. This is where models will be stored, which can be quite large.
- Target
- /root/.cache
- Default
- /mnt/user/appdata/whisper_api_server/cache
- Value
- /mnt/user/appdata/whisper_api_server/cache