fix:Enhance ASR Service Stability and API Performance
Summary
Minor fixes to ensure the backend runs correctly after splitting into separate frontend and backend repositories.
Changes
app/main.py
- Added eager model pre-loading in the
startup_eventhandler. - Previously the ASR model was loaded slowly on the first request, causing
a noticeable cold-start delay for the first user. Now
load_model()is called at application startup, wrapped in a try/except so startup failures are logged but do not crash the server.
app/asr_service.py
- Cleaned up inline comments around the
pipe()transcription call for better readability (no functional change).
Impact
- First-request latency is eliminated since the model is warm when the server starts.
- No breaking changes; all existing endpoints remain unchanged.
Testing
- Verified the server starts without errors after the repo split.
- Confirmed model loads during startup log output.
Edited by Satyapranavanadh Rayapureddy