feat(voice): support mobile linking and cancellation - #3361
Open
johnmatthewtennant wants to merge 3 commits into
Open
feat(voice): support mobile linking and cancellation#3361johnmatthewtennant wants to merge 3 commits into
johnmatthewtennant wants to merge 3 commits into
Conversation
johnmatthewtennant
changed the base branch from
jtennant/buzz-voice-extraction-april
to
jt/buzz-voice-refactor
July 28, 2026 19:19
johnmatthewtennant
force-pushed
the
jt/buzz-voice-refactor
branch
from
July 28, 2026 20:56
b6daac7 to
be4adc9
Compare
johnmatthewtennant
force-pushed
the
jtennant/buzz-voice-mobile-linking-april
branch
from
July 28, 2026 21:00
df2b7d9 to
5514cb2
Compare
johnmatthewtennant
force-pushed
the
jt/buzz-voice-refactor
branch
from
July 28, 2026 21:40
be4adc9 to
617e0d2
Compare
johnmatthewtennant
force-pushed
the
jtennant/buzz-voice-mobile-linking-april
branch
from
July 28, 2026 21:43
5514cb2 to
19ea0ad
Compare
johnmatthewtennant
force-pushed
the
jt/buzz-voice-refactor
branch
from
July 29, 2026 00:13
617e0d2 to
388cf0c
Compare
johnmatthewtennant
force-pushed
the
jtennant/buzz-voice-mobile-linking-april
branch
from
July 29, 2026 00:16
19ea0ad to
b1c899f
Compare
johnmatthewtennant
force-pushed
the
jt/buzz-voice-refactor
branch
from
July 29, 2026 16:15
388cf0c to
ace19c6
Compare
Signed-off-by: John Tennant <johnmatthewtennant@gmail.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
Signed-off-by: John Tennant <jtennant@squareup.com>
johnmatthewtennant
force-pushed
the
jtennant/buzz-voice-mobile-linking-april
branch
from
July 31, 2026 14:43
b1c899f to
6947376
Compare
johnmatthewtennant
marked this pull request as ready for review
July 31, 2026 14:48
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.
Context
Native mobile clients need to link
buzz-voiceagainst platform-specific sherpa-onnx libraries and cancel Pocket TTS before a complete utterance has been synthesized. The existing dependency and buffered synthesis API do not provide those contracts.Summary
This PR lets consumers select static linking on iOS or shared linking on Android, provide verified official libraries, and interrupt Pocket synthesis through a monotonic callback. Consumers remain responsible for downloading, verifying, and packaging native artifacts.
No model or native binary is bundled.
Changes
buzz-voice,sherpa-onnx, andsherpa-onnx-sys.synth_chunkAPI.sherpa-onnx-sys1.13.4 metadata, bindings, and license with a mobile-aware linker contract.SHERPA_ONNX_LIB_DIR.Related issue
None found.
Testing
A disposable external consumer compiled the callback API with only the intended target feature. The iOS simulator produced a static library from normalized official XCFramework slices. Android completed an arm64 shared-library cross-target check against the official ABI directory.
cargo packageverified the standalonebuzz-voicepackage.Berd Mobile #12 is the current external consumer. Buzz Mobile can use the same contract with its own native adapter and packaging.
Screenshots
N/A. This is a Rust API and native-linking change with no UI.
Reviewer-reproducible examples
Exercise cancellation before PCM is available and verify callback panics are contained:
cargo test -p buzz-voice --lib callbackOutput excerpt:
Confirm the target-specific feature graphs:
With normalized official sherpa-onnx 1.13.4 libraries prepared as documented in
crates/sherpa-onnx-sys/README.md, compile each mobile mode: