feat: mark events through the trait and C ABI (OnMarkCallback, tts_set_on_mark, boundary3) - #28
Merged
Conversation
…t_on_mark) - engine trait speak/speak_sync/speak_with_options take Option<OnMarkCallback> (name, start_s, end_s, char_offset); floravox forwards its measured MarkReached events (char_offset from the <mark> tag position — requires floravox-core 0.8.1); other engines accept and ignore for now - C ABI: tts_set_on_mark(name, char_offset, start_s, end_s, userdata) and tts_set_on_boundary3 (…, estimated, userdata) for the measured-vs-estimated flag; both wired through tts_speak and tts_speak_sync; header updated - floravox engine: deps to 0.8.1 (MarkReached carries char_offset, is_char_table auto-CharFrontend, Windows USERPROFILE HOME resolution, kokoro leading-silence trim) - all engines/examples/tests updated for the new signature
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.
What
Addresses the Windows team's findings 1 and 2 (plus the floravox-side halves of 3/5/6 via the 0.8.1 dep):
TtsEngine::speak/speak_sync/speak_with_optionsgrowOption<OnMarkCallback>(name, start_s, end_s, char_offset). The floravox engine forwards its measuredMarkReachedevents — includingchar_offsetfrom the<mark>tag position (floravox-core 0.8.1). Other engines accept and ignore (their SSML marks still need the interpolation workaround; floravox does not).tts_set_on_mark(cb(name, char_offset, start_s, end_s, userdata))— maps to SAPISPEI_TTS_BOOKMARK. Plustts_set_on_boundary3with theestimatedflag so hosts can badge measured-timing voices and decide on rescaling. Header declarations added; both wired throughtts_speak/tts_speak_sync.Also rides along on floravox 0.8.1:
is_char_tableauto-CharFrontend for MMS voices (no more silent letter-spelling), WindowsUSERPROFILEHOME resolution, kokoro leading-silence trim, andfloravox-patch(native duration surgery, in floravox).Breaking
TtsEngine::speaksignature change — engines and callers updated in-tree.Test plan
-D warningsacross feature combinationscargo testgreen on system,cloud / sherpaonnx / floravox (+speechmarkdown) sets