Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/valiantlynx/custom-whisper-api
This project provides a custom API wrapper for the open-source Whisper model using FastAPI. It allows you to integrate Whisper into your applications for automatic speech recognition (ASR) tasks.
https://github.com/valiantlynx/custom-whisper-api
ai docker-compose fastapi python whisper
Last synced: 1 day ago
JSON representation
This project provides a custom API wrapper for the open-source Whisper model using FastAPI. It allows you to integrate Whisper into your applications for automatic speech recognition (ASR) tasks.
- Host: GitHub
- URL: https://github.com/valiantlynx/custom-whisper-api
- Owner: valiantlynx
- Created: 2024-02-03T12:19:24.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-03T16:57:46.000Z (11 months ago)
- Last Synced: 2024-11-12T07:05:36.389Z (about 1 month ago)
- Topics: ai, docker-compose, fastapi, python, whisper
- Language: HTML
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom Whispe API
## Overview
This project provides a custom API wrapper for the open-source Whisper model using FastAPI. It allows you to integrate Whisper into your applications for automatic speech recognition (ASR) tasks.
## Prerequisites
- [Docker](https://www.docker.com/) installed
- [docker-compose](https://docs.docker.com/compose/install/) installed## Getting Started
### 1. Clone the Repository
```bash
git clone https://github.com/valiantlynx/custom-whisper-api.git
cd custom-whisper-api
```### 2. Build and Start the Docker Containers
```bash
docker-compose up --build -d
```This command builds and starts the Docker containers in the background.
### 3. Stop the Docker Containers
```bash
docker-compose down
```Use this command to stop and remove the Docker containers.
## API Documentation
Once the containers are up and running, you can access the FastAPI documentation to understand and test the API endpoints.
- Swagger UI: [http://localhost:8000/docs](http://localhost:8000/docs)
- ReDoc: [http://localhost:8000/redoc](http://localhost:8000/redoc)## API Endpoints
### ASR (Automatic Speech Recognition)
#### `POST /asr`
Submit an audio file for automatic speech recognition.
**Request:**
- Method: POST
- Endpoint: `/asr`
- Body: Audio file (multipart/form-data)**Response:**
- Status Code: 200 OK
- Body: Transcription result## Environment Variables
The API utilizes environment variables for configuration. You can customize these variables in the `.env` file.
- `WHISPER_MODEL_PATH`: Path to the Whisper model directory.
## Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
## License
This project is licensed under the [MIT License](LICENSE).