Add OpenAI-compatible API and Docker deployment
- 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
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user