Loading repository data…
Loading repository data…
bishwaraj13 / repository
WhisperX has very specific dependencies which run on older python and torch versions, and is usually incompatible with some of the newer applications, so I separated out WhisperX, and made it a simple Flask API server. That way my code in other applications can just send API request to this server, and receive transcription as response.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A lightweight Flask API server that wraps WhisperX for efficient audio transcription using GPU acceleration. This service maintains a loaded model in memory for faster processing and provides a simple HTTP interface for transcription requests.
WhisperX has very specific dependencies which run on older python and torch versions, and is usually incompatible with some of the newer applications, so I separated out WhisperX, and made it a simple Flask API server. That way my code in other applications can just send API request to this server, and receive transcription as response.
git clone https://github.com/yourusername/whisperx-api-server.git
cd whisperx-api-server
docker build -t whisperx-api .
docker run --gpus all --shm-size=8gb --runtime=nvidia --network=host --volume="/sizzle_storage:/sizzle_storage:rw" --volume="$(pwd):/app" -p 5000:5000 --name whisperx-api whisperx-api
* Serving Flask app 'app'
* Debug mode: off
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://192.168.3.193:5000
INFO:werkzeug:Press CTRL+C to quit
Once the above message appears, you are good to start making requests for API calls.
You will also be able to see a process called WhisperX-API loaded in GPU memory once you run the command nvidia-smi.
POST /transcribe
{
"file_path": "/audio/your-audio-file.wav"
}
GET /health
{
"status": "healthy",
"model_loaded": true,
"gpu_memory_allocated": 4521.5,
"gpu_memory_cached": 6144.0
}
import requests
def transcribe_audio(file_path):
url = "http://localhost:5000/transcribe"
payload = {"file_path": file_path}
response = requests.post(url, json=payload)
return response.json()
# Example usage
result = transcribe_audio("/audio/sample.wav")
print(result["segments"])
whisperx-api-server/
├── Dockerfile
├── README.md
├── app.py