Skip to content

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.

Notifications You must be signed in to change notification settings

mythrantic/custom-whisper-api

Repository files navigation

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

Getting Started

1. Clone the Repository

git clone https://github.com/valiantlynx/custom-whisper-api.git
cd custom-whisper-api

2. Build and Start the Docker Containers

docker-compose up --build -d

This command builds and starts the Docker containers in the background.

3. Stop the Docker Containers

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.

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.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published