feat(cli): unified speaches cli for server and client, uvx now optional#449
Open
ahundt wants to merge 8 commits intospeaches-ai:masterfrom
Open
feat(cli): unified speaches cli for server and client, uvx now optional#449ahundt wants to merge 8 commits intospeaches-ai:masterfrom
speaches cli for server and client, uvx now optional#449ahundt wants to merge 8 commits intospeaches-ai:masterfrom
Conversation
- Add info-level logging of available ONNX Runtime providers in Kokoro and Piper model managers to aid debugging. - Introduce a custom `APIProxyError` and global FastAPI handler for chat proxy failures, returning structured JSON errors with error IDs, hints, and optional debug info. - Validate audio file presence early in Gradio UI and STT tab handlers, raising clear exceptions if missing. - Log the Gradio UI access URL at startup for user convenience.
- Added a detailed docstring and clarified parameter order for `APIProxyError`. - Updated type annotations for clarity and maintainability. - Default error suggestions are now more concrete and actionable for users and developers. - Switched to a timezone-aware ISO 8601 timestamp for error traceability. - No changes outside error handling and error message formatting.
This commit unifies the server and client into a single `speaches` executable to create a more intuitive user experience, similar to tools like `ollama`. Key Changes: - **Renamed `speaches` cli command:** The `speaches-cli` CLI command is now simply `speaches`. - **New `speaches serve` command:** The `speaches` CLI now includes a `serve` command as the primary entry point for running the FastAPI server. - **Client Integration:** All commands from the former `speaches-cli` (e.g., `model ls`, `registry ls`) are now sub-commands of the main `speaches` executable. - **Unified Packaging:** - The `packages/speaches-cli` directory has been removed. - Dependencies are consolidated into the root `pyproject.toml`. - A `[project.scripts]` entry now creates the `speaches` executable. - **Robust Config Resolution:** `config.py` is updated to resolve host/port with a clear precedence (`SPEACHES_*` > `UVICORN_*` > default), ensuring backwards compatibility. - **Modernized App Lifecycle:** `main.py` now uses the `lifespan` context manager for startup logic, replacing the deprecated `@on_event` decorator. The direct `uvicorn speaches.main:create_app` command remains fully functional.
speaches cli for server speaches serve and client speaches model ls; uvx now optionalspeaches cli for server and client; uvx now optional
speaches cli for server and client; uvx now optionalspeaches cli for server and client, uvx now optional
Collaborator
|
Hey, I think it's a good idea to have
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unified
speachesCommand Line Interface MotivationThis PR unifies the server and client tools into a single, cohesive
speachescommand-line interface.uvxanduvicornare now optional and they continue to work. This makes speaches easier to use and easier to integrate into other workflows.Key Changes
pyproject.tomlnow creates a singlespeachesexecutable via[project.scripts].uvxand directly runninguvicornare now optional steps that remain supported.serveCommand: The primary way to run the application is nowspeaches serve. This command handles all server startup logic internally.speaches-clipackage has been removed, and its commands (e.g.,model ls,registry download) are now available as sub-commands of the mainspeachesexecutable.config.pyhas been refactored to ensure predictable host/port resolution while maintaining 100% backwards compatibility withUVICORN_HOST/PORTenvironment variables.main.pynow uses the standardlifespancontext manager for startup and shutdown events.New Workflow
note uvx is now optional.