Skip to content

feat: unify voices and add streaming/word callbacks - #1

Merged
willwade merged 1 commit into
mainfrom
jules-2415386680832927867-003c536d
Jun 1, 2026
Merged

feat: unify voices and add streaming/word callbacks#1
willwade merged 1 commit into
mainfrom
jules-2415386680832927867-003c536d

Conversation

@willwade

@willwade willwade commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

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

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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@willwade
willwade merged commit dc368e8 into main Jun 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant