react-native-nobodywho 2.5.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.
@@ -186,22 +186,90 @@ export async function loadModel(modelPath: string, useGpu: boolean, projectionMo
186
186
  }
187
187
  }
188
188
  /**
189
- * 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"`.
190
195
  */
191
- 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, precision: string | undefined, temperature: /*f32*/number | undefined, huggingfaceToken: string | undefined, device: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustTtsInterface> /*throws*/ {
196
+ export async function loadSpeechToText(source: string, language: string | undefined, quantization: string | undefined, asyncOpts_?: { signal: AbortSignal }): Promise<RustSpeechToTextInterface> /*throws*/ {
192
197
  const __stack = uniffiIsDebug ? new Error().stack : undefined;
193
198
  try {
194
199
  return await uniffiRustCallAsync(
195
200
  /*rustCaller:*/ uniffiCaller,
196
201
  /*rustFutureFunc:*/ () => {
197
- 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(precision),FfiConverterOptionalFloat32.lower(temperature),FfiConverterOptionalString.lower(huggingfaceToken),FfiConverterOptionalString.lower(device)
202
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_func_load_speech_to_text(FfiConverterString.lower(source),FfiConverterOptionalString.lower(language),FfiConverterOptionalString.lower(quantization)
198
203
  );
199
204
  },
200
205
  /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_u64,
201
206
  /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_u64,
202
207
  /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_u64,
203
208
  /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_u64,
204
- /*liftFunc:*/ FfiConverterTypeRustTts.lift.bind(FfiConverterTypeRustTts),
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.
258
+ */
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*/ {
260
+ const __stack = uniffiIsDebug ? new Error().stack : undefined;
261
+ try {
262
+ return await uniffiRustCallAsync(
263
+ /*rustCaller:*/ uniffiCaller,
264
+ /*rustFutureFunc:*/ () => {
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)
266
+ );
267
+ },
268
+ /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_u64,
269
+ /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_u64,
270
+ /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_u64,
271
+ /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_u64,
272
+ /*liftFunc:*/ FfiConverterTypeRustVoiceActivityDetection.lift.bind(FfiConverterTypeRustVoiceActivityDetection),
205
273
  /*liftString:*/ FfiConverterString.lift,
206
274
  /*asyncOpts:*/ asyncOpts_,
207
275
  /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
@@ -1450,6 +1518,50 @@ const FfiConverterTypePromptPart = (() => {
1450
1518
 
1451
1519
 
1452
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
+
1453
1565
  // FfiConverter for Map<string, boolean>
1454
1566
  const FfiConverterMapStringBool = new FfiConverterMap(FfiConverterString, FfiConverterBool);
1455
1567
 
@@ -2384,6 +2496,10 @@ export interface RustEncoderInterface {
2384
2496
  * Encode text into an embedding vector.
2385
2497
  */
2386
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>>>;
2387
2503
  }
2388
2504
 
2389
2505
 
@@ -2445,6 +2561,37 @@ async encode(text: string, asyncOpts_?: { signal: AbortSignal }): Promise<Array
2445
2561
  }
2446
2562
  }
2447
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
+
2448
2595
 
2449
2596
  /**
2450
2597
  * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy}
@@ -2627,35 +2774,35 @@ const FfiConverterTypeRustModel = new FfiConverterObject(uniffiTypeRustModelObj
2627
2774
 
2628
2775
 
2629
2776
  /**
2630
- * Speech-to-text handle. Wraps `nobodywho::stt::Stt`.
2631
- * 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`.
2632
2779
  */
2633
- export interface RustSttInterface {
2780
+ export interface RustSpeechToTextInterface {
2634
2781
 
2635
2782
  /**
2636
2783
  * Start transcribing an audio file (WAV / MP3).
2637
- * Returns a `RustSTTStream` to consume tokens as they are generated.
2784
+ * Returns a `RustSpeechToTextStream` to consume tokens as they are generated.
2638
2785
  */
2639
- transcribeFile(path: string) /*throws*/: RustSttStreamInterface;
2786
+ transcribeFile(path: string) /*throws*/: RustSpeechToTextStreamInterface;
2640
2787
  /**
2641
2788
  * Start transcribing raw i16 PCM samples (e.g. from a microphone stream).
2642
2789
  * `sample_rate` is the capture rate in Hz; the backend resamples to 16 kHz internally.
2643
2790
  */
2644
- transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number) /*throws*/: RustSttStreamInterface;
2791
+ transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number) /*throws*/: RustSpeechToTextStreamInterface;
2645
2792
  }
2646
2793
 
2647
2794
 
2648
2795
  /**
2649
- * Speech-to-text handle. Wraps `nobodywho::stt::Stt`.
2650
- * 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`.
2651
2798
  */
2652
- export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2799
+ export class RustSpeechToText extends UniffiAbstractObject implements RustSpeechToTextInterface {
2653
2800
 
2654
- readonly [uniffiTypeNameSymbol] = "RustStt";
2801
+ readonly [uniffiTypeNameSymbol] = "RustSpeechToText";
2655
2802
  readonly [destructorGuardSymbol]: UniffiGcObject;
2656
2803
  readonly [pointerLiteralSymbol]: UniffiHandle;
2657
2804
  /**
2658
- * 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`,
2659
2806
  * e.g. `"hf://onnx-community/whisper-base"`) or a local directory path.
2660
2807
  * `language` is an ISO 639-1 code (e.g. `"en"`); pass `None` to auto-detect.
2661
2808
  * `quantization` selects the ONNX precision variant to download and load:
@@ -2669,7 +2816,7 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2669
2816
  uniffiCaller.rustCallWithError(
2670
2817
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
2671
2818
  /*caller:*/ (callStatus) => {
2672
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_ruststt_new(
2819
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_rustspeechtotext_new(
2673
2820
  FfiConverterString.lower(source),
2674
2821
  FfiConverterOptionalString.lower(language),
2675
2822
  FfiConverterOptionalString.lower(quantization),
@@ -2678,7 +2825,7 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2678
2825
  /*liftString:*/ FfiConverterString.lift,
2679
2826
  );
2680
2827
  this[pointerLiteralSymbol] = pointer;
2681
- this[destructorGuardSymbol] = uniffiTypeRustSttObjectFactory.bless(pointer);
2828
+ this[destructorGuardSymbol] = uniffiTypeRustSpeechToTextObjectFactory.bless(pointer);
2682
2829
  }
2683
2830
 
2684
2831
 
@@ -2686,14 +2833,14 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2686
2833
 
2687
2834
  /**
2688
2835
  * Start transcribing an audio file (WAV / MP3).
2689
- * Returns a `RustSTTStream` to consume tokens as they are generated.
2836
+ * Returns a `RustSpeechToTextStream` to consume tokens as they are generated.
2690
2837
  */
2691
- transcribeFile(path: string): RustSttStreamInterface /*throws*/ {
2692
- return FfiConverterTypeRustSTTStream.lift(
2838
+ transcribeFile(path: string): RustSpeechToTextStreamInterface /*throws*/ {
2839
+ return FfiConverterTypeRustSpeechToTextStream.lift(
2693
2840
  uniffiCaller.rustCallWithError(
2694
2841
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
2695
2842
  /*caller:*/ (callStatus) => {
2696
- 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),
2697
2844
  FfiConverterString.lower(path),
2698
2845
  callStatus);
2699
2846
  },
@@ -2705,12 +2852,12 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2705
2852
  * Start transcribing raw i16 PCM samples (e.g. from a microphone stream).
2706
2853
  * `sample_rate` is the capture rate in Hz; the backend resamples to 16 kHz internally.
2707
2854
  */
2708
- transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number): RustSttStreamInterface /*throws*/ {
2709
- return FfiConverterTypeRustSTTStream.lift(
2855
+ transcribePcm(samples: Array</*i16*/number>, sampleRate: /*u32*/number): RustSpeechToTextStreamInterface /*throws*/ {
2856
+ return FfiConverterTypeRustSpeechToTextStream.lift(
2710
2857
  uniffiCaller.rustCallWithError(
2711
2858
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
2712
2859
  /*caller:*/ (callStatus) => {
2713
- 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),
2714
2861
  FfiConverterArrayInt16.lower(samples),
2715
2862
  FfiConverterUInt32.lower(sampleRate),
2716
2863
  callStatus);
@@ -2726,28 +2873,28 @@ export class RustStt extends UniffiAbstractObject implements RustSttInterface {
2726
2873
  uniffiDestroy(): void {
2727
2874
  const ptr = (this as any)[destructorGuardSymbol];
2728
2875
  if (ptr !== undefined) {
2729
- const pointer = uniffiTypeRustSttObjectFactory.pointer(this);
2730
- uniffiTypeRustSttObjectFactory.freePointer(pointer);
2731
- uniffiTypeRustSttObjectFactory.unbless(ptr);
2876
+ const pointer = uniffiTypeRustSpeechToTextObjectFactory.pointer(this);
2877
+ uniffiTypeRustSpeechToTextObjectFactory.freePointer(pointer);
2878
+ uniffiTypeRustSpeechToTextObjectFactory.unbless(ptr);
2732
2879
  delete (this as any)[destructorGuardSymbol];
2733
2880
  }
2734
2881
  }
2735
2882
 
2736
- static instanceOf(obj: any): obj is RustStt {
2737
- return uniffiTypeRustSttObjectFactory.isConcreteType(obj);
2883
+ static instanceOf(obj: any): obj is RustSpeechToText {
2884
+ return uniffiTypeRustSpeechToTextObjectFactory.isConcreteType(obj);
2738
2885
  }
2739
2886
 
2740
2887
 
2741
2888
  }
2742
2889
 
2743
- const uniffiTypeRustSttObjectFactory: UniffiObjectFactory<RustSttInterface> = (() => {
2890
+ const uniffiTypeRustSpeechToTextObjectFactory: UniffiObjectFactory<RustSpeechToTextInterface> = (() => {
2744
2891
 
2745
2892
  return {
2746
- create(pointer: UniffiHandle): RustSttInterface {
2747
- const instance = Object.create(RustStt.prototype);
2893
+ create(pointer: UniffiHandle): RustSpeechToTextInterface {
2894
+ const instance = Object.create(RustSpeechToText.prototype);
2748
2895
  instance[pointerLiteralSymbol] = pointer;
2749
2896
  instance[destructorGuardSymbol] = this.bless(pointer);
2750
- instance[uniffiTypeNameSymbol] = "RustStt";
2897
+ instance[uniffiTypeNameSymbol] = "RustSpeechToText";
2751
2898
  return instance;
2752
2899
  },
2753
2900
 
@@ -2755,7 +2902,7 @@ const uniffiTypeRustSttObjectFactory: UniffiObjectFactory<RustSttInterface> = ((
2755
2902
  bless(p: UniffiHandle): UniffiGcObject {
2756
2903
  return uniffiCaller.rustCall(
2757
2904
  /*caller:*/ (status) =>
2758
- 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),
2759
2906
  /*liftString:*/ FfiConverterString.lift
2760
2907
  );
2761
2908
  },
@@ -2764,40 +2911,40 @@ const uniffiTypeRustSttObjectFactory: UniffiObjectFactory<RustSttInterface> = ((
2764
2911
  ptr.markDestroyed();
2765
2912
  },
2766
2913
 
2767
- pointer(obj: RustSttInterface): UniffiHandle {
2914
+ pointer(obj: RustSpeechToTextInterface): UniffiHandle {
2768
2915
  if ((obj as any)[destructorGuardSymbol] === undefined) {
2769
2916
  throw new UniffiInternalError.UnexpectedNullPointer();
2770
2917
  }
2771
2918
  return (obj as any)[pointerLiteralSymbol];
2772
2919
  },
2773
2920
 
2774
- clonePointer(obj: RustSttInterface): UniffiHandle {
2921
+ clonePointer(obj: RustSpeechToTextInterface): UniffiHandle {
2775
2922
  const pointer = this.pointer(obj);
2776
2923
  return uniffiCaller.rustCall(
2777
- /*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),
2778
2925
  /*liftString:*/ FfiConverterString.lift
2779
2926
  );
2780
2927
  },
2781
2928
 
2782
2929
  freePointer(pointer: UniffiHandle): void {
2783
2930
  uniffiCaller.rustCall(
2784
- /*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),
2785
2932
  /*liftString:*/ FfiConverterString.lift
2786
2933
  );
2787
2934
  },
2788
2935
 
2789
- isConcreteType(obj: any): obj is RustSttInterface {
2790
- return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustStt";
2936
+ isConcreteType(obj: any): obj is RustSpeechToTextInterface {
2937
+ return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustSpeechToText";
2791
2938
  },
2792
2939
  }})();
2793
- // FfiConverter for RustSttInterface
2794
- const FfiConverterTypeRustSTT = new FfiConverterObject(uniffiTypeRustSttObjectFactory);
2940
+ // FfiConverter for RustSpeechToTextInterface
2941
+ const FfiConverterTypeRustSpeechToText = new FfiConverterObject(uniffiTypeRustSpeechToTextObjectFactory);
2795
2942
 
2796
2943
 
2797
2944
  /**
2798
- * A stream of transcript tokens from a Whisper STT run.
2945
+ * A stream of transcript tokens from a Whisper SpeechToText run.
2799
2946
  */
2800
- export interface RustSttStreamInterface {
2947
+ export interface RustSpeechToTextStreamInterface {
2801
2948
 
2802
2949
  /**
2803
2950
  * Wait for transcription to finish and return the full transcript.
@@ -2811,18 +2958,18 @@ export interface RustSttStreamInterface {
2811
2958
 
2812
2959
 
2813
2960
  /**
2814
- * A stream of transcript tokens from a Whisper STT run.
2961
+ * A stream of transcript tokens from a Whisper SpeechToText run.
2815
2962
  */
2816
- export class RustSttStream extends UniffiAbstractObject implements RustSttStreamInterface {
2963
+ export class RustSpeechToTextStream extends UniffiAbstractObject implements RustSpeechToTextStreamInterface {
2817
2964
 
2818
- readonly [uniffiTypeNameSymbol] = "RustSttStream";
2965
+ readonly [uniffiTypeNameSymbol] = "RustSpeechToTextStream";
2819
2966
  readonly [destructorGuardSymbol]: UniffiGcObject;
2820
2967
  readonly [pointerLiteralSymbol]: UniffiHandle;
2821
2968
  // No primary constructor declared for this class.
2822
2969
  private constructor(pointer: UniffiHandle) {
2823
2970
  super();
2824
2971
  this[pointerLiteralSymbol] = pointer;
2825
- this[destructorGuardSymbol] = uniffiTypeRustSttStreamObjectFactory.bless(pointer);
2972
+ this[destructorGuardSymbol] = uniffiTypeRustSpeechToTextStreamObjectFactory.bless(pointer);
2826
2973
  }
2827
2974
 
2828
2975
 
@@ -2837,8 +2984,8 @@ async completed(asyncOpts_?: { signal: AbortSignal }): Promise<string> /*throws
2837
2984
  return await uniffiRustCallAsync(
2838
2985
  /*rustCaller:*/ uniffiCaller,
2839
2986
  /*rustFutureFunc:*/ () => {
2840
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_ruststtstream_completed(
2841
- uniffiTypeRustSttStreamObjectFactory.clonePointer(this)
2987
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustspeechtotextstream_completed(
2988
+ uniffiTypeRustSpeechToTextStreamObjectFactory.clonePointer(this)
2842
2989
 
2843
2990
  );
2844
2991
  },
@@ -2868,8 +3015,8 @@ async nextToken(asyncOpts_?: { signal: AbortSignal }): Promise<string | undefin
2868
3015
  return await uniffiRustCallAsync(
2869
3016
  /*rustCaller:*/ uniffiCaller,
2870
3017
  /*rustFutureFunc:*/ () => {
2871
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_ruststtstream_next_token(
2872
- uniffiTypeRustSttStreamObjectFactory.clonePointer(this)
3018
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustspeechtotextstream_next_token(
3019
+ uniffiTypeRustSpeechToTextStreamObjectFactory.clonePointer(this)
2873
3020
 
2874
3021
  );
2875
3022
  },
@@ -2897,28 +3044,201 @@ async nextToken(asyncOpts_?: { signal: AbortSignal }): Promise<string | undefin
2897
3044
  uniffiDestroy(): void {
2898
3045
  const ptr = (this as any)[destructorGuardSymbol];
2899
3046
  if (ptr !== undefined) {
2900
- const pointer = uniffiTypeRustSttStreamObjectFactory.pointer(this);
2901
- uniffiTypeRustSttStreamObjectFactory.freePointer(pointer);
2902
- 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);
2903
3223
  delete (this as any)[destructorGuardSymbol];
2904
3224
  }
2905
3225
  }
2906
3226
 
2907
- static instanceOf(obj: any): obj is RustSttStream {
2908
- return uniffiTypeRustSttStreamObjectFactory.isConcreteType(obj);
3227
+ static instanceOf(obj: any): obj is RustTextToSpeech {
3228
+ return uniffiTypeRustTextToSpeechObjectFactory.isConcreteType(obj);
2909
3229
  }
2910
3230
 
2911
3231
 
2912
3232
  }
2913
3233
 
2914
- const uniffiTypeRustSttStreamObjectFactory: UniffiObjectFactory<RustSttStreamInterface> = (() => {
3234
+ const uniffiTypeRustTextToSpeechObjectFactory: UniffiObjectFactory<RustTextToSpeechInterface> = (() => {
2915
3235
 
2916
3236
  return {
2917
- create(pointer: UniffiHandle): RustSttStreamInterface {
2918
- const instance = Object.create(RustSttStream.prototype);
3237
+ create(pointer: UniffiHandle): RustTextToSpeechInterface {
3238
+ const instance = Object.create(RustTextToSpeech.prototype);
2919
3239
  instance[pointerLiteralSymbol] = pointer;
2920
3240
  instance[destructorGuardSymbol] = this.bless(pointer);
2921
- instance[uniffiTypeNameSymbol] = "RustSttStream";
3241
+ instance[uniffiTypeNameSymbol] = "RustTextToSpeech";
2922
3242
  return instance;
2923
3243
  },
2924
3244
 
@@ -2926,7 +3246,7 @@ const uniffiTypeRustSttStreamObjectFactory: UniffiObjectFactory<RustSttStreamInt
2926
3246
  bless(p: UniffiHandle): UniffiGcObject {
2927
3247
  return uniffiCaller.rustCall(
2928
3248
  /*caller:*/ (status) =>
2929
- 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),
2930
3250
  /*liftString:*/ FfiConverterString.lift
2931
3251
  );
2932
3252
  },
@@ -2935,34 +3255,34 @@ const uniffiTypeRustSttStreamObjectFactory: UniffiObjectFactory<RustSttStreamInt
2935
3255
  ptr.markDestroyed();
2936
3256
  },
2937
3257
 
2938
- pointer(obj: RustSttStreamInterface): UniffiHandle {
3258
+ pointer(obj: RustTextToSpeechInterface): UniffiHandle {
2939
3259
  if ((obj as any)[destructorGuardSymbol] === undefined) {
2940
3260
  throw new UniffiInternalError.UnexpectedNullPointer();
2941
3261
  }
2942
3262
  return (obj as any)[pointerLiteralSymbol];
2943
3263
  },
2944
3264
 
2945
- clonePointer(obj: RustSttStreamInterface): UniffiHandle {
3265
+ clonePointer(obj: RustTextToSpeechInterface): UniffiHandle {
2946
3266
  const pointer = this.pointer(obj);
2947
3267
  return uniffiCaller.rustCall(
2948
- /*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),
2949
3269
  /*liftString:*/ FfiConverterString.lift
2950
3270
  );
2951
3271
  },
2952
3272
 
2953
3273
  freePointer(pointer: UniffiHandle): void {
2954
3274
  uniffiCaller.rustCall(
2955
- /*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),
2956
3276
  /*liftString:*/ FfiConverterString.lift
2957
3277
  );
2958
3278
  },
2959
3279
 
2960
- isConcreteType(obj: any): obj is RustSttStreamInterface {
2961
- return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustSttStream";
3280
+ isConcreteType(obj: any): obj is RustTextToSpeechInterface {
3281
+ return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustTextToSpeech";
2962
3282
  },
2963
3283
  }})();
2964
- // FfiConverter for RustSttStreamInterface
2965
- const FfiConverterTypeRustSTTStream = new FfiConverterObject(uniffiTypeRustSttStreamObjectFactory);
3284
+ // FfiConverter for RustTextToSpeechInterface
3285
+ const FfiConverterTypeRustTextToSpeech = new FfiConverterObject(uniffiTypeRustTextToSpeechObjectFactory);
2966
3286
 
2967
3287
 
2968
3288
  export interface RustTokenStreamInterface {
@@ -3328,67 +3648,115 @@ const uniffiTypeRustToolObjectFactory: UniffiObjectFactory<RustToolInterface> =
3328
3648
  const FfiConverterTypeRustTool = new FfiConverterObject(uniffiTypeRustToolObjectFactory);
3329
3649
 
3330
3650
 
3331
- 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 {
3332
3657
 
3333
3658
  /**
3334
- * 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.
3335
3663
  */
3336
- synthesize(text: string) /*throws*/: ArrayBuffer;
3664
+ finish() : Array</*i16*/number>;
3337
3665
  /**
3338
- * 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.
3339
3671
  */
3340
- 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>>;
3341
3680
  }
3342
3681
 
3343
3682
 
3344
- 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 {
3345
3689
 
3346
- readonly [uniffiTypeNameSymbol] = "RustTts";
3690
+ readonly [uniffiTypeNameSymbol] = "RustVoiceActivityDetection";
3347
3691
  readonly [destructorGuardSymbol]: UniffiGcObject;
3348
3692
  readonly [pointerLiteralSymbol]: UniffiHandle;
3349
3693
  /**
3350
- * 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.
3351
3703
  */
3352
- 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*/ {
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*/ {
3353
3705
  super();
3354
3706
  const pointer =
3355
3707
 
3356
3708
  uniffiCaller.rustCallWithError(
3357
3709
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
3358
3710
  /*caller:*/ (callStatus) => {
3359
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_constructor_rusttts_new(
3360
- FfiConverterString.lower(source),
3361
- FfiConverterOptionalString.lower(architecture),
3362
- FfiConverterOptionalString.lower(voice),
3363
- FfiConverterOptionalString.lower(language),
3364
- FfiConverterOptionalFloat32.lower(speed),
3365
- FfiConverterOptionalUInt32.lower(steps),
3366
- FfiConverterOptionalFloat32.lower(silenceDuration),
3367
- FfiConverterOptionalString.lower(precision),
3368
- FfiConverterOptionalFloat32.lower(temperature),
3369
- FfiConverterOptionalString.lower(huggingfaceToken),
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),
3370
3718
  FfiConverterOptionalString.lower(device),
3371
3719
  callStatus);
3372
3720
  },
3373
3721
  /*liftString:*/ FfiConverterString.lift,
3374
3722
  );
3375
3723
  this[pointerLiteralSymbol] = pointer;
3376
- this[destructorGuardSymbol] = uniffiTypeRustTtsObjectFactory.bless(pointer);
3724
+ this[destructorGuardSymbol] = uniffiTypeRustVoiceActivityDetectionObjectFactory.bless(pointer);
3377
3725
  }
3378
3726
 
3379
3727
 
3380
3728
 
3381
3729
 
3382
3730
  /**
3383
- * 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.
3384
3735
  */
3385
- synthesize(text: string): ArrayBuffer /*throws*/ {
3386
- 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(
3387
3755
  uniffiCaller.rustCallWithError(
3388
3756
  /*liftError:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError),
3389
3757
  /*caller:*/ (callStatus) => {
3390
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rusttts_synthesize(uniffiTypeRustTtsObjectFactory.clonePointer(this),
3391
- FfiConverterString.lower(text),
3758
+ return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rustvoiceactivitydetection_push(uniffiTypeRustVoiceActivityDetectionObjectFactory.clonePointer(this),
3759
+ FfiConverterArrayInt16.lower(chunk),
3392
3760
  callStatus);
3393
3761
  },
3394
3762
  /*liftString:*/ FfiConverterString.lift,
@@ -3396,34 +3764,22 @@ export class RustTts extends UniffiAbstractObject implements RustTtsInterface {
3396
3764
  }
3397
3765
 
3398
3766
  /**
3399
- * 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.
3400
3771
  */
3401
- async synthesizeAsync(text: string, asyncOpts_?: { signal: AbortSignal }): Promise<ArrayBuffer> /*throws*/ {
3402
- const __stack = uniffiIsDebug ? new Error().stack : undefined;
3403
- try {
3404
- return await uniffiRustCallAsync(
3405
- /*rustCaller:*/ uniffiCaller,
3406
- /*rustFutureFunc:*/ () => {
3407
- return nativeModule().ubrn_uniffi_nobodywho_uniffi_fn_method_rusttts_synthesize_async(
3408
- uniffiTypeRustTtsObjectFactory.clonePointer(this),
3409
- FfiConverterString.lower(text)
3410
- );
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);
3411
3780
  },
3412
- /*pollFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_poll_rust_buffer,
3413
- /*cancelFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_cancel_rust_buffer,
3414
- /*completeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_complete_rust_buffer,
3415
- /*freeFunc:*/ nativeModule().ubrn_ffi_nobodywho_uniffi_rust_future_free_rust_buffer,
3416
- /*liftFunc:*/ FfiConverterArrayBuffer.lift.bind(FfiConverterArrayBuffer),
3417
3781
  /*liftString:*/ FfiConverterString.lift,
3418
- /*asyncOpts:*/ asyncOpts_,
3419
- /*errorHandler:*/ FfiConverterTypeNobodyWhoError.lift.bind(FfiConverterTypeNobodyWhoError)
3420
- );
3421
- } catch (__error: any) {
3422
- if (uniffiIsDebug && __error instanceof Error) {
3423
- __error.stack = __stack;
3424
- }
3425
- throw __error;
3426
- }
3782
+ ));
3427
3783
  }
3428
3784
 
3429
3785
 
@@ -3433,28 +3789,28 @@ async synthesizeAsync(text: string, asyncOpts_?: { signal: AbortSignal }): Prom
3433
3789
  uniffiDestroy(): void {
3434
3790
  const ptr = (this as any)[destructorGuardSymbol];
3435
3791
  if (ptr !== undefined) {
3436
- const pointer = uniffiTypeRustTtsObjectFactory.pointer(this);
3437
- uniffiTypeRustTtsObjectFactory.freePointer(pointer);
3438
- uniffiTypeRustTtsObjectFactory.unbless(ptr);
3792
+ const pointer = uniffiTypeRustVoiceActivityDetectionObjectFactory.pointer(this);
3793
+ uniffiTypeRustVoiceActivityDetectionObjectFactory.freePointer(pointer);
3794
+ uniffiTypeRustVoiceActivityDetectionObjectFactory.unbless(ptr);
3439
3795
  delete (this as any)[destructorGuardSymbol];
3440
3796
  }
3441
3797
  }
3442
3798
 
3443
- static instanceOf(obj: any): obj is RustTts {
3444
- return uniffiTypeRustTtsObjectFactory.isConcreteType(obj);
3799
+ static instanceOf(obj: any): obj is RustVoiceActivityDetection {
3800
+ return uniffiTypeRustVoiceActivityDetectionObjectFactory.isConcreteType(obj);
3445
3801
  }
3446
3802
 
3447
3803
 
3448
3804
  }
3449
3805
 
3450
- const uniffiTypeRustTtsObjectFactory: UniffiObjectFactory<RustTtsInterface> = (() => {
3806
+ const uniffiTypeRustVoiceActivityDetectionObjectFactory: UniffiObjectFactory<RustVoiceActivityDetectionInterface> = (() => {
3451
3807
 
3452
3808
  return {
3453
- create(pointer: UniffiHandle): RustTtsInterface {
3454
- const instance = Object.create(RustTts.prototype);
3809
+ create(pointer: UniffiHandle): RustVoiceActivityDetectionInterface {
3810
+ const instance = Object.create(RustVoiceActivityDetection.prototype);
3455
3811
  instance[pointerLiteralSymbol] = pointer;
3456
3812
  instance[destructorGuardSymbol] = this.bless(pointer);
3457
- instance[uniffiTypeNameSymbol] = "RustTts";
3813
+ instance[uniffiTypeNameSymbol] = "RustVoiceActivityDetection";
3458
3814
  return instance;
3459
3815
  },
3460
3816
 
@@ -3462,7 +3818,7 @@ const uniffiTypeRustTtsObjectFactory: UniffiObjectFactory<RustTtsInterface> = ((
3462
3818
  bless(p: UniffiHandle): UniffiGcObject {
3463
3819
  return uniffiCaller.rustCall(
3464
3820
  /*caller:*/ (status) =>
3465
- 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),
3466
3822
  /*liftString:*/ FfiConverterString.lift
3467
3823
  );
3468
3824
  },
@@ -3471,34 +3827,34 @@ const uniffiTypeRustTtsObjectFactory: UniffiObjectFactory<RustTtsInterface> = ((
3471
3827
  ptr.markDestroyed();
3472
3828
  },
3473
3829
 
3474
- pointer(obj: RustTtsInterface): UniffiHandle {
3830
+ pointer(obj: RustVoiceActivityDetectionInterface): UniffiHandle {
3475
3831
  if ((obj as any)[destructorGuardSymbol] === undefined) {
3476
3832
  throw new UniffiInternalError.UnexpectedNullPointer();
3477
3833
  }
3478
3834
  return (obj as any)[pointerLiteralSymbol];
3479
3835
  },
3480
3836
 
3481
- clonePointer(obj: RustTtsInterface): UniffiHandle {
3837
+ clonePointer(obj: RustVoiceActivityDetectionInterface): UniffiHandle {
3482
3838
  const pointer = this.pointer(obj);
3483
3839
  return uniffiCaller.rustCall(
3484
- /*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),
3485
3841
  /*liftString:*/ FfiConverterString.lift
3486
3842
  );
3487
3843
  },
3488
3844
 
3489
3845
  freePointer(pointer: UniffiHandle): void {
3490
3846
  uniffiCaller.rustCall(
3491
- /*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),
3492
3848
  /*liftString:*/ FfiConverterString.lift
3493
3849
  );
3494
3850
  },
3495
3851
 
3496
- isConcreteType(obj: any): obj is RustTtsInterface {
3497
- return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustTts";
3852
+ isConcreteType(obj: any): obj is RustVoiceActivityDetectionInterface {
3853
+ return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === "RustVoiceActivityDetection";
3498
3854
  },
3499
3855
  }})();
3500
- // FfiConverter for RustTtsInterface
3501
- const FfiConverterTypeRustTts = new FfiConverterObject(uniffiTypeRustTtsObjectFactory);
3856
+ // FfiConverter for RustVoiceActivityDetectionInterface
3857
+ const FfiConverterTypeRustVoiceActivityDetection = new FfiConverterObject(uniffiTypeRustVoiceActivityDetectionObjectFactory);
3502
3858
 
3503
3859
 
3504
3860
  export interface SamplerBuilderInterface {
@@ -4093,6 +4449,14 @@ const FfiConverterArrayTypeRustTool = new FfiConverterArray(FfiConverterTypeRust
4093
4449
  const FfiConverterArrayOptionalInt32 = new FfiConverterArray(FfiConverterOptionalInt32);
4094
4450
 
4095
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
+
4096
4460
  // FfiConverter for Array<RustToolInterface> | undefined
4097
4461
  const FfiConverterOptionalArrayTypeRustTool = new FfiConverterOptional(FfiConverterArrayTypeRustTool);
4098
4462
 
@@ -4126,8 +4490,14 @@ function uniffiEnsureInitialized() {
4126
4490
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_model() !== 22964) {
4127
4491
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_load_model");
4128
4492
  }
4129
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_load_tts() !== 26587) {
4130
- 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");
4131
4501
  }
4132
4502
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_func_sampler_preset_constrain_with_grammar() !== 13698) {
4133
4503
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_func_sampler_preset_constrain_with_grammar");
@@ -4228,20 +4598,29 @@ function uniffiEnsureInitialized() {
4228
4598
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustencoder_encode() !== 52601) {
4229
4599
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustencoder_encode");
4230
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
+ }
4231
4604
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustmodel_max_ctx() !== 52004) {
4232
4605
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustmodel_max_ctx");
4233
4606
  }
4234
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststt_transcribe_file() !== 43975) {
4235
- 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");
4612
+ }
4613
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustspeechtotextstream_completed() !== 15944) {
4614
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustspeechtotextstream_completed");
4236
4615
  }
4237
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststt_transcribe_pcm() !== 61166) {
4238
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_ruststt_transcribe_pcm");
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");
4239
4618
  }
4240
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststtstream_completed() !== 22443) {
4241
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_ruststtstream_completed");
4619
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttexttospeech_synthesize() !== 61700) {
4620
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttexttospeech_synthesize");
4242
4621
  }
4243
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_ruststtstream_next_token() !== 38526) {
4244
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_ruststtstream_next_token");
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");
4245
4624
  }
4246
4625
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttokenstream_completed() !== 26060) {
4247
4626
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttokenstream_completed");
@@ -4258,11 +4637,14 @@ function uniffiEnsureInitialized() {
4258
4637
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttool_resolve_pending_call() !== 10096) {
4259
4638
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttool_resolve_pending_call");
4260
4639
  }
4261
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttts_synthesize() !== 56024) {
4262
- 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");
4263
4642
  }
4264
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rusttts_synthesize_async() !== 54670) {
4265
- throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rusttts_synthesize_async");
4643
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_push() !== 58012) {
4644
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_push");
4645
+ }
4646
+ if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_segment() !== 39967) {
4647
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_rustvoiceactivitydetection_segment");
4266
4648
  }
4267
4649
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_method_samplerbuilder_dist() !== 23376) {
4268
4650
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_method_samplerbuilder_dist");
@@ -4318,8 +4700,11 @@ function uniffiEnsureInitialized() {
4318
4700
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rustencoder_new() !== 27902) {
4319
4701
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rustencoder_new");
4320
4702
  }
4321
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_ruststt_new() !== 44850) {
4322
- 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");
4323
4708
  }
4324
4709
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new() !== 9431) {
4325
4710
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new");
@@ -4327,8 +4712,8 @@ function uniffiEnsureInitialized() {
4327
4712
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new_async() !== 54521) {
4328
4713
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_rusttool_new_async");
4329
4714
  }
4330
- if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_rusttts_new() !== 34899) {
4331
- 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");
4332
4717
  }
4333
4718
  if (nativeModule().ubrn_uniffi_nobodywho_uniffi_checksum_constructor_samplerbuilder_new() !== 50214) {
4334
4719
  throw new UniffiInternalError.ApiChecksumMismatch("uniffi_nobodywho_uniffi_checksum_constructor_samplerbuilder_new");
@@ -4362,14 +4747,16 @@ export default Object.freeze({
4362
4747
  FfiConverterTypeRustCrossEncoder,
4363
4748
  FfiConverterTypeRustEncoder,
4364
4749
  FfiConverterTypeRustModel,
4365
- FfiConverterTypeRustSTT,
4366
- FfiConverterTypeRustSTTStream,
4750
+ FfiConverterTypeRustSpeechToText,
4751
+ FfiConverterTypeRustSpeechToTextStream,
4752
+ FfiConverterTypeRustTextToSpeech,
4367
4753
  FfiConverterTypeRustTokenStream,
4368
4754
  FfiConverterTypeRustTool,
4369
- FfiConverterTypeRustTts,
4755
+ FfiConverterTypeRustVoiceActivityDetection,
4370
4756
  FfiConverterTypeSamplerBuilder,
4371
4757
  FfiConverterTypeSamplerConfig,
4372
4758
  FfiConverterTypeToolCall,
4373
4759
  FfiConverterTypeToolParameter,
4760
+ FfiConverterTypeVoiceActivityDetectionEvent,
4374
4761
  }
4375
4762
  });