react-native-nobodywho 2.4.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -145,20 +145,28 @@ export function getCachedModels(): Array<CachedModel> /*throws*/ {
145
145
  /**
146
146
  * Load a GGUF model from a local path or remote URL.
147
147
  *
148
- * Accepts local filesystem paths, `hf://owner/repo/file.gguf` for HuggingFace downloads,
149
- * or `https://` URLs. Downloaded models are cached automatically.
148
+ * Accepts local filesystem paths, `hf://owner/repo/file.gguf`, `https://` URLs,
149
+ * or `auto` for memory-based selection. Downloaded models are cached automatically.
150
+ *
151
+ * # MTP speculative decoding
152
+ *
153
+ * Pass `draft_model_path` pointing to a compatible MTP heads gguf (e.g.
154
+ * `mtp-gemma-4-E2B-it.gguf` for Gemma-4-E2B) to enable MTP
155
+ * speculative decoding on chats built from this model. Whether MTP is
156
+ * actually used is a per-chat decision — pass it through
157
+ * `Chat`-level config on the wrapping binding.
150
158
  *
151
159
  * This is a free function instead of an async constructor because
152
160
  * uniffi-bindgen-react-native generates invalid JS (`async static` instead
153
161
  * of `static async`) for async constructors.
154
162
  */
155
- export async function loadModel(modelPath: string, useGpu: boolean, projectionModelPath: string | undefined, onDownloadProgress: RustDownloadProgressCallback | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustModelInterface> /*throws*/ {
163
+ export async function loadModel(modelPath: string, useGpu: boolean, projectionModelPath: string | undefined, draftModelPath: string | undefined, onDownloadProgress: RustDownloadProgressCallback | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustModelInterface> /*throws*/ {
156
164
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
157
165
  try {
158
166
  return await uniffiRustCallAsync(
159
167
  /*rustCaller:*/ uniffiCaller,
160
168
  /*rustFutureFunc:*/ () => {
161
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_func_load_model(FfiConverterString.lower(modelPath),FfiConverterBool.lower(useGpu),FfiConverterOptionalString.lower(projectionModelPath),FfiConverterOptionalTypeRustDownloadProgressCallback.lower(onDownloadProgress)
169
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_func_load_model(FfiConverterString.lower(modelPath),FfiConverterBool.lower(useGpu),FfiConverterOptionalString.lower(projectionModelPath),FfiConverterOptionalString.lower(draftModelPath),FfiConverterOptionalTypeRustDownloadProgressCallback.lower(onDownloadProgress)
162
170
  );
163
171
  },
164
172
  /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_u64,
@@ -178,22 +186,90 @@ export async function loadModel(modelPath: string, useGpu: boolean, projectionMo
178
186
  }
179
187
  }
180
188
  /**
181
- * Create a TTS synthesizer.
189
+ * Create an SpeechToText handle. `source` is a HuggingFace repo (`hf://owner/repo`,
190
+ * e.g. `"hf://onnx-community/whisper-base"`) or a local directory path.
191
+ * `language` is an ISO 639-1 code (e.g. `"en"`); pass `None` to auto-detect.
192
+ * `quantization` selects the ONNX precision variant to download and load:
193
+ * one of `"default"`, `"fp16"`, `"int8"`, `"uint8"`, `"bnb4"`, `"q4"`, `"q4f16"`, `"quantized"`;
194
+ * pass `None` to use `"default"`.
195
+ */
196
+ export async function loadSpeechToText(source: string, language: string | undefined, quantization: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustSpeechToTextInterface> /*throws*/ {
197
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
198
+ try {
199
+ return await uniffiRustCallAsync(
200
+ /*rustCaller:*/ uniffiCaller,
201
+ /*rustFutureFunc:*/ () => {
202
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_func_load_speech_to_text(FfiConverterString.lower(source),FfiConverterOptionalString.lower(language),FfiConverterOptionalString.lower(quantization)
203
+ );
204
+ },
205
+ /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_u64,
206
+ /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_u64,
207
+ /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_u64,
208
+ /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_u64,
209
+ /*liftFunc:*/ FfiConverterTypeRustSpeechToText.lift.bind(FfiConverterTypeRustSpeechToText),
210
+ /*liftString:*/ FfiConverterString.lift,
211
+ /*asyncOpts:*/ asyncOpts_,
212
+ /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
213
+ );
214
+ } catch (__error: any) {
215
+ if (uniffiIsDebug && __error instanceof Error) {
216
+ __error.stack = __stack;
217
+ }
218
+ throw __error;
219
+ }
220
+ }
221
+ /**
222
+ * Create a TextToSpeech synthesizer.
223
+ */
224
+ export async function loadTextToSpeech(source: string, architecture: string | undefined, voice: string | undefined, language: string | undefined, speed: /*f32*/number | undefined, steps: /*u32*/number | undefined, silenceDuration: /*f32*/number | undefined, precision: string | undefined, temperature: /*f32*/number | undefined, huggingfaceToken: string | undefined, device: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustTextToSpeechInterface> /*throws*/ {
225
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
226
+ try {
227
+ return await uniffiRustCallAsync(
228
+ /*rustCaller:*/ uniffiCaller,
229
+ /*rustFutureFunc:*/ () => {
230
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_func_load_text_to_speech(FfiConverterString.lower(source),FfiConverterOptionalString.lower(architecture),FfiConverterOptionalString.lower(voice),FfiConverterOptionalString.lower(language),FfiConverterOptionalFloat32.lower(speed),FfiConverterOptionalUInt32.lower(steps),FfiConverterOptionalFloat32.lower(silenceDuration),FfiConverterOptionalString.lower(precision),FfiConverterOptionalFloat32.lower(temperature),FfiConverterOptionalString.lower(huggingfaceToken),FfiConverterOptionalString.lower(device)
231
+ );
232
+ },
233
+ /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_u64,
234
+ /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_u64,
235
+ /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_u64,
236
+ /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_u64,
237
+ /*liftFunc:*/ FfiConverterTypeRustTextToSpeech.lift.bind(FfiConverterTypeRustTextToSpeech),
238
+ /*liftString:*/ FfiConverterString.lift,
239
+ /*asyncOpts:*/ asyncOpts_,
240
+ /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
241
+ );
242
+ } catch (__error: any) {
243
+ if (uniffiIsDebug && __error instanceof Error) {
244
+ __error.stack = __stack;
245
+ }
246
+ throw __error;
247
+ }
248
+ }
249
+ /**
250
+ * Create a voice activity detector. `source` is a HuggingFace repo
251
+ * (`hf://owner/repo`) or local directory for the Silero VAD ONNX model;
252
+ * `None` uses the default (`hf://onnx-community/silero-vad`). `sample_rate`
253
+ * is the rate of the audio you'll pass to `push` — Silero runs at 16kHz
254
+ * internally, anything else is resampled. `threshold`,
255
+ * `min_silence_duration_ms`, `min_speech_duration_ms`, and
256
+ * `preroll_duration_ms` default to the core `VoiceActivityDetectionConfig`
257
+ * defaults when omitted.
182
258
  */
183
- export async function loadTts(source: string, architecture: string | undefined, voice: string | undefined, language: string | undefined, speed: /*f32*/number | undefined, steps: /*u32*/number | undefined, silenceDuration: /*f32*/number | undefined, device: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustTtsInterface> /*throws*/ {
259
+ export async function loadVoiceActivityDetection(source: string | undefined, sampleRate: /*u32*/number, threshold: /*f32*/number | undefined, minSilenceDurationMs: /*u32*/number | undefined, minSpeechDurationMs: /*u32*/number | undefined, prerollDurationMs: /*u32*/number | undefined, device: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustVoiceActivityDetectionInterface> /*throws*/ {
184
260
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
185
261
  try {
186
262
  return await uniffiRustCallAsync(
187
263
  /*rustCaller:*/ uniffiCaller,
188
264
  /*rustFutureFunc:*/ () => {
189
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_func_load_tts(FfiConverterString.lower(source),FfiConverterOptionalString.lower(architecture),FfiConverterOptionalString.lower(voice),FfiConverterOptionalString.lower(language),FfiConverterOptionalFloat32.lower(speed),FfiConverterOptionalUInt32.lower(steps),FfiConverterOptionalFloat32.lower(silenceDuration),FfiConverterOptionalString.lower(device)
265
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_func_load_voice_activity_detection(FfiConverterOptionalString.lower(source),FfiConverterUInt32.lower(sampleRate),FfiConverterOptionalFloat32.lower(threshold),FfiConverterOptionalUInt32.lower(minSilenceDurationMs),FfiConverterOptionalUInt32.lower(minSpeechDurationMs),FfiConverterOptionalUInt32.lower(prerollDurationMs),FfiConverterOptionalString.lower(device)
190
266
  );
191
267
  },
192
268
  /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_u64,
193
269
  /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_u64,
194
270
  /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_u64,
195
271
  /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_u64,
196
- /*liftFunc:*/ FfiConverterTypeRustTts.lift.bind(FfiConverterTypeRustTts),
272
+ /*liftFunc:*/ FfiConverterTypeRustVoiceActivityDetection.lift.bind(FfiConverterTypeRustVoiceActivityDetection),
197
273
  /*liftString:*/ FfiConverterString.lift,
198
274
  /*asyncOpts:*/ asyncOpts_,
199
275
  /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
@@ -656,6 +732,78 @@ const FfiConverterTypeChatStats = (() => {
656
732
  })();
657
733
 
658
734
 
735
+ /**
736
+ * Tuning for MTP speculative decoding. Passing one to `RustChat::new`
737
+ * enables MTP; `null` runs the solo decode path. Requires the model to
738
+ * have been loaded with a compatible `draft_model_path`.
739
+ */
740
+ export type MtpConfig = {
741
+ /**
742
+ * Maximum draft tokens proposed per speculative step (llama.cpp `n_max`).
743
+ * Higher values draft more per decode; returns diminish past ~4–6.
744
+ */
745
+ kMax: /*u32*/number,
746
+ /**
747
+ * Minimum draft-token probability the drafter will propose (llama.cpp
748
+ * `p_min`). `0.0` accepts all proposals; raise it to skip low-confidence
749
+ * drafts.
750
+ */
751
+ pMin: /*f32*/number
752
+ }
753
+
754
+ /**
755
+ * Generated factory for {@link MtpConfig} record objects.
756
+ */
757
+ export const MtpConfig = (() => {
758
+ const defaults = () => ({kMax: 3,pMin: 0.0
759
+ });
760
+ const create = (() => {
761
+ return uniffiCreateRecord<MtpConfig, ReturnType<typeof defaults>>(defaults);
762
+ })();
763
+ return Object.freeze({
764
+ /**
765
+ * Create a frozen instance of {@link MtpConfig}, with defaults specified
766
+ * in Rust, in the {@link nobodywho} crate.
767
+ */
768
+ create,
769
+
770
+ /**
771
+ * Create a frozen instance of {@link MtpConfig}, with defaults specified
772
+ * in Rust, in the {@link nobodywho} crate.
773
+ */
774
+ new: create,
775
+
776
+ /**
777
+ * Defaults specified in the {@link nobodywho} crate.
778
+ */
779
+ defaults: () => Object.freeze(defaults()) as Partial<MtpConfig>,
780
+
781
+ });
782
+ })();
783
+
784
+ const FfiConverterTypeMtpConfig = (() => {
785
+ type TypeName = MtpConfig;
786
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
787
+ read(from: RustBuffer): TypeName {
788
+ return {
789
+ kMax: FfiConverterUInt32.read(from),
790
+ pMin: FfiConverterFloat32.read(from)
791
+ };
792
+ }
793
+ write(value: TypeName, into: RustBuffer): void {
794
+ FfiConverterUInt32.write(value.kMax, into);
795
+ FfiConverterFloat32.write(value.pMin, into);
796
+ }
797
+ allocationSize(value: TypeName): number {
798
+ return FfiConverterUInt32.allocationSize(value.kMax) +
799
+ FfiConverterFloat32.allocationSize(value.pMin);
800
+
801
+ }
802
+ };
803
+ return new FFIConverter();
804
+ })();
805
+
806
+
659
807
  /**
660
808
  * A pending tool call waiting for resolution from the language binding.
661
809
  */
@@ -1370,6 +1518,50 @@ const FfiConverterTypePromptPart = (() => {
1370
1518
 
1371
1519
 
1372
1520
 
1521
+ /**
1522
+ * `push` always returns one of these: `Speech`/`Silence` for the confirmed
1523
+ * state when unchanged since the last call, or `SpeechStarted`/`SpeechEnded`
1524
+ * on the call that confirmed the transition.
1525
+ */
1526
+ export enum VoiceActivityDetectionEvent {
1527
+ Speech,
1528
+ SpeechStarted,
1529
+ SpeechEnded,
1530
+ Silence
1531
+ }
1532
+
1533
+ const FfiConverterTypeVoiceActivityDetectionEvent = (() => {
1534
+ const ordinalConverter = FfiConverterInt32;
1535
+ type TypeName = VoiceActivityDetectionEvent;
1536
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1537
+ read(from: RustBuffer): TypeName {
1538
+ switch (ordinalConverter.read(from)) {
1539
+ case 1: return VoiceActivityDetectionEvent.Speech;
1540
+ case 2: return VoiceActivityDetectionEvent.SpeechStarted;
1541
+ case 3: return VoiceActivityDetectionEvent.SpeechEnded;
1542
+ case 4: return VoiceActivityDetectionEvent.Silence;
1543
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1544
+ }
1545
+ }
1546
+ write(value: TypeName, into: RustBuffer): void {
1547
+ switch (value) {
1548
+ case VoiceActivityDetectionEvent.Speech: return ordinalConverter.write(1, into);
1549
+ case VoiceActivityDetectionEvent.SpeechStarted: return ordinalConverter.write(2, into);
1550
+ case VoiceActivityDetectionEvent.SpeechEnded: return ordinalConverter.write(3, into);
1551
+ case VoiceActivityDetectionEvent.Silence: return ordinalConverter.write(4, into);
1552
+ }
1553
+ }
1554
+ allocationSize(value: TypeName): number {
1555
+ return ordinalConverter.allocationSize(0);
1556
+ }
1557
+ }
1558
+ return new FFIConverter();
1559
+ })();
1560
+
1561
+
1562
+
1563
+
1564
+
1373
1565
  // FfiConverter for Map<string, boolean>
1374
1566
  const FfiConverterMapStringBool = new FfiConverterMap(FfiConverterString, FfiConverterBool);
1375
1567
 
@@ -1418,6 +1610,12 @@ export interface RustChatInterface {
1418
1610
  * Get all template variables.
1419
1611
  */
1420
1612
  getTemplateVariables(asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Map<string, boolean>>;
1613
+ /**
1614
+ * MTP draft acceptance rate for the most recent generation, in `[0.0, 1.0]`.
1615
+ *
1616
+ * Resets each generation. `null` when MTP is disabled or no drafts were proposed.
1617
+ */
1618
+ mtpAcceptanceRate(asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise</*f32*/number | undefined>;
1421
1619
  /**
1422
1620
  * Reset the chat context with a new system prompt and tools.
1423
1621
  */
@@ -1469,8 +1667,18 @@ export class RustChat extends UniffiAbstractObject implements RustChatInterface
1469
1667
  readonly [pointerLiteralSymbol]: UniffiHandle;
1470
1668
  /**
1471
1669
  * Create a new chat session.
1670
+ *
1671
+ * Pass an `mtp` config to enable MTP speculative decoding for this
1672
+ * chat; `null` disables it. Requires the `RustModel` to have been
1673
+ * loaded with a compatible `draft_model_path`; otherwise construction
1674
+ * fails. Adds around 5% to VRAM usage.
1675
+ *
1676
+ * `thread_count` is the number of CPU threads used for inference; `null`
1677
+ * detects the device's physical core count (performance cores only, on
1678
+ * Apple silicon), since hyperthreads and efficiency cores make inference
1679
+ * slower. Clamped to the CPU count.
1472
1680
  */
1473
- constructor(model: RustModelInterface, systemPrompt: string | undefined, contextSize: /*u32*/number, templateVariables: Map<string, boolean> | undefined, tools: Array<RustToolInterface> | undefined, sampler: SamplerConfigInterface | undefined) /*throws*/ {
1681
+ constructor(model: RustModelInterface, systemPrompt: string | undefined, contextSize: /*u32*/number, templateVariables: Map<string, boolean> | undefined, tools: Array<RustToolInterface> | undefined, sampler: SamplerConfigInterface | undefined, mtp: MtpConfig | undefined, threadCount: /*u32*/number | undefined) /*throws*/ {
1474
1682
  super();
1475
1683
  const pointer =
1476
1684
 
@@ -1484,6 +1692,8 @@ export class RustChat extends UniffiAbstractObject implements RustChatInterface
1484
1692
  FfiConverterOptionalMapStringBool.lower(templateVariables),
1485
1693
  FfiConverterOptionalArrayTypeRustTool.lower(tools),
1486
1694
  FfiConverterOptionalTypeSamplerConfig.lower(sampler),
1695
+ FfiConverterOptionalTypeMtpConfig.lower(mtp),
1696
+ FfiConverterOptionalUInt32.lower(threadCount),
1487
1697
  callStatus);
1488
1698
  },
1489
1699
  /*liftString:*/ FfiConverterString.lift,
@@ -1700,6 +1910,39 @@ async getTemplateVariables(asyncOpts_?: { signal: AbortSignal }): Promise<Map<s
1700
1910
  }
1701
1911
  }
1702
1912
 
1913
+ /**
1914
+ * MTP draft acceptance rate for the most recent generation, in `[0.0, 1.0]`.
1915
+ *
1916
+ * Resets each generation. `null` when MTP is disabled or no drafts were proposed.
1917
+ */
1918
+ async mtpAcceptanceRate(asyncOpts_?: { signal: AbortSignal }): Promise</*f32*/number | undefined> /*throws*/ {
1919
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
1920
+ try {
1921
+ return await uniffiRustCallAsync(
1922
+ /*rustCaller:*/ uniffiCaller,
1923
+ /*rustFutureFunc:*/ () => {
1924
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustchat_mtp_acceptance_rate(
1925
+ uniffiTypeRustChatObjectFactory.clonePointer(this)
1926
+
1927
+ );
1928
+ },
1929
+ /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_rust_buffer,
1930
+ /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_rust_buffer,
1931
+ /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_rust_buffer,
1932
+ /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_rust_buffer,
1933
+ /*liftFunc:*/ FfiConverterOptionalFloat32.lift.bind(FfiConverterOptionalFloat32),
1934
+ /*liftString:*/ FfiConverterString.lift,
1935
+ /*asyncOpts:*/ asyncOpts_,
1936
+ /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
1937
+ );
1938
+ } catch (__error: any) {
1939
+ if (uniffiIsDebug && __error instanceof Error) {
1940
+ __error.stack = __stack;
1941
+ }
1942
+ throw __error;
1943
+ }
1944
+ }
1945
+
1703
1946
  /**
1704
1947
  * Reset the chat context with a new system prompt and tools.
1705
1948
  */
@@ -2253,6 +2496,10 @@ export interface RustEncoderInterface {
2253
2496
  * Encode text into an embedding vector.
2254
2497
  */
2255
2498
  encode(text: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array</*f32*/number>>;
2499
+ /**
2500
+ * Encode multiple texts into embedding vectors, preserving input order.
2501
+ */
2502
+ encodeBatch(texts: Array<string>, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<Array<Array</*f32*/number>>>;
2256
2503
  }
2257
2504
 
2258
2505
 
@@ -2314,6 +2561,37 @@ async encode(text: string, asyncOpts_?: { signal: AbortSignal }): Promise<Array
2314
2561
  }
2315
2562
  }
2316
2563
 
2564
+ /**
2565
+ * Encode multiple texts into embedding vectors, preserving input order.
2566
+ */
2567
+ async encodeBatch(texts: Array<string>, asyncOpts_?: { signal: AbortSignal }): Promise<Array<Array</*f32*/number>>> /*throws*/ {
2568
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
2569
+ try {
2570
+ return await uniffiRustCallAsync(
2571
+ /*rustCaller:*/ uniffiCaller,
2572
+ /*rustFutureFunc:*/ () => {
2573
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustencoder_encode_batch(
2574
+ uniffiTypeRustEncoderObjectFactory.clonePointer(this),
2575
+ FfiConverterArrayString.lower(texts)
2576
+ );
2577
+ },
2578
+ /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_rust_buffer,
2579
+ /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_rust_buffer,
2580
+ /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_rust_buffer,
2581
+ /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_rust_buffer,
2582
+ /*liftFunc:*/ FfiConverterArrayArrayFloat32.lift.bind(FfiConverterArrayArrayFloat32),
2583
+ /*liftString:*/ FfiConverterString.lift,
2584
+ /*asyncOpts:*/ asyncOpts_,
2585
+ /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
2586
+ );
2587
+ } catch (__error: any) {
2588
+ if (uniffiIsDebug && __error instanceof Error) {
2589
+ __error.stack = __stack;
2590
+ }
2591
+ throw __error;
2592
+ }
2593
+ }
2594
+
2317
2595
 
2318
2596
  /**
2319
2597
  * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
@@ -2496,35 +2774,35 @@ const FfiConverterTypeRustModel = new FfiConverterObject(uniffiTypeRustModelObj
2496
2774
 
2497
2775
 
2498
2776
  /**
2499
- * Speech-to-text handle. Wraps `nobodywho::stt::Stt`.
2500
- * Use `transcribe_file` or `transcribe_pcm` to get a `RustSTTStream`.
2777
+ * Speech-to-text handle. Wraps `nobodywho::speech_to_text::SpeechToText`.
2778
+ * Use `transcribe_file` or `transcribe_pcm` to get a `RustSpeechToTextStream`.
2501
2779
  */
2502
- export interface RustSttInterface {
2780
+ export interface RustSpeechToTextInterface {
2503
2781
 
2504
2782
  /**
2505
2783
  * Start transcribing an audio file (WAV / MP3).
2506
- * Returns a `RustSTTStream` to consume tokens as they are generated.
2784
+ * Returns a `RustSpeechToTextStream` to consume tokens as they are generated.
2507
2785
  */
2508
- transcribeFile(path: string) /*throws*/: RustSttStreamInterface;
2786
+ transcribeFile(path: string) /*throws*/: RustSpeechToTextStreamInterface;
2509
2787
  /**
2510
2788
  * Start transcribing raw i16 PCM samples (e.g. from a microphone stream).
2511
2789
  * `sample_rate` is the capture rate in Hz; the backend resamples to 16 kHz internally.
2512
2790
  */
2513
- transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number) /*throws*/: RustSttStreamInterface;
2791
+ transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number) /*throws*/: RustSpeechToTextStreamInterface;
2514
2792
  }
2515
2793
 
2516
2794
 
2517
2795
  /**
2518
- * Speech-to-text handle. Wraps `nobodywho::stt::Stt`.
2519
- * Use `transcribe_file` or `transcribe_pcm` to get a `RustSTTStream`.
2796
+ * Speech-to-text handle. Wraps `nobodywho::speech_to_text::SpeechToText`.
2797
+ * Use `transcribe_file` or `transcribe_pcm` to get a `RustSpeechToTextStream`.
2520
2798
  */
2521
- export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2799
+ export class RustSpeechToText extends UniffiAbstractObject implements RustSpeechToTextInterface {
2522
2800
 
2523
- readonly [uniffiTypeNameSymbol] = "RustStt";
2801
+ readonly [uniffiTypeNameSymbol] = "RustSpeechToText";
2524
2802
  readonly [destructorGuardSymbol]: UniffiGcObject;
2525
2803
  readonly [pointerLiteralSymbol]: UniffiHandle;
2526
2804
  /**
2527
- * Create an STT handle. `source` is a HuggingFace repo (`hf://owner/repo`,
2805
+ * Create an SpeechToText handle. `source` is a HuggingFace repo (`hf://owner/repo`,
2528
2806
  * e.g. `"hf://onnx-community/whisper-base"`) or a local directory path.
2529
2807
  * `language` is an ISO 639-1 code (e.g. `"en"`); pass `None` to auto-detect.
2530
2808
  * `quantization` selects the ONNX precision variant to download and load:
@@ -2538,7 +2816,7 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2538
2816
  uniffiCaller.rustCallWithError(
2539
2817
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
2540
2818
  /*caller:*/ (callStatus) => {
2541
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_ruststt_new(
2819
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_rustspeechtotext_new(
2542
2820
  FfiConverterString.lower(source),
2543
2821
  FfiConverterOptionalString.lower(language),
2544
2822
  FfiConverterOptionalString.lower(quantization),
@@ -2547,7 +2825,7 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2547
2825
  /*liftString:*/ FfiConverterString.lift,
2548
2826
  );
2549
2827
  this[pointerLiteralSymbol] = pointer;
2550
- this[destructorGuardSymbol] = uniffiTypeRustSttObjectFactory.bless(pointer);
2828
+ this[destructorGuardSymbol] = uniffiTypeRustSpeechToTextObjectFactory.bless(pointer);
2551
2829
  }
2552
2830
 
2553
2831
 
@@ -2555,14 +2833,14 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2555
2833
 
2556
2834
  /**
2557
2835
  * Start transcribing an audio file (WAV / MP3).
2558
- * Returns a `RustSTTStream` to consume tokens as they are generated.
2836
+ * Returns a `RustSpeechToTextStream` to consume tokens as they are generated.
2559
2837
  */
2560
- transcribeFile(path: string): RustSttStreamInterface /*throws*/ {
2561
- return FfiConverterTypeRustSTTStream.lift(
2838
+ transcribeFile(path: string): RustSpeechToTextStreamInterface /*throws*/ {
2839
+ return FfiConverterTypeRustSpeechToTextStream.lift(
2562
2840
  uniffiCaller.rustCallWithError(
2563
2841
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
2564
2842
  /*caller:*/ (callStatus) => {
2565
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_ruststt_transcribe_file(uniffiTypeRustSttObjectFactory.clonePointer(this),
2843
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustspeechtotext_transcribe_file(uniffiTypeRustSpeechToTextObjectFactory.clonePointer(this),
2566
2844
  FfiConverterString.lower(path),
2567
2845
  callStatus);
2568
2846
  },
@@ -2574,12 +2852,12 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2574
2852
  * Start transcribing raw i16 PCM samples (e.g. from a microphone stream).
2575
2853
  * `sample_rate` is the capture rate in Hz; the backend resamples to 16 kHz internally.
2576
2854
  */
2577
- transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number): RustSttStreamInterface /*throws*/ {
2578
- return FfiConverterTypeRustSTTStream.lift(
2855
+ transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number): RustSpeechToTextStreamInterface /*throws*/ {
2856
+ return FfiConverterTypeRustSpeechToTextStream.lift(
2579
2857
  uniffiCaller.rustCallWithError(
2580
2858
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
2581
2859
  /*caller:*/ (callStatus) => {
2582
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_ruststt_transcribe_pcm(uniffiTypeRustSttObjectFactory.clonePointer(this),
2860
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustspeechtotext_transcribe_pcm(uniffiTypeRustSpeechToTextObjectFactory.clonePointer(this),
2583
2861
  FfiConverterArrayInt16.lower(samples),
2584
2862
  FfiConverterUInt32.lower(sampleRate),
2585
2863
  callStatus);
@@ -2595,28 +2873,28 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2595
2873
  uniffiDestroy(): void {
2596
2874
  const ptr = (this as any)[destructorGuardSymbol];
2597
2875
  if (ptr !== undefined) {
2598
- const pointer = uniffiTypeRustSttObjectFactory.pointer(this);
2599
- uniffiTypeRustSttObjectFactory.freePointer(pointer);
2600
- uniffiTypeRustSttObjectFactory.unbless(ptr);
2876
+ const pointer = uniffiTypeRustSpeechToTextObjectFactory.pointer(this);
2877
+ uniffiTypeRustSpeechToTextObjectFactory.freePointer(pointer);
2878
+ uniffiTypeRustSpeechToTextObjectFactory.unbless(ptr);
2601
2879
  delete (this as any)[destructorGuardSymbol];
2602
2880
  }
2603
2881
  }
2604
2882
 
2605
- static instanceOf(obj: any): obj is RustStt {
2606
- return uniffiTypeRustSttObjectFactory.isConcreteType(obj);
2883
+ static instanceOf(obj: any): obj is RustSpeechToText {
2884
+ return uniffiTypeRustSpeechToTextObjectFactory.isConcreteType(obj);
2607
2885
  }
2608
2886
 
2609
2887
 
2610
2888
  }
2611
2889
 
2612
- const uniffiTypeRustSttObjectFactory: UniffiObjectFactory<RustSttInterface> = (() => {
2890
+ const uniffiTypeRustSpeechToTextObjectFactory: UniffiObjectFactory<RustSpeechToTextInterface> = (() => {
2613
2891
 
2614
2892
  return {
2615
- create(pointer: UniffiHandle): RustSttInterface {
2616
- const instance = Object.create(RustStt.prototype);
2893
+ create(pointer: UniffiHandle): RustSpeechToTextInterface {
2894
+ const instance = Object.create(RustSpeechToText.prototype);
2617
2895
  instance[pointerLiteralSymbol] = pointer;
2618
2896
  instance[destructorGuardSymbol] = this.bless(pointer);
2619
- instance[uniffiTypeNameSymbol] = "RustStt";
2897
+ instance[uniffiTypeNameSymbol] = "RustSpeechToText";
2620
2898
  return instance;
2621
2899
  },
2622
2900
 
@@ -2624,7 +2902,7 @@ const uniffiTypeRustSttObjectFactory: UniffiObjectFactory<RustSttInterface> = ((
2624
2902
  bless(p: UniffiHandle): UniffiGcObject {
2625
2903
  return uniffiCaller.rustCall(
2626
2904
  /*caller:*/ (status) =>
2627
- nativeModule().ubrn_uniffi_internal_fn_method_ruststt_ffi__bless_pointer(p, status),
2905
+ nativeModule().ubrn_uniffi_internal_fn_method_rustspeechtotext_ffi__bless_pointer(p, status),
2628
2906
  /*liftString:*/ FfiConverterString.lift
2629
2907
  );
2630
2908
  },
@@ -2633,40 +2911,40 @@ const uniffiTypeRustSttObjectFactory: UniffiObjectFactory<RustSttInterface> = ((
2633
2911
  ptr.markDestroyed();
2634
2912
  },
2635
2913
 
2636
- pointer(obj: RustSttInterface): UniffiHandle {
2914
+ pointer(obj: RustSpeechToTextInterface): UniffiHandle {
2637
2915
  if ((obj as any)[destructorGuardSymbol] === undefined) {
2638
2916
  throw new UniffiInternalError.UnexpectedNullPointer();
2639
2917
  }
2640
2918
  return (obj as any)[pointerLiteralSymbol];
2641
2919
  },
2642
2920
 
2643
- clonePointer(obj: RustSttInterface): UniffiHandle {
2921
+ clonePointer(obj: RustSpeechToTextInterface): UniffiHandle {
2644
2922
  const pointer = this.pointer(obj);
2645
2923
  return uniffiCaller.rustCall(
2646
- /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_clone_ruststt(pointer, callStatus),
2924
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_clone_rustspeechtotext(pointer, callStatus),
2647
2925
  /*liftString:*/ FfiConverterString.lift
2648
2926
  );
2649
2927
  },
2650
2928
 
2651
2929
  freePointer(pointer: UniffiHandle): void {
2652
2930
  uniffiCaller.rustCall(
2653
- /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_free_ruststt(pointer, callStatus),
2931
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_free_rustspeechtotext(pointer, callStatus),
2654
2932
  /*liftString:*/ FfiConverterString.lift
2655
2933
  );
2656
2934
  },
2657
2935
 
2658
- isConcreteType(obj: any): obj is RustSttInterface {
2659
- return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustStt";
2936
+ isConcreteType(obj: any): obj is RustSpeechToTextInterface {
2937
+ return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustSpeechToText";
2660
2938
  },
2661
2939
  }})();
2662
- // FfiConverter for RustSttInterface
2663
- const FfiConverterTypeRustSTT = new FfiConverterObject(uniffiTypeRustSttObjectFactory);
2940
+ // FfiConverter for RustSpeechToTextInterface
2941
+ const FfiConverterTypeRustSpeechToText = new FfiConverterObject(uniffiTypeRustSpeechToTextObjectFactory);
2664
2942
 
2665
2943
 
2666
2944
  /**
2667
- * A stream of transcript tokens from a Whisper STT run.
2945
+ * A stream of transcript tokens from a Whisper SpeechToText run.
2668
2946
  */
2669
- export interface RustSttStreamInterface {
2947
+ export interface RustSpeechToTextStreamInterface {
2670
2948
 
2671
2949
  /**
2672
2950
  * Wait for transcription to finish and return the full transcript.
@@ -2680,18 +2958,18 @@ export interface RustSttStreamInterface {
2680
2958
 
2681
2959
 
2682
2960
  /**
2683
- * A stream of transcript tokens from a Whisper STT run.
2961
+ * A stream of transcript tokens from a Whisper SpeechToText run.
2684
2962
  */
2685
- export class RustSttStream extends UniffiAbstractObject implements RustSttStreamInterface {
2963
+ export class RustSpeechToTextStream extends UniffiAbstractObject implements RustSpeechToTextStreamInterface {
2686
2964
 
2687
- readonly [uniffiTypeNameSymbol] = "RustSttStream";
2965
+ readonly [uniffiTypeNameSymbol] = "RustSpeechToTextStream";
2688
2966
  readonly [destructorGuardSymbol]: UniffiGcObject;
2689
2967
  readonly [pointerLiteralSymbol]: UniffiHandle;
2690
2968
  // No primary constructor declared for this class.
2691
2969
  private constructor(pointer: UniffiHandle) {
2692
2970
  super();
2693
2971
  this[pointerLiteralSymbol] = pointer;
2694
- this[destructorGuardSymbol] = uniffiTypeRustSttStreamObjectFactory.bless(pointer);
2972
+ this[destructorGuardSymbol] = uniffiTypeRustSpeechToTextStreamObjectFactory.bless(pointer);
2695
2973
  }
2696
2974
 
2697
2975
 
@@ -2706,8 +2984,8 @@ async completed(asyncOpts_?: { signal: AbortSignal }): Promise<string> /*throws
2706
2984
  return await uniffiRustCallAsync(
2707
2985
  /*rustCaller:*/ uniffiCaller,
2708
2986
  /*rustFutureFunc:*/ () => {
2709
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_ruststtstream_completed(
2710
- uniffiTypeRustSttStreamObjectFactory.clonePointer(this)
2987
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustspeechtotextstream_completed(
2988
+ uniffiTypeRustSpeechToTextStreamObjectFactory.clonePointer(this)
2711
2989
 
2712
2990
  );
2713
2991
  },
@@ -2737,8 +3015,8 @@ async nextToken(asyncOpts_?: { signal: AbortSignal }): Promise<string | undefin
2737
3015
  return await uniffiRustCallAsync(
2738
3016
  /*rustCaller:*/ uniffiCaller,
2739
3017
  /*rustFutureFunc:*/ () => {
2740
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_ruststtstream_next_token(
2741
- uniffiTypeRustSttStreamObjectFactory.clonePointer(this)
3018
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustspeechtotextstream_next_token(
3019
+ uniffiTypeRustSpeechToTextStreamObjectFactory.clonePointer(this)
2742
3020
 
2743
3021
  );
2744
3022
  },
@@ -2766,28 +3044,201 @@ async nextToken(asyncOpts_?: { signal: AbortSignal }): Promise<string | undefin
2766
3044
  uniffiDestroy(): void {
2767
3045
  const ptr = (this as any)[destructorGuardSymbol];
2768
3046
  if (ptr !== undefined) {
2769
- const pointer = uniffiTypeRustSttStreamObjectFactory.pointer(this);
2770
- uniffiTypeRustSttStreamObjectFactory.freePointer(pointer);
2771
- uniffiTypeRustSttStreamObjectFactory.unbless(ptr);
3047
+ const pointer = uniffiTypeRustSpeechToTextStreamObjectFactory.pointer(this);
3048
+ uniffiTypeRustSpeechToTextStreamObjectFactory.freePointer(pointer);
3049
+ uniffiTypeRustSpeechToTextStreamObjectFactory.unbless(ptr);
3050
+ delete (this as any)[destructorGuardSymbol];
3051
+ }
3052
+ }
3053
+
3054
+ static instanceOf(obj: any): obj is RustSpeechToTextStream {
3055
+ return uniffiTypeRustSpeechToTextStreamObjectFactory.isConcreteType(obj);
3056
+ }
3057
+
3058
+
3059
+ }
3060
+
3061
+ const uniffiTypeRustSpeechToTextStreamObjectFactory: UniffiObjectFactory<RustSpeechToTextStreamInterface> = (() => {
3062
+
3063
+ return {
3064
+ create(pointer: UniffiHandle): RustSpeechToTextStreamInterface {
3065
+ const instance = Object.create(RustSpeechToTextStream.prototype);
3066
+ instance[pointerLiteralSymbol] = pointer;
3067
+ instance[destructorGuardSymbol] = this.bless(pointer);
3068
+ instance[uniffiTypeNameSymbol] = "RustSpeechToTextStream";
3069
+ return instance;
3070
+ },
3071
+
3072
+
3073
+ bless(p: UniffiHandle): UniffiGcObject {
3074
+ return uniffiCaller.rustCall(
3075
+ /*caller:*/ (status) =>
3076
+ nativeModule().ubrn_uniffi_internal_fn_method_rustspeechtotextstream_ffi__bless_pointer(p, status),
3077
+ /*liftString:*/ FfiConverterString.lift
3078
+ );
3079
+ },
3080
+
3081
+ unbless(ptr: UniffiGcObject) {
3082
+ ptr.markDestroyed();
3083
+ },
3084
+
3085
+ pointer(obj: RustSpeechToTextStreamInterface): UniffiHandle {
3086
+ if ((obj as any)[destructorGuardSymbol] === undefined) {
3087
+ throw new UniffiInternalError.UnexpectedNullPointer();
3088
+ }
3089
+ return (obj as any)[pointerLiteralSymbol];
3090
+ },
3091
+
3092
+ clonePointer(obj: RustSpeechToTextStreamInterface): UniffiHandle {
3093
+ const pointer = this.pointer(obj);
3094
+ return uniffiCaller.rustCall(
3095
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_clone_rustspeechtotextstream(pointer, callStatus),
3096
+ /*liftString:*/ FfiConverterString.lift
3097
+ );
3098
+ },
3099
+
3100
+ freePointer(pointer: UniffiHandle): void {
3101
+ uniffiCaller.rustCall(
3102
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_free_rustspeechtotextstream(pointer, callStatus),
3103
+ /*liftString:*/ FfiConverterString.lift
3104
+ );
3105
+ },
3106
+
3107
+ isConcreteType(obj: any): obj is RustSpeechToTextStreamInterface {
3108
+ return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustSpeechToTextStream";
3109
+ },
3110
+ }})();
3111
+ // FfiConverter for RustSpeechToTextStreamInterface
3112
+ const FfiConverterTypeRustSpeechToTextStream = new FfiConverterObject(uniffiTypeRustSpeechToTextStreamObjectFactory);
3113
+
3114
+
3115
+ export interface RustTextToSpeechInterface {
3116
+
3117
+ /**
3118
+ * Synthesize text and return WAV bytes.
3119
+ */
3120
+ synthesize(text: string) /*throws*/: ArrayBuffer;
3121
+ /**
3122
+ * Synthesize text asynchronously and return WAV bytes.
3123
+ */
3124
+ synthesizeAsync(text: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<ArrayBuffer>;
3125
+ }
3126
+
3127
+
3128
+ export class RustTextToSpeech extends UniffiAbstractObject implements RustTextToSpeechInterface {
3129
+
3130
+ readonly [uniffiTypeNameSymbol] = "RustTextToSpeech";
3131
+ readonly [destructorGuardSymbol]: UniffiGcObject;
3132
+ readonly [pointerLiteralSymbol]: UniffiHandle;
3133
+ /**
3134
+ * Create a TextToSpeech synthesizer.
3135
+ */
3136
+ constructor(source: string, architecture: string | undefined, voice: string | undefined, language: string | undefined, speed: /*f32*/number | undefined, steps: /*u32*/number | undefined, silenceDuration: /*f32*/number | undefined, precision: string | undefined, temperature: /*f32*/number | undefined, huggingfaceToken: string | undefined, device: string | undefined) /*throws*/ {
3137
+ super();
3138
+ const pointer =
3139
+
3140
+ uniffiCaller.rustCallWithError(
3141
+ /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
3142
+ /*caller:*/ (callStatus) => {
3143
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_rusttexttospeech_new(
3144
+ FfiConverterString.lower(source),
3145
+ FfiConverterOptionalString.lower(architecture),
3146
+ FfiConverterOptionalString.lower(voice),
3147
+ FfiConverterOptionalString.lower(language),
3148
+ FfiConverterOptionalFloat32.lower(speed),
3149
+ FfiConverterOptionalUInt32.lower(steps),
3150
+ FfiConverterOptionalFloat32.lower(silenceDuration),
3151
+ FfiConverterOptionalString.lower(precision),
3152
+ FfiConverterOptionalFloat32.lower(temperature),
3153
+ FfiConverterOptionalString.lower(huggingfaceToken),
3154
+ FfiConverterOptionalString.lower(device),
3155
+ callStatus);
3156
+ },
3157
+ /*liftString:*/ FfiConverterString.lift,
3158
+ );
3159
+ this[pointerLiteralSymbol] = pointer;
3160
+ this[destructorGuardSymbol] = uniffiTypeRustTextToSpeechObjectFactory.bless(pointer);
3161
+ }
3162
+
3163
+
3164
+
3165
+
3166
+ /**
3167
+ * Synthesize text and return WAV bytes.
3168
+ */
3169
+ synthesize(text: string): ArrayBuffer /*throws*/ {
3170
+ return FfiConverterArrayBuffer.lift(
3171
+ uniffiCaller.rustCallWithError(
3172
+ /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
3173
+ /*caller:*/ (callStatus) => {
3174
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rusttexttospeech_synthesize(uniffiTypeRustTextToSpeechObjectFactory.clonePointer(this),
3175
+ FfiConverterString.lower(text),
3176
+ callStatus);
3177
+ },
3178
+ /*liftString:*/ FfiConverterString.lift,
3179
+ ));
3180
+ }
3181
+
3182
+ /**
3183
+ * Synthesize text asynchronously and return WAV bytes.
3184
+ */
3185
+ async synthesizeAsync(text: string, asyncOpts_?: { signal: AbortSignal }): Promise<ArrayBuffer> /*throws*/ {
3186
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
3187
+ try {
3188
+ return await uniffiRustCallAsync(
3189
+ /*rustCaller:*/ uniffiCaller,
3190
+ /*rustFutureFunc:*/ () => {
3191
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rusttexttospeech_synthesize_async(
3192
+ uniffiTypeRustTextToSpeechObjectFactory.clonePointer(this),
3193
+ FfiConverterString.lower(text)
3194
+ );
3195
+ },
3196
+ /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_rust_buffer,
3197
+ /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_rust_buffer,
3198
+ /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_rust_buffer,
3199
+ /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_rust_buffer,
3200
+ /*liftFunc:*/ FfiConverterArrayBuffer.lift.bind(FfiConverterArrayBuffer),
3201
+ /*liftString:*/ FfiConverterString.lift,
3202
+ /*asyncOpts:*/ asyncOpts_,
3203
+ /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
3204
+ );
3205
+ } catch (__error: any) {
3206
+ if (uniffiIsDebug && __error instanceof Error) {
3207
+ __error.stack = __stack;
3208
+ }
3209
+ throw __error;
3210
+ }
3211
+ }
3212
+
3213
+
3214
+ /**
3215
+ * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
3216
+ */
3217
+ uniffiDestroy(): void {
3218
+ const ptr = (this as any)[destructorGuardSymbol];
3219
+ if (ptr !== undefined) {
3220
+ const pointer = uniffiTypeRustTextToSpeechObjectFactory.pointer(this);
3221
+ uniffiTypeRustTextToSpeechObjectFactory.freePointer(pointer);
3222
+ uniffiTypeRustTextToSpeechObjectFactory.unbless(ptr);
2772
3223
  delete (this as any)[destructorGuardSymbol];
2773
3224
  }
2774
3225
  }
2775
3226
 
2776
- static instanceOf(obj: any): obj is RustSttStream {
2777
- return uniffiTypeRustSttStreamObjectFactory.isConcreteType(obj);
3227
+ static instanceOf(obj: any): obj is RustTextToSpeech {
3228
+ return uniffiTypeRustTextToSpeechObjectFactory.isConcreteType(obj);
2778
3229
  }
2779
3230
 
2780
3231
 
2781
3232
  }
2782
3233
 
2783
- const uniffiTypeRustSttStreamObjectFactory: UniffiObjectFactory<RustSttStreamInterface> = (() => {
3234
+ const uniffiTypeRustTextToSpeechObjectFactory: UniffiObjectFactory<RustTextToSpeechInterface> = (() => {
2784
3235
 
2785
3236
  return {
2786
- create(pointer: UniffiHandle): RustSttStreamInterface {
2787
- const instance = Object.create(RustSttStream.prototype);
3237
+ create(pointer: UniffiHandle): RustTextToSpeechInterface {
3238
+ const instance = Object.create(RustTextToSpeech.prototype);
2788
3239
  instance[pointerLiteralSymbol] = pointer;
2789
3240
  instance[destructorGuardSymbol] = this.bless(pointer);
2790
- instance[uniffiTypeNameSymbol] = "RustSttStream";
3241
+ instance[uniffiTypeNameSymbol] = "RustTextToSpeech";
2791
3242
  return instance;
2792
3243
  },
2793
3244
 
@@ -2795,7 +3246,7 @@ const uniffiTypeRustSttStreamObjectFactory: UniffiObjectFactory<RustSttStreamInt
2795
3246
  bless(p: UniffiHandle): UniffiGcObject {
2796
3247
  return uniffiCaller.rustCall(
2797
3248
  /*caller:*/ (status) =>
2798
- nativeModule().ubrn_uniffi_internal_fn_method_ruststtstream_ffi__bless_pointer(p, status),
3249
+ nativeModule().ubrn_uniffi_internal_fn_method_rusttexttospeech_ffi__bless_pointer(p, status),
2799
3250
  /*liftString:*/ FfiConverterString.lift
2800
3251
  );
2801
3252
  },
@@ -2804,34 +3255,34 @@ const uniffiTypeRustSttStreamObjectFactory: UniffiObjectFactory<RustSttStreamInt
2804
3255
  ptr.markDestroyed();
2805
3256
  },
2806
3257
 
2807
- pointer(obj: RustSttStreamInterface): UniffiHandle {
3258
+ pointer(obj: RustTextToSpeechInterface): UniffiHandle {
2808
3259
  if ((obj as any)[destructorGuardSymbol] === undefined) {
2809
3260
  throw new UniffiInternalError.UnexpectedNullPointer();
2810
3261
  }
2811
3262
  return (obj as any)[pointerLiteralSymbol];
2812
3263
  },
2813
3264
 
2814
- clonePointer(obj: RustSttStreamInterface): UniffiHandle {
3265
+ clonePointer(obj: RustTextToSpeechInterface): UniffiHandle {
2815
3266
  const pointer = this.pointer(obj);
2816
3267
  return uniffiCaller.rustCall(
2817
- /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_clone_ruststtstream(pointer, callStatus),
3268
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_clone_rusttexttospeech(pointer, callStatus),
2818
3269
  /*liftString:*/ FfiConverterString.lift
2819
3270
  );
2820
3271
  },
2821
3272
 
2822
3273
  freePointer(pointer: UniffiHandle): void {
2823
3274
  uniffiCaller.rustCall(
2824
- /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_free_ruststtstream(pointer, callStatus),
3275
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_free_rusttexttospeech(pointer, callStatus),
2825
3276
  /*liftString:*/ FfiConverterString.lift
2826
3277
  );
2827
3278
  },
2828
3279
 
2829
- isConcreteType(obj: any): obj is RustSttStreamInterface {
2830
- return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustSttStream";
3280
+ isConcreteType(obj: any): obj is RustTextToSpeechInterface {
3281
+ return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustTextToSpeech";
2831
3282
  },
2832
3283
  }})();
2833
- // FfiConverter for RustSttStreamInterface
2834
- const FfiConverterTypeRustSTTStream = new FfiConverterObject(uniffiTypeRustSttStreamObjectFactory);
3284
+ // FfiConverter for RustTextToSpeechInterface
3285
+ const FfiConverterTypeRustTextToSpeech = new FfiConverterObject(uniffiTypeRustTextToSpeechObjectFactory);
2835
3286
 
2836
3287
 
2837
3288
  export interface RustTokenStreamInterface {
@@ -3197,64 +3648,115 @@ const uniffiTypeRustToolObjectFactory: UniffiObjectFactory<RustToolInterface> =
3197
3648
  const FfiConverterTypeRustTool = new FfiConverterObject(uniffiTypeRustToolObjectFactory);
3198
3649
 
3199
3650
 
3200
- export interface RustTtsInterface {
3651
+ /**
3652
+ * Voice activity detector. Wraps `nobodywho::voice_activity_detection::VoiceActivityDetection`.
3653
+ * Feed audio chunks via `push`; once `push` returns `SpeechEnded`, call
3654
+ * `finish` to get that turn's captured audio (with pre-roll) and reset.
3655
+ */
3656
+ export interface RustVoiceActivityDetectionInterface {
3201
3657
 
3202
3658
  /**
3203
- * Synthesize text and return WAV bytes.
3659
+ * Return the current turn's captured audio (from the confirmed
3660
+ * `SpeechStarted`, including a small pre-roll, through to
3661
+ * `SpeechEnded`) and reset internal state for the next turn. Empty if
3662
+ * speech was never confirmed.
3204
3663
  */
3205
- synthesize(text: string) /*throws*/: ArrayBuffer;
3664
+ finish() : Array</*i16*/number>;
3206
3665
  /**
3207
- * Synthesize text asynchronously and return WAV bytes.
3666
+ * Feed the newest chunk of i16 PCM audio (not the whole accumulated
3667
+ * buffer — the detector tracks the current turn internally). Always
3668
+ * returns the current confirmed state: `Speech`/`Silence` if unchanged
3669
+ * since the last call, or `SpeechStarted`/`SpeechEnded` on the call that
3670
+ * confirmed the transition.
3208
3671
  */
3209
- synthesizeAsync(text: string, asyncOpts_?: { signal: AbortSignal }) /*throws*/: Promise<ArrayBuffer>;
3672
+ push(chunk: Array</*i16*/number>) /*throws*/: VoiceActivityDetectionEvent;
3673
+ /**
3674
+ * Detect every speech segment in a complete audio buffer, returning
3675
+ * each segment's audio (with a short pre-roll) in order. Unlike `push`,
3676
+ * correctly finds every segment regardless of buffer size — use this
3677
+ * for offline/batch processing instead of live streaming.
3678
+ */
3679
+ segment(samples: Array</*i16*/number>) /*throws*/: Array<Array</*i16*/number>>;
3210
3680
  }
3211
3681
 
3212
3682
 
3213
- export class RustTts extends UniffiAbstractObject implements RustTtsInterface {
3683
+ /**
3684
+ * Voice activity detector. Wraps `nobodywho::voice_activity_detection::VoiceActivityDetection`.
3685
+ * Feed audio chunks via `push`; once `push` returns `SpeechEnded`, call
3686
+ * `finish` to get that turn's captured audio (with pre-roll) and reset.
3687
+ */
3688
+ export class RustVoiceActivityDetection extends UniffiAbstractObject implements RustVoiceActivityDetectionInterface {
3214
3689
 
3215
- readonly [uniffiTypeNameSymbol] = "RustTts";
3690
+ readonly [uniffiTypeNameSymbol] = "RustVoiceActivityDetection";
3216
3691
  readonly [destructorGuardSymbol]: UniffiGcObject;
3217
3692
  readonly [pointerLiteralSymbol]: UniffiHandle;
3218
3693
  /**
3219
- * Create a TTS synthesizer.
3694
+ * Create a voice activity detector.
3695
+ *
3696
+ * `source` is a HuggingFace repo (`hf://owner/repo`) or local directory
3697
+ * for the Silero VAD ONNX model; `None` uses the default
3698
+ * (`hf://onnx-community/silero-vad`). `sample_rate` is the rate of the
3699
+ * audio you'll pass to `push` — Silero runs at 16kHz internally,
3700
+ * anything else is resampled. `threshold`, `min_silence_duration_ms`,
3701
+ * `min_speech_duration_ms`, and `preroll_duration_ms` default to the
3702
+ * core `VoiceActivityDetectionConfig` defaults when omitted.
3220
3703
  */
3221
- constructor(source: string, architecture: string | undefined, voice: string | undefined, language: string | undefined, speed: /*f32*/number | undefined, steps: /*u32*/number | undefined, silenceDuration: /*f32*/number | undefined, device: string | undefined) /*throws*/ {
3704
+ constructor(source: string | undefined, sampleRate: /*u32*/number, threshold: /*f32*/number | undefined, minSilenceDurationMs: /*u32*/number | undefined, minSpeechDurationMs: /*u32*/number | undefined, prerollDurationMs: /*u32*/number | undefined, device: string | undefined) /*throws*/ {
3222
3705
  super();
3223
3706
  const pointer =
3224
3707
 
3225
3708
  uniffiCaller.rustCallWithError(
3226
3709
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
3227
3710
  /*caller:*/ (callStatus) => {
3228
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_rusttts_new(
3229
- FfiConverterString.lower(source),
3230
- FfiConverterOptionalString.lower(architecture),
3231
- FfiConverterOptionalString.lower(voice),
3232
- FfiConverterOptionalString.lower(language),
3233
- FfiConverterOptionalFloat32.lower(speed),
3234
- FfiConverterOptionalUInt32.lower(steps),
3235
- FfiConverterOptionalFloat32.lower(silenceDuration),
3711
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_rustvoiceactivitydetection_new(
3712
+ FfiConverterOptionalString.lower(source),
3713
+ FfiConverterUInt32.lower(sampleRate),
3714
+ FfiConverterOptionalFloat32.lower(threshold),
3715
+ FfiConverterOptionalUInt32.lower(minSilenceDurationMs),
3716
+ FfiConverterOptionalUInt32.lower(minSpeechDurationMs),
3717
+ FfiConverterOptionalUInt32.lower(prerollDurationMs),
3236
3718
  FfiConverterOptionalString.lower(device),
3237
3719
  callStatus);
3238
3720
  },
3239
3721
  /*liftString:*/ FfiConverterString.lift,
3240
3722
  );
3241
3723
  this[pointerLiteralSymbol] = pointer;
3242
- this[destructorGuardSymbol] = uniffiTypeRustTtsObjectFactory.bless(pointer);
3724
+ this[destructorGuardSymbol] = uniffiTypeRustVoiceActivityDetectionObjectFactory.bless(pointer);
3243
3725
  }
3244
3726
 
3245
3727
 
3246
3728
 
3247
3729
 
3248
3730
  /**
3249
- * Synthesize text and return WAV bytes.
3731
+ * Return the current turn's captured audio (from the confirmed
3732
+ * `SpeechStarted`, including a small pre-roll, through to
3733
+ * `SpeechEnded`) and reset internal state for the next turn. Empty if
3734
+ * speech was never confirmed.
3250
3735
  */
3251
- synthesize(text: string): ArrayBuffer /*throws*/ {
3252
- return FfiConverterArrayBuffer.lift(
3736
+ finish(): Array</*i16*/number> {
3737
+ return FfiConverterArrayInt16.lift(uniffiCaller.rustCall(
3738
+ /*caller:*/ (callStatus) => {
3739
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustvoiceactivitydetection_finish(uniffiTypeRustVoiceActivityDetectionObjectFactory.clonePointer(this),
3740
+ callStatus);
3741
+ },
3742
+ /*liftString:*/ FfiConverterString.lift,
3743
+ ));
3744
+ }
3745
+
3746
+ /**
3747
+ * Feed the newest chunk of i16 PCM audio (not the whole accumulated
3748
+ * buffer — the detector tracks the current turn internally). Always
3749
+ * returns the current confirmed state: `Speech`/`Silence` if unchanged
3750
+ * since the last call, or `SpeechStarted`/`SpeechEnded` on the call that
3751
+ * confirmed the transition.
3752
+ */
3753
+ push(chunk: Array</*i16*/number>): VoiceActivityDetectionEvent /*throws*/ {
3754
+ return FfiConverterTypeVoiceActivityDetectionEvent.lift(
3253
3755
  uniffiCaller.rustCallWithError(
3254
3756
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
3255
3757
  /*caller:*/ (callStatus) => {
3256
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rusttts_synthesize(uniffiTypeRustTtsObjectFactory.clonePointer(this),
3257
- FfiConverterString.lower(text),
3758
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustvoiceactivitydetection_push(uniffiTypeRustVoiceActivityDetectionObjectFactory.clonePointer(this),
3759
+ FfiConverterArrayInt16.lower(chunk),
3258
3760
  callStatus);
3259
3761
  },
3260
3762
  /*liftString:*/ FfiConverterString.lift,
@@ -3262,34 +3764,22 @@ export class RustTts extends UniffiAbstractObject implements RustTtsInterface {
3262
3764
  }
3263
3765
 
3264
3766
  /**
3265
- * Synthesize text asynchronously and return WAV bytes.
3767
+ * Detect every speech segment in a complete audio buffer, returning
3768
+ * each segment's audio (with a short pre-roll) in order. Unlike `push`,
3769
+ * correctly finds every segment regardless of buffer size — use this
3770
+ * for offline/batch processing instead of live streaming.
3266
3771
  */
3267
- async synthesizeAsync(text: string, asyncOpts_?: { signal: AbortSignal }): Promise<ArrayBuffer> /*throws*/ {
3268
- const __stack = uniffiIsDebug ? new Error().stack : undefined;
3269
- try {
3270
- return await uniffiRustCallAsync(
3271
- /*rustCaller:*/ uniffiCaller,
3272
- /*rustFutureFunc:*/ () => {
3273
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rusttts_synthesize_async(
3274
- uniffiTypeRustTtsObjectFactory.clonePointer(this),
3275
- FfiConverterString.lower(text)
3276
- );
3772
+ segment(samples: Array</*i16*/number>): Array<Array</*i16*/number>> /*throws*/ {
3773
+ return FfiConverterArrayArrayInt16.lift(
3774
+ uniffiCaller.rustCallWithError(
3775
+ /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
3776
+ /*caller:*/ (callStatus) => {
3777
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustvoiceactivitydetection_segment(uniffiTypeRustVoiceActivityDetectionObjectFactory.clonePointer(this),
3778
+ FfiConverterArrayInt16.lower(samples),
3779
+ callStatus);
3277
3780
  },
3278
- /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_rust_buffer,
3279
- /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_rust_buffer,
3280
- /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_rust_buffer,
3281
- /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_rust_buffer,
3282
- /*liftFunc:*/ FfiConverterArrayBuffer.lift.bind(FfiConverterArrayBuffer),
3283
3781
  /*liftString:*/ FfiConverterString.lift,
3284
- /*asyncOpts:*/ asyncOpts_,
3285
- /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
3286
- );
3287
- } catch (__error: any) {
3288
- if (uniffiIsDebug && __error instanceof Error) {
3289
- __error.stack = __stack;
3290
- }
3291
- throw __error;
3292
- }
3782
+ ));
3293
3783
  }
3294
3784
 
3295
3785
 
@@ -3299,28 +3789,28 @@ async synthesizeAsync(text: string, asyncOpts_?: { signal: AbortSignal }): Prom
3299
3789
  uniffiDestroy(): void {
3300
3790
  const ptr = (this as any)[destructorGuardSymbol];
3301
3791
  if (ptr !== undefined) {
3302
- const pointer = uniffiTypeRustTtsObjectFactory.pointer(this);
3303
- uniffiTypeRustTtsObjectFactory.freePointer(pointer);
3304
- uniffiTypeRustTtsObjectFactory.unbless(ptr);
3792
+ const pointer = uniffiTypeRustVoiceActivityDetectionObjectFactory.pointer(this);
3793
+ uniffiTypeRustVoiceActivityDetectionObjectFactory.freePointer(pointer);
3794
+ uniffiTypeRustVoiceActivityDetectionObjectFactory.unbless(ptr);
3305
3795
  delete (this as any)[destructorGuardSymbol];
3306
3796
  }
3307
3797
  }
3308
3798
 
3309
- static instanceOf(obj: any): obj is RustTts {
3310
- return uniffiTypeRustTtsObjectFactory.isConcreteType(obj);
3799
+ static instanceOf(obj: any): obj is RustVoiceActivityDetection {
3800
+ return uniffiTypeRustVoiceActivityDetectionObjectFactory.isConcreteType(obj);
3311
3801
  }
3312
3802
 
3313
3803
 
3314
3804
  }
3315
3805
 
3316
- const uniffiTypeRustTtsObjectFactory: UniffiObjectFactory<RustTtsInterface> = (() => {
3806
+ const uniffiTypeRustVoiceActivityDetectionObjectFactory: UniffiObjectFactory<RustVoiceActivityDetectionInterface> = (() => {
3317
3807
 
3318
3808
  return {
3319
- create(pointer: UniffiHandle): RustTtsInterface {
3320
- const instance = Object.create(RustTts.prototype);
3809
+ create(pointer: UniffiHandle): RustVoiceActivityDetectionInterface {
3810
+ const instance = Object.create(RustVoiceActivityDetection.prototype);
3321
3811
  instance[pointerLiteralSymbol] = pointer;
3322
3812
  instance[destructorGuardSymbol] = this.bless(pointer);
3323
- instance[uniffiTypeNameSymbol] = "RustTts";
3813
+ instance[uniffiTypeNameSymbol] = "RustVoiceActivityDetection";
3324
3814
  return instance;
3325
3815
  },
3326
3816
 
@@ -3328,7 +3818,7 @@ const uniffiTypeRustTtsObjectFactory: UniffiObjectFactory<RustTtsInterface> = ((
3328
3818
  bless(p: UniffiHandle): UniffiGcObject {
3329
3819
  return uniffiCaller.rustCall(
3330
3820
  /*caller:*/ (status) =>
3331
- nativeModule().ubrn_uniffi_internal_fn_method_rusttts_ffi__bless_pointer(p, status),
3821
+ nativeModule().ubrn_uniffi_internal_fn_method_rustvoiceactivitydetection_ffi__bless_pointer(p, status),
3332
3822
  /*liftString:*/ FfiConverterString.lift
3333
3823
  );
3334
3824
  },
@@ -3337,34 +3827,34 @@ const uniffiTypeRustTtsObjectFactory: UniffiObjectFactory<RustTtsInterface> = ((
3337
3827
  ptr.markDestroyed();
3338
3828
  },
3339
3829
 
3340
- pointer(obj: RustTtsInterface): UniffiHandle {
3830
+ pointer(obj: RustVoiceActivityDetectionInterface): UniffiHandle {
3341
3831
  if ((obj as any)[destructorGuardSymbol] === undefined) {
3342
3832
  throw new UniffiInternalError.UnexpectedNullPointer();
3343
3833
  }
3344
3834
  return (obj as any)[pointerLiteralSymbol];
3345
3835
  },
3346
3836
 
3347
- clonePointer(obj: RustTtsInterface): UniffiHandle {
3837
+ clonePointer(obj: RustVoiceActivityDetectionInterface): UniffiHandle {
3348
3838
  const pointer = this.pointer(obj);
3349
3839
  return uniffiCaller.rustCall(
3350
- /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_clone_rusttts(pointer, callStatus),
3840
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_clone_rustvoiceactivitydetection(pointer, callStatus),
3351
3841
  /*liftString:*/ FfiConverterString.lift
3352
3842
  );
3353
3843
  },
3354
3844
 
3355
3845
  freePointer(pointer: UniffiHandle): void {
3356
3846
  uniffiCaller.rustCall(
3357
- /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_free_rusttts(pointer, callStatus),
3847
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_free_rustvoiceactivitydetection(pointer, callStatus),
3358
3848
  /*liftString:*/ FfiConverterString.lift
3359
3849
  );
3360
3850
  },
3361
3851
 
3362
- isConcreteType(obj: any): obj is RustTtsInterface {
3363
- return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustTts";
3852
+ isConcreteType(obj: any): obj is RustVoiceActivityDetectionInterface {
3853
+ return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustVoiceActivityDetection";
3364
3854
  },
3365
3855
  }})();
3366
- // FfiConverter for RustTtsInterface
3367
- const FfiConverterTypeRustTts = new FfiConverterObject(uniffiTypeRustTtsObjectFactory);
3856
+ // FfiConverter for RustVoiceActivityDetectionInterface
3857
+ const FfiConverterTypeRustVoiceActivityDetection = new FfiConverterObject(uniffiTypeRustVoiceActivityDetectionObjectFactory);
3368
3858
 
3369
3859
 
3370
3860
  export interface SamplerBuilderInterface {
@@ -3883,6 +4373,10 @@ const FfiConverterOptionalFloat32 = new FfiConverterOptional(FfiConverterFloat32
3883
4373
  const FfiConverterOptionalInt32 = new FfiConverterOptional(FfiConverterInt32);
3884
4374
 
3885
4375
 
4376
+ // FfiConverter for MtpConfig | undefined
4377
+ const FfiConverterOptionalTypeMtpConfig = new FfiConverterOptional(FfiConverterTypeMtpConfig);
4378
+
4379
+
3886
4380
  // FfiConverter for PendingToolCall | undefined
3887
4381
  const FfiConverterOptionalTypePendingToolCall = new FfiConverterOptional(FfiConverterTypePendingToolCall);
3888
4382
 
@@ -3955,6 +4449,14 @@ const FfiConverterArrayTypeRustTool = new FfiConverterArray(FfiConverterTypeRust
3955
4449
  const FfiConverterArrayOptionalInt32 = new FfiConverterArray(FfiConverterOptionalInt32);
3956
4450
 
3957
4451
 
4452
+ // FfiConverter for Array<Array</*f32*/number>>
4453
+ const FfiConverterArrayArrayFloat32 = new FfiConverterArray(FfiConverterArrayFloat32);
4454
+
4455
+
4456
+ // FfiConverter for Array<Array</*i16*/number>>
4457
+ const FfiConverterArrayArrayInt16 = new FfiConverterArray(FfiConverterArrayInt16);
4458
+
4459
+
3958
4460
  // FfiConverter for Array<RustToolInterface> | undefined
3959
4461
  const FfiConverterOptionalArrayTypeRustTool = new FfiConverterOptional(FfiConverterArrayTypeRustTool);
3960
4462
 
@@ -3985,11 +4487,17 @@ function uniffiEnsureInitialized() {
3985
4487
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_get_cached_models() !== 12002) {
3986
4488
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_get_cached_models");
3987
4489
  }
3988
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_model() !== 33587) {
4490
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_model() !== 22964) {
3989
4491
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_load_model");
3990
4492
  }
3991
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_tts() !== 61935) {
3992
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_load_tts");
4493
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_speech_to_text() !== 3224) {
4494
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_load_speech_to_text");
4495
+ }
4496
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_text_to_speech() !== 45176) {
4497
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_load_text_to_speech");
4498
+ }
4499
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_voice_activity_detection() !== 42331) {
4500
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_load_voice_activity_detection");
3993
4501
  }
3994
4502
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_sampler_preset_constrain_with_grammar() !== 13698) {
3995
4503
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_sampler_preset_constrain_with_grammar");
@@ -4048,6 +4556,9 @@ function uniffiEnsureInitialized() {
4048
4556
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustchat_get_template_variables() !== 19616) {
4049
4557
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustchat_get_template_variables");
4050
4558
  }
4559
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustchat_mtp_acceptance_rate() !== 727) {
4560
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustchat_mtp_acceptance_rate");
4561
+ }
4051
4562
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustchat_reset_context() !== 47191) {
4052
4563
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustchat_reset_context");
4053
4564
  }
@@ -4087,20 +4598,29 @@ function uniffiEnsureInitialized() {
4087
4598
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustencoder_encode() !== 52601) {
4088
4599
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustencoder_encode");
4089
4600
  }
4601
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustencoder_encode_batch() !== 20675) {
4602
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustencoder_encode_batch");
4603
+ }
4090
4604
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustmodel_max_ctx() !== 52004) {
4091
4605
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustmodel_max_ctx");
4092
4606
  }
4093
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststt_transcribe_file() !== 43975) {
4094
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_ruststt_transcribe_file");
4607
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustspeechtotext_transcribe_file() !== 59975) {
4608
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustspeechtotext_transcribe_file");
4609
+ }
4610
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustspeechtotext_transcribe_pcm() !== 9293) {
4611
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustspeechtotext_transcribe_pcm");
4095
4612
  }
4096
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststt_transcribe_pcm() !== 61166) {
4097
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_ruststt_transcribe_pcm");
4613
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustspeechtotextstream_completed() !== 15944) {
4614
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustspeechtotextstream_completed");
4098
4615
  }
4099
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststtstream_completed() !== 22443) {
4100
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_ruststtstream_completed");
4616
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustspeechtotextstream_next_token() !== 8103) {
4617
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustspeechtotextstream_next_token");
4101
4618
  }
4102
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststtstream_next_token() !== 38526) {
4103
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_ruststtstream_next_token");
4619
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttexttospeech_synthesize() !== 61700) {
4620
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttexttospeech_synthesize");
4621
+ }
4622
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttexttospeech_synthesize_async() !== 14494) {
4623
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttexttospeech_synthesize_async");
4104
4624
  }
4105
4625
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttokenstream_completed() !== 26060) {
4106
4626
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttokenstream_completed");
@@ -4117,11 +4637,14 @@ function uniffiEnsureInitialized() {
4117
4637
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttool_resolve_pending_call() !== 10096) {
4118
4638
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttool_resolve_pending_call");
4119
4639
  }
4120
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttts_synthesize() !== 56024) {
4121
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttts_synthesize");
4640
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_finish() !== 1447) {
4641
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_finish");
4642
+ }
4643
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_push() !== 58012) {
4644
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_push");
4122
4645
  }
4123
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttts_synthesize_async() !== 54670) {
4124
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttts_synthesize_async");
4646
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_segment() !== 39967) {
4647
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_segment");
4125
4648
  }
4126
4649
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_samplerbuilder_dist() !== 23376) {
4127
4650
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_samplerbuilder_dist");
@@ -4168,7 +4691,7 @@ function uniffiEnsureInitialized() {
4168
4691
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_samplerconfig_to_json() !== 51798) {
4169
4692
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_samplerconfig_to_json");
4170
4693
  }
4171
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rustchat_new() !== 24505) {
4694
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rustchat_new() !== 2313) {
4172
4695
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rustchat_new");
4173
4696
  }
4174
4697
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rustcrossencoder_new() !== 9022) {
@@ -4177,8 +4700,11 @@ function uniffiEnsureInitialized() {
4177
4700
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rustencoder_new() !== 27902) {
4178
4701
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rustencoder_new");
4179
4702
  }
4180
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_ruststt_new() !== 44850) {
4181
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_ruststt_new");
4703
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rustspeechtotext_new() !== 9249) {
4704
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rustspeechtotext_new");
4705
+ }
4706
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rusttexttospeech_new() !== 55766) {
4707
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rusttexttospeech_new");
4182
4708
  }
4183
4709
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new() !== 9431) {
4184
4710
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new");
@@ -4186,8 +4712,8 @@ function uniffiEnsureInitialized() {
4186
4712
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new_async() !== 54521) {
4187
4713
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new_async");
4188
4714
  }
4189
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rusttts_new() !== 24110) {
4190
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rusttts_new");
4715
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rustvoiceactivitydetection_new() !== 47351) {
4716
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rustvoiceactivitydetection_new");
4191
4717
  }
4192
4718
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_samplerbuilder_new() !== 50214) {
4193
4719
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_samplerbuilder_new");
@@ -4213,6 +4739,7 @@ export default Object.freeze({
4213
4739
  FfiConverterTypeCachedModel,
4214
4740
  FfiConverterTypeChatStats,
4215
4741
  FfiConverterTypeMessage,
4742
+ FfiConverterTypeMtpConfig,
4216
4743
  FfiConverterTypeNobodyWhoError,
4217
4744
  FfiConverterTypePendingToolCall,
4218
4745
  FfiConverterTypePromptPart,
@@ -4220,14 +4747,16 @@ export default Object.freeze({
4220
4747
  FfiConverterTypeRustCrossEncoder,
4221
4748
  FfiConverterTypeRustEncoder,
4222
4749
  FfiConverterTypeRustModel,
4223
- FfiConverterTypeRustSTT,
4224
- FfiConverterTypeRustSTTStream,
4750
+ FfiConverterTypeRustSpeechToText,
4751
+ FfiConverterTypeRustSpeechToTextStream,
4752
+ FfiConverterTypeRustTextToSpeech,
4225
4753
  FfiConverterTypeRustTokenStream,
4226
4754
  FfiConverterTypeRustTool,
4227
- FfiConverterTypeRustTts,
4755
+ FfiConverterTypeRustVoiceActivityDetection,
4228
4756
  FfiConverterTypeSamplerBuilder,
4229
4757
  FfiConverterTypeSamplerConfig,
4230
4758
  FfiConverterTypeToolCall,
4231
4759
  FfiConverterTypeToolParameter,
4760
+ FfiConverterTypeVoiceActivityDetectionEvent,
4232
4761
  }
4233
4762
  });