@@ -58,45 +58,6 @@ abstract class NativeFunctions {
5858 Int32 Function (RacHandle ),
5959 int Function (RacHandle )> ('rac_llm_component_cancel' );
6060
61- static final int Function (
62- RacHandle ,
63- Pointer <Utf8 >,
64- Pointer <RacLlmOptionsStruct >,
65- Pointer <RacLlmResultStruct >,
66- ) llmGenerate = _lib.lookupFunction<
67- Int32 Function (RacHandle , Pointer <Utf8 >, Pointer <RacLlmOptionsStruct >,
68- Pointer <RacLlmResultStruct >),
69- int Function (RacHandle , Pointer <Utf8 >, Pointer <RacLlmOptionsStruct >,
70- Pointer <RacLlmResultStruct >)> ('rac_llm_component_generate' );
71-
72- static final int Function (
73- RacHandle ,
74- Pointer <Utf8 >,
75- Pointer <RacLlmOptionsStruct >,
76- Pointer <NativeFunction <Int32 Function (Pointer <Utf8 >, Pointer <Void >)>>,
77- Pointer <NativeFunction <Void Function (Pointer <RacLlmResultStruct >, Pointer <Void >)>>,
78- Pointer <NativeFunction <Void Function (Int32 , Pointer <Utf8 >, Pointer <Void >)>>,
79- Pointer <Void >,
80- ) llmGenerateStream = _lib.lookupFunction<
81- Int32 Function (
82- RacHandle ,
83- Pointer <Utf8 >,
84- Pointer <RacLlmOptionsStruct >,
85- Pointer <NativeFunction <Int32 Function (Pointer <Utf8 >, Pointer <Void >)>>,
86- Pointer <NativeFunction <Void Function (Pointer <RacLlmResultStruct >, Pointer <Void >)>>,
87- Pointer <NativeFunction <Void Function (Int32 , Pointer <Utf8 >, Pointer <Void >)>>,
88- Pointer <Void >,
89- ),
90- int Function (
91- RacHandle ,
92- Pointer <Utf8 >,
93- Pointer <RacLlmOptionsStruct >,
94- Pointer <NativeFunction <Int32 Function (Pointer <Utf8 >, Pointer <Void >)>>,
95- Pointer <NativeFunction <Void Function (Pointer <RacLlmResultStruct >, Pointer <Void >)>>,
96- Pointer <NativeFunction <Void Function (Int32 , Pointer <Utf8 >, Pointer <Void >)>>,
97- Pointer <Void >,
98- )> ('rac_llm_component_generate_stream' );
99-
10061 static final void Function (RacHandle ) llmDestroy =
10162 _lib.lookupFunction<
10263 Void Function (RacHandle ),
@@ -134,28 +95,6 @@ abstract class NativeFunctions {
13495 Int32 Function (RacHandle ),
13596 int Function (RacHandle )> ('rac_stt_component_cleanup' );
13697
137- static final int Function (
138- RacHandle ,
139- Pointer <Void >,
140- int ,
141- Pointer <RacSttOptionsStruct >,
142- Pointer <RacSttResultStruct >,
143- ) sttTranscribe = _lib.lookupFunction<
144- Int32 Function (
145- RacHandle ,
146- Pointer <Void >,
147- IntPtr ,
148- Pointer <RacSttOptionsStruct >,
149- Pointer <RacSttResultStruct >,
150- ),
151- int Function (
152- RacHandle ,
153- Pointer <Void >,
154- int ,
155- Pointer <RacSttOptionsStruct >,
156- Pointer <RacSttResultStruct >,
157- )> ('rac_stt_component_transcribe' );
158-
15998 static final void Function (Pointer <RacSttResultStruct >) sttResultFree =
16099 _lib.lookupFunction< Void Function (Pointer <RacSttResultStruct >),
161100 void Function (Pointer <RacSttResultStruct >)> ('rac_stt_result_free' );
@@ -197,25 +136,6 @@ abstract class NativeFunctions {
197136 Int32 Function (RacHandle ),
198137 int Function (RacHandle )> ('rac_tts_component_stop' );
199138
200- static final int Function (
201- RacHandle ,
202- Pointer <Utf8 >,
203- Pointer <RacTtsOptionsStruct >,
204- Pointer <RacTtsResultStruct >,
205- ) ttsSynthesize = _lib.lookupFunction<
206- Int32 Function (
207- RacHandle ,
208- Pointer <Utf8 >,
209- Pointer <RacTtsOptionsStruct >,
210- Pointer <RacTtsResultStruct >,
211- ),
212- int Function (
213- RacHandle ,
214- Pointer <Utf8 >,
215- Pointer <RacTtsOptionsStruct >,
216- Pointer <RacTtsResultStruct >,
217- )> ('rac_tts_component_synthesize' );
218-
219139 static final void Function (RacHandle ) ttsDestroy =
220140 _lib.lookupFunction<
221141 Void Function (RacHandle ),
@@ -357,17 +277,6 @@ abstract class NativeFunctions {
357277 Int32 Function (RacHandle ),
358278 int Function (RacHandle )> ('rac_voice_agent_initialize_with_loaded_models' );
359279
360- static final int Function (RacHandle , Pointer <Void >, int , Pointer <Void >)
361- voiceAgentProcessVoiceTurn =
362- _lib.lookupFunction<
363- Int32 Function (RacHandle , Pointer <Void >, IntPtr , Pointer <Void >),
364- int Function (
365- RacHandle , Pointer <Void >, int , Pointer <Void >)> ('rac_voice_agent_process_voice_turn' );
366-
367- static final void Function (Pointer <Void >) voiceAgentResultFree =
368- _lib.lookupFunction< Void Function (Pointer <Void >),
369- void Function (Pointer <Void >)> ('rac_voice_agent_result_free' );
370-
371280 static final int Function (RacHandle , Pointer <Void >, int ,
372281 Pointer <Pointer <Utf8 >>) voiceAgentTranscribe =
373282 _lib.lookupFunction<
@@ -404,117 +313,3 @@ abstract class NativeFunctions {
404313 _lib.lookupFunction< Void Function (Pointer <Void >),
405314 void Function (Pointer <Void >)> ('rac_free' );
406315}
407-
408- // =============================================================================
409- // FFI Structs
410- // =============================================================================
411- //
412- // These are the native struct layouts used by a subset of component functions.
413- // They are defined here (instead of `ffi_types.dart`) so that `NativeFunctions`
414- // exposes correctly typed pointers without requiring other library imports.
415-
416- /// FFI struct for STT options (matches `rac_stt_options_t` ).
417- final class RacSttOptionsStruct extends Struct {
418- /// Language code (e.g., "en")
419- external Pointer <Utf8 > language;
420-
421- /// Whether to auto-detect language
422- @Int 32()
423- external int detectLanguage;
424-
425- /// Whether to add punctuation
426- @Int 32()
427- external int enablePunctuation;
428-
429- /// Whether to enable speaker diarization
430- @Int 32()
431- external int enableDiarization;
432-
433- /// Maximum number of speakers for diarization
434- @Int 32()
435- external int maxSpeakers;
436-
437- /// Whether to include word timestamps
438- @Int 32()
439- external int enableTimestamps;
440-
441- /// Audio format of input data (`rac_audio_format_enum_t` )
442- @Int 32()
443- external int audioFormat;
444-
445- /// Sample rate of input audio in Hz
446- @Int 32()
447- external int sampleRate;
448- }
449-
450- /// FFI struct for STT result (matches `rac_stt_result_t` ).
451- final class RacSttResultStruct extends Struct {
452- external Pointer <Utf8 > text;
453-
454- @Double ()
455- external double confidence;
456-
457- @Int 32()
458- external int durationMs;
459-
460- external Pointer <Utf8 > language;
461- }
462-
463- /// FFI struct for TTS options (matches `rac_tts_options_t` ).
464- final class RacTtsOptionsStruct extends Struct {
465- /// Voice to use for synthesis (can be NULL for default)
466- external Pointer <Utf8 > voice;
467-
468- /// Language for synthesis (BCP-47 format, e.g., "en-US")
469- external Pointer <Utf8 > language;
470-
471- /// Speech rate (0.0 to 2.0, 1.0 is normal)
472- @Float ()
473- external double rate;
474-
475- /// Speech pitch (0.0 to 2.0, 1.0 is normal)
476- @Float ()
477- external double pitch;
478-
479- /// Speech volume (0.0 to 1.0)
480- @Float ()
481- external double volume;
482-
483- /// Audio format for output (`rac_audio_format_enum_t` )
484- @Int 32()
485- external int audioFormat;
486-
487- /// Sample rate for output audio in Hz
488- @Int 32()
489- external int sampleRate;
490-
491- /// Whether to use SSML markup (`rac_bool_t` )
492- @Int 32()
493- external int useSsml;
494- }
495-
496- /// FFI struct for TTS result (matches `rac_tts_result_t` ).
497- final class RacTtsResultStruct extends Struct {
498- /// Audio data (PCM float samples)
499- external Pointer <Void > audioData;
500-
501- /// Size of audio data in bytes (size_t)
502- @IntPtr ()
503- external int audioSize;
504-
505- /// Audio format (`rac_audio_format_enum_t` )
506- @Int 32()
507- external int audioFormat;
508-
509- /// Sample rate in Hz
510- @Int 32()
511- external int sampleRate;
512-
513- /// Duration in milliseconds
514- @Int 64()
515- external int durationMs;
516-
517- /// Processing time in milliseconds
518- @Int 64()
519- external int processingTimeMs;
520- }
0 commit comments