You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[feat]: add transcription API endpoint using OpenAI Whisper-small (#469)
* [feat]: add transcription API endpoint using OpenAI Whisper-small
Signed-off-by: David Gao <[email protected]>
* remove the whisper payload response log
Signed-off-by: David Gao <[email protected]>
* [docs]: add tutorial for transcription v1 api
Signed-off-by: David Gao <[email protected]>
* [chore] align example router running script with main
new script will be mentioned in
`tutorials/17-whisper-api-transcription.md`
Signed-off-by: David Gao <[email protected]>
* omit model field since backend already knows which model to run
Signed-off-by: David Gao <[email protected]>
* generate a silent audio file if no audio file appears
Signed-off-by: David Gao <[email protected]>
* put wav creation at the module level to prevent being recreated every time
Signed-off-by: David Gao <[email protected]>
* [Test] test frequency of silent audio creation
Signed-off-by: David Gao <[email protected]>
* send multipart/form-data for transcription model's health check
Signed-off-by: David Gao <[email protected]>
* fix pre-commit issue
Signed-off-by: David Gao <[email protected]>
* Moves the implementation for the `/v1/audio/transcriptions` endpoint from `main_router.py` into `request.py`, align architectural pattern.
Signed-off-by: David Gao <[email protected]>
* add timeout to ensure health check will not hang indefinitely if a backend model becomes unresponsive
Signed-off-by: David Gao <[email protected]>
* add boolean model health check return for non-transcription model
Signed-off-by: David Gao <[email protected]>
* remove redundant warning log since handled in outer 'StaticServiceDiscovery.get_unhealthy_endpoint_hashes'
Signed-off-by: David Gao <[email protected]>
* remove redundant JSONDecodeError catch and downgrade RequestException log to debug, align with service discovery's warning
Signed-off-by: David Gao <[email protected]>
* Chore: Apply auto-formatting and linting fixes via pre-commit
Signed-off-by: David Gao <[email protected]>
* refactor: update more meaningful comments for silent wav bytes generation
Signed-off-by: David Gao <[email protected]>
* refactor: keep the comment to explain purpose for generating a silent
WAV byte
Signed-off-by: David Gao <[email protected]>
* fix(tests): Improve mock in model health check test
The mock for `requests.post` in `test_is_model_healthy` did not
correctly simulate an `HTTPError` on a non-200 response.
This change configures the mock's `raise_for_status` method to
raise the appropriate exception, ensuring the test now accurately
validates the function's error handling logic.
Signed-off-by: David Gao <[email protected]>
* Chore: Apply auto-formatting and linting fixes via pre-commit
Signed-off-by: David Gao <[email protected]>
* chore: remove unused var `in_router_time`
Signed-off-by: David Gao <[email protected]>
* fix: (deps) add httpx as an explicit dependency
The CI/CD workflow was failing with a `ModuleNotFoundError` because `httpx` was not an explicit dependency in `pyproject.toml` and was not being installed in the clean Docker environment.
Signed-off-by: David Gao <[email protected]>
* chore: dependencies order changes after running pre-commit
Signed-off-by: David Gao <[email protected]>
* refactor: Migration from httpx to aiohttp for improved concurrency
Replaced httpx with aiohttp for better asynchronous performance and resource utilization. Fixed JSON syntax error in error response handling.
Signed-off-by: David Gao <[email protected]>
* chore: remove wrong tutorial file
Signed-off-by: David Gao <[email protected]>
* chore: apply pre-commit
Signed-off-by: David Gao <[email protected]>
* chore: use debug log print
Signed-off-by: David Gao <[email protected]>
* chore: change to more specific exception handling for aiohttp
Signed-off-by: David Gao <[email protected]>
---------
Signed-off-by: David Gao <[email protected]>
Co-authored-by: Yuhan Liu <[email protected]>
0 commit comments