pub type CBoundaryCb = Option<extern "C" fn(*const c_char, i32, i32, f32, f32, i32, *mut c_void)>;Expand description
Word-boundary callback:
cb(word, byte_offset, byte_len, start_s, end_s, estimated, userdata).
byte_offset is a UTF-8 byte index into the spoken text, byte_len a
byte length — pair them to slice the text safely. An unlocatable
word holds the last known offset (0 if nothing matched) with
byte_len -1. estimated is 1 when the timings are proportional
estimates (unpatched voice, wpm model), 0 when measured (cloud
provider timings). Exceptions: the Windows
SAPI native-boundary path reports UTF-16 code-unit offsets/lengths
(the units ISpVoice events provide), and the Azure/Edge WebSocket
path passes Azure’s own text.Offset/text.Length through unchanged
when Azure supplies them (units per Azure’s documentation; the
wrapper’s fallback arithmetic when they are absent is UTF-8 bytes).
Aliased Type§
pub enum CBoundaryCb {
None,
Some(extern "C" fn(*const i8, i32, i32, f32, f32, i32, *mut c_void)),
}