remove temp_kit method to get args. uvicorn reload to False for better perfs

This commit is contained in:
Quentin Fuxa
2025-04-11 12:02:52 +02:00
parent d94560ef37
commit 3ac4c514cf
3 changed files with 15 additions and 13 deletions

View File

@@ -3,7 +3,7 @@ from fastapi import FastAPI, WebSocket, WebSocketDisconnect
from fastapi.responses import HTMLResponse
from fastapi.middleware.cors import CORSMiddleware
from whisperlivekit import WhisperLiveKit
from whisperlivekit import WhisperLiveKit, parse_args
from whisperlivekit.audio_processor import AudioProcessor
import asyncio
@@ -72,14 +72,15 @@ def main():
"""Entry point for the CLI command."""
import uvicorn
temp_kit = WhisperLiveKit(transcription=False, diarization=False)
args = parse_args()
uvicorn.run(
"whisperlivekit.basic_server:app",
host=temp_kit.args.host,
port=temp_kit.args.port,
reload=True,
log_level="info"
host=args.host,
port=args.port,
reload=False,
log_level="info",
lifespan="on",
)
if __name__ == "__main__":