Skip to content

Dockerization of an API service based on Faster-Whisper for audio transcription using OpenAI's Whisper model and CUDA.

Notifications You must be signed in to change notification settings

zakantonio/whisper-service

Repository files navigation

Whisper Service

An API service based on Faster-Whisper for audio transcription using OpenAI's Whisper model.

Features

  • REST API for audio file transcription
  • CUDA support for GPU acceleration
  • Containerized with Docker for easy deployment
  • Error handling and reconnection attempts

Requirements

  • Docker
  • NVIDIA GPU with CUDA support (optional, but recommended for better performance)
  • NVIDIA Container Toolkit (to use GPU in Docker)

Installation

With Docker

docker-compose build --no-cache
docker-compose up -d --force-recreate

Testing the service

python examples/simple_client.py path/to/your/audio.wav

Usage

Send a POST request to the /transcribe endpoint with an audio file:

import requests

url = "http://localhost:8421/transcribe"
files = {'file': open('audio.wav', 'rb')}
response = requests.post(url, files=files)
print(response.json())

Configuration

The service uses port 8421 by default. You can modify this configuration in the server.py file.

About

Dockerization of an API service based on Faster-Whisper for audio transcription using OpenAI's Whisper model and CUDA.

Resources

Stars

Watchers

Forks