Open
Conversation
Owner
|
Thanks! let's integrate after 0.3.1 |
Owner
|
@claude review pls |
Author
|
@claude review the PR |
Author
|
Fixed merge issues |
Owner
|
@ravinagabhyru thanks for this. I intend to merge this next. Could you resolve the conflict for the last time please? |
Author
|
There should not be any conflicts anymore. main.rs has been moved to bin/waystt.rs. |
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.
This pull request refactors the
waysttcodebase to introduce a library-first architecture, separating the CLI/binary from core logic and making the application more modular and testable. It introduces new modules for configuration, CLI options, signal handling, and the audio processing pipeline, and updates how transcription providers are selected and instantiated. The binary entrypoint is moved, and configuration/environment handling is improved for flexibility and clarity.Type of Change
Changes Made
Library/Architecture Refactor:
lib.rsas the main library entrypoint, exposing a public asyncrunfunction that coordinates configuration, provider creation, and running the app, enabling a library-first API with a thin binary wrapper. (src/lib.rs)src/main.rstosrc/bin/waystt.rsto decouple the binary from the core library. (Cargo.toml)Configuration and CLI Improvements:
RunOptionsstruct incli.rsto decouple CLI-facing options from parsing, and provided helpers for default env file paths. (src/cli.rs)bootstrapfunction, supporting optional envfile loading and clear error handling. (src/config.rs)Audio and Signal Handling:
AudioPipelinestruct to encapsulate audio processing, WAV encoding, and transcription logic, improving separation of concerns. (src/pipeline.rs)signalsmodule for signal constants and async signal stream utilities, simplifying signal handling. (src/signals.rs)AudioProcessorto use a stricter silence check, allowing very quiet audio to pass to further processing. (src/audio_processing.rs)Transcription Provider Refactor:
ProviderKindenum instead of string matching, and updated theTranscriptionFactoryto accept explicit config injection, improving type safety and testability. (src/transcription/mod.rs)src/transcription/mod.rs) [1] [2] [3] [4]Application Logic:
Appstruct to encapsulate application state and logic, including signal-driven control flow and user feedback, making the main loop more maintainable and testable. (src/app.rs)These changes lay the foundation for a more maintainable, testable, and reusable codebase, with clear separation between the CLI, core logic, and provider-specific implementations.
Testing
cargo testcargo fmtandcargo clippy)Test Environment
Audio Feedback Testing (if applicable)
Signal Testing (if applicable)
Breaking Changes
If this PR contains breaking changes, please describe:
Checklist