feat: unify voices and add streaming/word callbacks - #1
Conversation
This commit: - Fixes a build error caused by a stale `.cargo/config.toml` point to `/mnt/usb-build`. - Unifies the `Voice` representation by adding an `engine` string field (mirroring JS Wrapper behavior). - Introduces callback support in `TtsEngine` to stream audio bytes (`on_audio`) and report word boundaries (`on_boundary`). - Updates C API bindings (`tts_wrapper.h` and `lib.rs`) to safely set and handle these callbacks via properly typed `Option<extern "C" fn>` function pointers. - Modifies `cloud_engine.rs` to parse HTTP response bytes incrementally for audio streaming. - Modifies `sherpaonnx_engine.rs` to generate and convert f32 float arrays into 16-bit PCM streaming buffers to emulate streaming playback capabilities. - Resolves all complex-type `clippy` and borrowing warnings and updates documentation in `README.md`. Co-authored-by: willwade <229352+willwade@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Adds unified Voice structs, streaming callbacks, and word boundary events, and resolves USB mount build issues.
PR created automatically by Jules for task 2415386680832927867 started by @willwade