cucumberian / faster-whisper-fastapi

simple fastapi wrapper for faster-whisper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FastAPI wrapper for Faster-Whisper

Requirements

  • Python3.8 +
  • 1.4GB for docker image
  • 500MB+ RAM for docker

Installation

  1. Set variables. Create .env file with variables:
    MODEL_SIZE="tiny"
    PORT="8080"
  2. Run container Simply use docker-compose for run container
    docker-compose up -d
  3. Wait for some time while whisper model are downloading.

Usage

Endpoints

examples

post example

curl -X 'POST' \
  'http://127.0.0.1:8080/transcribe' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'audio=@voice.ogg;type=video/ogg'

response example

{
  "status": "ok",
  "response": "transcribed words from audio"
}
{
  "status": "error",
  "response": "some error info"
}

About

simple fastapi wrapper for faster-whisper

License:MIT License


Languages

Language:Python 82.8%Language:Dockerfile 17.2%