- Add FastAPI-based API in whisperx/api/ - Implement transcription endpoint compatible with OpenAI - Added Dockerfile and docker-compose.yml for easy deployment - Updated README with Docker instructions - Added new script whisperx-serve for running the API
16 lines
333 B
Python
16 lines
333 B
Python
import uvicorn
|
|
|
|
|
|
def serve(host: str = "0.0.0.0", port: int = 8000, workers: int = 1):
|
|
"""Run the WhisperX API server"""
|
|
uvicorn.run(
|
|
"whisperx.api.main:app",
|
|
host=host,
|
|
port=port,
|
|
workers=workers,
|
|
reload=False # No reload for production
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
serve() |