@gjsify/sherpa-native 0.0.0-stage → 0.64.16

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.
@@ -0,0 +1,1159 @@
1
+ // oxlint-disable typescript/no-explicit-any -- generated ts-for-gir .d.ts (see file header). Constructor/_init rest-args and GObject signal-handler (...args: any[]) => any patterns come from the ts-for-gir template; fixes belong upstream in https://github.com/gjsify/ts-for-gir, not in this generated file
2
+ /**
3
+ * Type Definitions for Gjs (https://gjs.guide/)
4
+ *
5
+ * These type definitions are automatically generated, do not edit them by hand.
6
+ * If you found a bug fix it in `ts-for-gir` or create a bug report on https://github.com/gjsify/ts-for-gir
7
+ *
8
+ * The based EJS template file is used for the generated .d.ts file of each GIR module like Gtk-4.0, GObject-2.0, ...
9
+ */
10
+
11
+ declare module 'gi://GjsifySherpa?version=1.0' {
12
+ // Module dependencies
13
+ import type GObject from '@girs/gobject-2.0';
14
+ import type GLib from '@girs/glib-2.0';
15
+
16
+ export namespace GjsifySherpa {
17
+ /**
18
+ * GjsifySherpa-1.0
19
+ */
20
+
21
+ /**
22
+ * @gir-type Struct
23
+ */
24
+ class SherpaError extends GLib.Error {
25
+ static $gtype: GObject.GType<GLib.Error>;
26
+
27
+ // Static fields
28
+ static MODEL_MISSING: number;
29
+
30
+ static OPEN_FAILED: number;
31
+
32
+ static NOT_OPEN: number;
33
+
34
+ // Constructors
35
+ constructor(options: { message: string; code: number });
36
+ }
37
+
38
+ function version(): string;
39
+
40
+ function onnxruntime_version(): string;
41
+
42
+ /**
43
+ * @param path
44
+ */
45
+ function file_exists(path: string): boolean;
46
+
47
+ namespace Vad {
48
+ // Signal signatures
49
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
50
+ 'notify::model': (pspec: GObject.ParamSpec) => void;
51
+ 'notify::threshold': (pspec: GObject.ParamSpec) => void;
52
+ 'notify::min-silence-duration': (pspec: GObject.ParamSpec) => void;
53
+ 'notify::min-speech-duration': (pspec: GObject.ParamSpec) => void;
54
+ 'notify::max-speech-duration': (pspec: GObject.ParamSpec) => void;
55
+ 'notify::window-size': (pspec: GObject.ParamSpec) => void;
56
+ 'notify::sample-rate': (pspec: GObject.ParamSpec) => void;
57
+ 'notify::num-threads': (pspec: GObject.ParamSpec) => void;
58
+ 'notify::buffer-size-in-seconds': (pspec: GObject.ParamSpec) => void;
59
+ 'notify::enable-debug': (pspec: GObject.ParamSpec) => void;
60
+ 'notify::is-open': (pspec: GObject.ParamSpec) => void;
61
+ }
62
+
63
+ // Constructor properties interface
64
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
65
+ model: string;
66
+ threshold: number;
67
+ min_silence_duration: number;
68
+ minSilenceDuration: number;
69
+ min_speech_duration: number;
70
+ minSpeechDuration: number;
71
+ max_speech_duration: number;
72
+ maxSpeechDuration: number;
73
+ window_size: number;
74
+ windowSize: number;
75
+ sample_rate: number;
76
+ sampleRate: number;
77
+ num_threads: number;
78
+ numThreads: number;
79
+ buffer_size_in_seconds: number;
80
+ bufferSizeInSeconds: number;
81
+ enable_debug: boolean;
82
+ enableDebug: boolean;
83
+ is_open: boolean;
84
+ isOpen: boolean;
85
+ }
86
+ }
87
+
88
+ /**
89
+ * @gir-type Class
90
+ */
91
+ class Vad extends GObject.Object {
92
+ static $gtype: GObject.GType<Vad>;
93
+
94
+ // Properties
95
+ /**
96
+ * @construct-only
97
+ */
98
+ get model(): string;
99
+
100
+ get threshold(): number;
101
+ set threshold(val: number);
102
+
103
+ get min_silence_duration(): number;
104
+ set min_silence_duration(val: number);
105
+
106
+ get minSilenceDuration(): number;
107
+ set minSilenceDuration(val: number);
108
+
109
+ get min_speech_duration(): number;
110
+ set min_speech_duration(val: number);
111
+
112
+ get minSpeechDuration(): number;
113
+ set minSpeechDuration(val: number);
114
+
115
+ get max_speech_duration(): number;
116
+ set max_speech_duration(val: number);
117
+
118
+ get maxSpeechDuration(): number;
119
+ set maxSpeechDuration(val: number);
120
+
121
+ get window_size(): number;
122
+ set window_size(val: number);
123
+
124
+ get windowSize(): number;
125
+ set windowSize(val: number);
126
+
127
+ get sample_rate(): number;
128
+ set sample_rate(val: number);
129
+
130
+ get sampleRate(): number;
131
+ set sampleRate(val: number);
132
+
133
+ get num_threads(): number;
134
+ set num_threads(val: number);
135
+
136
+ get numThreads(): number;
137
+ set numThreads(val: number);
138
+
139
+ get buffer_size_in_seconds(): number;
140
+ set buffer_size_in_seconds(val: number);
141
+
142
+ get bufferSizeInSeconds(): number;
143
+ set bufferSizeInSeconds(val: number);
144
+
145
+ get enable_debug(): boolean;
146
+ set enable_debug(val: boolean);
147
+
148
+ get enableDebug(): boolean;
149
+ set enableDebug(val: boolean);
150
+
151
+ /**
152
+ * @read-only
153
+ */
154
+ get is_open(): boolean;
155
+
156
+ /**
157
+ * @read-only
158
+ */
159
+ get isOpen(): boolean;
160
+
161
+ /**
162
+ * Compile-time signal type information.
163
+ *
164
+ * This instance property is generated only for TypeScript type checking.
165
+ * It is not defined at runtime and should not be accessed in JS code.
166
+ * @internal
167
+ */
168
+ $signals: Vad.SignalSignatures;
169
+
170
+ // Constructors
171
+ constructor(properties?: Partial<Vad.ConstructorProps>, ...args: any[]);
172
+
173
+ _init(...args: any[]): void;
174
+
175
+ static ['new'](model: string): Vad;
176
+
177
+ // Signals
178
+ /** @signal */
179
+ connect<K extends keyof Vad.SignalSignatures>(
180
+ signal: K,
181
+ callback: GObject.SignalCallback<this, Vad.SignalSignatures[K]>,
182
+ ): number;
183
+ connect(signal: string, callback: (...args: any[]) => any): number;
184
+
185
+ /** @signal */
186
+ connect_after<K extends keyof Vad.SignalSignatures>(
187
+ signal: K,
188
+ callback: GObject.SignalCallback<this, Vad.SignalSignatures[K]>,
189
+ ): number;
190
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
191
+
192
+ /** @signal */
193
+ emit<K extends keyof Vad.SignalSignatures>(
194
+ signal: K,
195
+ ...args: GObject.GjsParameters<Vad.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
196
+ ): void;
197
+ emit(signal: string, ...args: any[]): void;
198
+
199
+ // Methods
200
+ open(): void;
201
+
202
+ close(): void;
203
+
204
+ /**
205
+ * @param samples
206
+ */
207
+ accept(samples: number[]): void;
208
+
209
+ is_speech(): boolean;
210
+
211
+ has_segment(): boolean;
212
+
213
+ flush(): void;
214
+
215
+ clear(): void;
216
+
217
+ reset(): void;
218
+
219
+ next_segment(): [boolean, number[], number];
220
+
221
+ get_model(): string;
222
+
223
+ get_threshold(): number;
224
+
225
+ /**
226
+ * @param value
227
+ */
228
+ set_threshold(value: number): void;
229
+
230
+ get_min_silence_duration(): number;
231
+
232
+ /**
233
+ * @param value
234
+ */
235
+ set_min_silence_duration(value: number): void;
236
+
237
+ get_min_speech_duration(): number;
238
+
239
+ /**
240
+ * @param value
241
+ */
242
+ set_min_speech_duration(value: number): void;
243
+
244
+ get_max_speech_duration(): number;
245
+
246
+ /**
247
+ * @param value
248
+ */
249
+ set_max_speech_duration(value: number): void;
250
+
251
+ get_window_size(): number;
252
+
253
+ /**
254
+ * @param value
255
+ */
256
+ set_window_size(value: number): void;
257
+
258
+ get_sample_rate(): number;
259
+
260
+ /**
261
+ * @param value
262
+ */
263
+ set_sample_rate(value: number): void;
264
+
265
+ get_num_threads(): number;
266
+
267
+ /**
268
+ * @param value
269
+ */
270
+ set_num_threads(value: number): void;
271
+
272
+ get_buffer_size_in_seconds(): number;
273
+
274
+ /**
275
+ * @param value
276
+ */
277
+ set_buffer_size_in_seconds(value: number): void;
278
+
279
+ get_enable_debug(): boolean;
280
+
281
+ /**
282
+ * @param value
283
+ */
284
+ set_enable_debug(value: boolean): void;
285
+
286
+ get_is_open(): boolean;
287
+ }
288
+
289
+ namespace OnlineRecognizer {
290
+ // Signal signatures
291
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
292
+ 'notify::encoder': (pspec: GObject.ParamSpec) => void;
293
+ 'notify::decoder': (pspec: GObject.ParamSpec) => void;
294
+ 'notify::joiner': (pspec: GObject.ParamSpec) => void;
295
+ 'notify::tokens': (pspec: GObject.ParamSpec) => void;
296
+ 'notify::model-type': (pspec: GObject.ParamSpec) => void;
297
+ 'notify::provider': (pspec: GObject.ParamSpec) => void;
298
+ 'notify::num-threads': (pspec: GObject.ParamSpec) => void;
299
+ 'notify::decoding-method': (pspec: GObject.ParamSpec) => void;
300
+ 'notify::max-active-paths': (pspec: GObject.ParamSpec) => void;
301
+ 'notify::hotwords-score': (pspec: GObject.ParamSpec) => void;
302
+ 'notify::blank-penalty': (pspec: GObject.ParamSpec) => void;
303
+ 'notify::enable-endpoint': (pspec: GObject.ParamSpec) => void;
304
+ 'notify::rule1-min-trailing-silence': (pspec: GObject.ParamSpec) => void;
305
+ 'notify::rule2-min-trailing-silence': (pspec: GObject.ParamSpec) => void;
306
+ 'notify::rule3-min-utterance-length': (pspec: GObject.ParamSpec) => void;
307
+ 'notify::sample-rate': (pspec: GObject.ParamSpec) => void;
308
+ 'notify::feature-dim': (pspec: GObject.ParamSpec) => void;
309
+ 'notify::enable-debug': (pspec: GObject.ParamSpec) => void;
310
+ 'notify::is-open': (pspec: GObject.ParamSpec) => void;
311
+ }
312
+
313
+ // Constructor properties interface
314
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
315
+ encoder: string;
316
+ decoder: string;
317
+ joiner: string;
318
+ tokens: string;
319
+ model_type: string | null;
320
+ modelType: string;
321
+ provider: string;
322
+ num_threads: number;
323
+ numThreads: number;
324
+ decoding_method: string;
325
+ decodingMethod: string;
326
+ max_active_paths: number;
327
+ maxActivePaths: number;
328
+ hotwords_score: number;
329
+ hotwordsScore: number;
330
+ blank_penalty: number;
331
+ blankPenalty: number;
332
+ enable_endpoint: boolean;
333
+ enableEndpoint: boolean;
334
+ rule1_min_trailing_silence: number;
335
+ rule1MinTrailingSilence: number;
336
+ rule2_min_trailing_silence: number;
337
+ rule2MinTrailingSilence: number;
338
+ rule3_min_utterance_length: number;
339
+ rule3MinUtteranceLength: number;
340
+ sample_rate: number;
341
+ sampleRate: number;
342
+ feature_dim: number;
343
+ featureDim: number;
344
+ enable_debug: boolean;
345
+ enableDebug: boolean;
346
+ is_open: boolean;
347
+ isOpen: boolean;
348
+ }
349
+ }
350
+
351
+ /**
352
+ * @gir-type Class
353
+ */
354
+ class OnlineRecognizer extends GObject.Object {
355
+ static $gtype: GObject.GType<OnlineRecognizer>;
356
+
357
+ // Properties
358
+ /**
359
+ * @construct-only
360
+ */
361
+ get encoder(): string;
362
+
363
+ /**
364
+ * @construct-only
365
+ */
366
+ get decoder(): string;
367
+
368
+ /**
369
+ * @construct-only
370
+ */
371
+ get joiner(): string;
372
+
373
+ /**
374
+ * @construct-only
375
+ */
376
+ get tokens(): string;
377
+
378
+ get model_type(): string | null;
379
+ set model_type(val: string | null);
380
+
381
+ get modelType(): string;
382
+ set modelType(val: string);
383
+
384
+ get provider(): string;
385
+ set provider(val: string);
386
+
387
+ get num_threads(): number;
388
+ set num_threads(val: number);
389
+
390
+ get numThreads(): number;
391
+ set numThreads(val: number);
392
+
393
+ get decoding_method(): string;
394
+ set decoding_method(val: string);
395
+
396
+ get decodingMethod(): string;
397
+ set decodingMethod(val: string);
398
+
399
+ get max_active_paths(): number;
400
+ set max_active_paths(val: number);
401
+
402
+ get maxActivePaths(): number;
403
+ set maxActivePaths(val: number);
404
+
405
+ get hotwords_score(): number;
406
+ set hotwords_score(val: number);
407
+
408
+ get hotwordsScore(): number;
409
+ set hotwordsScore(val: number);
410
+
411
+ get blank_penalty(): number;
412
+ set blank_penalty(val: number);
413
+
414
+ get blankPenalty(): number;
415
+ set blankPenalty(val: number);
416
+
417
+ get enable_endpoint(): boolean;
418
+ set enable_endpoint(val: boolean);
419
+
420
+ get enableEndpoint(): boolean;
421
+ set enableEndpoint(val: boolean);
422
+
423
+ get rule1_min_trailing_silence(): number;
424
+ set rule1_min_trailing_silence(val: number);
425
+
426
+ get rule1MinTrailingSilence(): number;
427
+ set rule1MinTrailingSilence(val: number);
428
+
429
+ get rule2_min_trailing_silence(): number;
430
+ set rule2_min_trailing_silence(val: number);
431
+
432
+ get rule2MinTrailingSilence(): number;
433
+ set rule2MinTrailingSilence(val: number);
434
+
435
+ get rule3_min_utterance_length(): number;
436
+ set rule3_min_utterance_length(val: number);
437
+
438
+ get rule3MinUtteranceLength(): number;
439
+ set rule3MinUtteranceLength(val: number);
440
+
441
+ get sample_rate(): number;
442
+ set sample_rate(val: number);
443
+
444
+ get sampleRate(): number;
445
+ set sampleRate(val: number);
446
+
447
+ get feature_dim(): number;
448
+ set feature_dim(val: number);
449
+
450
+ get featureDim(): number;
451
+ set featureDim(val: number);
452
+
453
+ get enable_debug(): boolean;
454
+ set enable_debug(val: boolean);
455
+
456
+ get enableDebug(): boolean;
457
+ set enableDebug(val: boolean);
458
+
459
+ /**
460
+ * @read-only
461
+ */
462
+ get is_open(): boolean;
463
+
464
+ /**
465
+ * @read-only
466
+ */
467
+ get isOpen(): boolean;
468
+
469
+ /**
470
+ * Compile-time signal type information.
471
+ *
472
+ * This instance property is generated only for TypeScript type checking.
473
+ * It is not defined at runtime and should not be accessed in JS code.
474
+ * @internal
475
+ */
476
+ $signals: OnlineRecognizer.SignalSignatures;
477
+
478
+ // Constructors
479
+ constructor(properties?: Partial<OnlineRecognizer.ConstructorProps>, ...args: any[]);
480
+
481
+ _init(...args: any[]): void;
482
+
483
+ static ['new'](encoder: string, decoder: string, joiner: string, tokens: string): OnlineRecognizer;
484
+
485
+ // Signals
486
+ /** @signal */
487
+ connect<K extends keyof OnlineRecognizer.SignalSignatures>(
488
+ signal: K,
489
+ callback: GObject.SignalCallback<this, OnlineRecognizer.SignalSignatures[K]>,
490
+ ): number;
491
+ connect(signal: string, callback: (...args: any[]) => any): number;
492
+
493
+ /** @signal */
494
+ connect_after<K extends keyof OnlineRecognizer.SignalSignatures>(
495
+ signal: K,
496
+ callback: GObject.SignalCallback<this, OnlineRecognizer.SignalSignatures[K]>,
497
+ ): number;
498
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
499
+
500
+ /** @signal */
501
+ emit<K extends keyof OnlineRecognizer.SignalSignatures>(
502
+ signal: K,
503
+ ...args: GObject.GjsParameters<OnlineRecognizer.SignalSignatures[K]> extends [any, ...infer Q]
504
+ ? Q
505
+ : never
506
+ ): void;
507
+ emit(signal: string, ...args: any[]): void;
508
+
509
+ // Methods
510
+ open(): void;
511
+
512
+ close(): void;
513
+
514
+ /**
515
+ * @param hotwords
516
+ */
517
+ create_stream(hotwords: string | null): OnlineStream;
518
+
519
+ get_encoder(): string;
520
+
521
+ get_decoder(): string;
522
+
523
+ get_joiner(): string;
524
+
525
+ get_tokens(): string;
526
+
527
+ get_model_type(): string | null;
528
+
529
+ /**
530
+ * @param value
531
+ */
532
+ set_model_type(value: string | null): void;
533
+
534
+ get_provider(): string;
535
+
536
+ /**
537
+ * @param value
538
+ */
539
+ set_provider(value: string): void;
540
+
541
+ get_num_threads(): number;
542
+
543
+ /**
544
+ * @param value
545
+ */
546
+ set_num_threads(value: number): void;
547
+
548
+ get_decoding_method(): string;
549
+
550
+ /**
551
+ * @param value
552
+ */
553
+ set_decoding_method(value: string): void;
554
+
555
+ get_max_active_paths(): number;
556
+
557
+ /**
558
+ * @param value
559
+ */
560
+ set_max_active_paths(value: number): void;
561
+
562
+ get_hotwords_score(): number;
563
+
564
+ /**
565
+ * @param value
566
+ */
567
+ set_hotwords_score(value: number): void;
568
+
569
+ get_blank_penalty(): number;
570
+
571
+ /**
572
+ * @param value
573
+ */
574
+ set_blank_penalty(value: number): void;
575
+
576
+ get_enable_endpoint(): boolean;
577
+
578
+ /**
579
+ * @param value
580
+ */
581
+ set_enable_endpoint(value: boolean): void;
582
+
583
+ get_rule1_min_trailing_silence(): number;
584
+
585
+ /**
586
+ * @param value
587
+ */
588
+ set_rule1_min_trailing_silence(value: number): void;
589
+
590
+ get_rule2_min_trailing_silence(): number;
591
+
592
+ /**
593
+ * @param value
594
+ */
595
+ set_rule2_min_trailing_silence(value: number): void;
596
+
597
+ get_rule3_min_utterance_length(): number;
598
+
599
+ /**
600
+ * @param value
601
+ */
602
+ set_rule3_min_utterance_length(value: number): void;
603
+
604
+ get_sample_rate(): number;
605
+
606
+ /**
607
+ * @param value
608
+ */
609
+ set_sample_rate(value: number): void;
610
+
611
+ get_feature_dim(): number;
612
+
613
+ /**
614
+ * @param value
615
+ */
616
+ set_feature_dim(value: number): void;
617
+
618
+ get_enable_debug(): boolean;
619
+
620
+ /**
621
+ * @param value
622
+ */
623
+ set_enable_debug(value: boolean): void;
624
+
625
+ get_is_open(): boolean;
626
+ }
627
+
628
+ namespace OnlineStream {
629
+ // Signal signatures
630
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
631
+ 'notify::is-open': (pspec: GObject.ParamSpec) => void;
632
+ }
633
+
634
+ // Constructor properties interface
635
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
636
+ is_open: boolean;
637
+ isOpen: boolean;
638
+ }
639
+ }
640
+
641
+ /**
642
+ * @gir-type Class
643
+ */
644
+ class OnlineStream extends GObject.Object {
645
+ static $gtype: GObject.GType<OnlineStream>;
646
+
647
+ // Properties
648
+ /**
649
+ * @read-only
650
+ */
651
+ get is_open(): boolean;
652
+
653
+ /**
654
+ * @read-only
655
+ */
656
+ get isOpen(): boolean;
657
+
658
+ /**
659
+ * Compile-time signal type information.
660
+ *
661
+ * This instance property is generated only for TypeScript type checking.
662
+ * It is not defined at runtime and should not be accessed in JS code.
663
+ * @internal
664
+ */
665
+ $signals: OnlineStream.SignalSignatures;
666
+
667
+ // Constructors
668
+ constructor(properties?: Partial<OnlineStream.ConstructorProps>, ...args: any[]);
669
+
670
+ _init(...args: any[]): void;
671
+
672
+ // Signals
673
+ /** @signal */
674
+ connect<K extends keyof OnlineStream.SignalSignatures>(
675
+ signal: K,
676
+ callback: GObject.SignalCallback<this, OnlineStream.SignalSignatures[K]>,
677
+ ): number;
678
+ connect(signal: string, callback: (...args: any[]) => any): number;
679
+
680
+ /** @signal */
681
+ connect_after<K extends keyof OnlineStream.SignalSignatures>(
682
+ signal: K,
683
+ callback: GObject.SignalCallback<this, OnlineStream.SignalSignatures[K]>,
684
+ ): number;
685
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
686
+
687
+ /** @signal */
688
+ emit<K extends keyof OnlineStream.SignalSignatures>(
689
+ signal: K,
690
+ ...args: GObject.GjsParameters<OnlineStream.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
691
+ ): void;
692
+ emit(signal: string, ...args: any[]): void;
693
+
694
+ // Methods
695
+ close(): void;
696
+
697
+ /**
698
+ * @param sample_rate
699
+ * @param samples
700
+ */
701
+ accept(sample_rate: number, samples: number[]): void;
702
+
703
+ input_finished(): void;
704
+
705
+ is_ready(): boolean;
706
+
707
+ is_endpoint(): boolean;
708
+
709
+ decode(): void;
710
+
711
+ reset(): void;
712
+
713
+ get_text(): string;
714
+
715
+ get_json(): string;
716
+
717
+ get_is_open(): boolean;
718
+ }
719
+
720
+ namespace OfflineRecognizer {
721
+ // Signal signatures
722
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
723
+ 'notify::encoder': (pspec: GObject.ParamSpec) => void;
724
+ 'notify::decoder': (pspec: GObject.ParamSpec) => void;
725
+ 'notify::joiner': (pspec: GObject.ParamSpec) => void;
726
+ 'notify::tokens': (pspec: GObject.ParamSpec) => void;
727
+ 'notify::model-type': (pspec: GObject.ParamSpec) => void;
728
+ 'notify::provider': (pspec: GObject.ParamSpec) => void;
729
+ 'notify::num-threads': (pspec: GObject.ParamSpec) => void;
730
+ 'notify::decoding-method': (pspec: GObject.ParamSpec) => void;
731
+ 'notify::max-active-paths': (pspec: GObject.ParamSpec) => void;
732
+ 'notify::hotwords-score': (pspec: GObject.ParamSpec) => void;
733
+ 'notify::blank-penalty': (pspec: GObject.ParamSpec) => void;
734
+ 'notify::sample-rate': (pspec: GObject.ParamSpec) => void;
735
+ 'notify::feature-dim': (pspec: GObject.ParamSpec) => void;
736
+ 'notify::enable-debug': (pspec: GObject.ParamSpec) => void;
737
+ 'notify::is-open': (pspec: GObject.ParamSpec) => void;
738
+ }
739
+
740
+ // Constructor properties interface
741
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
742
+ encoder: string;
743
+ decoder: string;
744
+ joiner: string;
745
+ tokens: string;
746
+ model_type: string | null;
747
+ modelType: string;
748
+ provider: string;
749
+ num_threads: number;
750
+ numThreads: number;
751
+ decoding_method: string;
752
+ decodingMethod: string;
753
+ max_active_paths: number;
754
+ maxActivePaths: number;
755
+ hotwords_score: number;
756
+ hotwordsScore: number;
757
+ blank_penalty: number;
758
+ blankPenalty: number;
759
+ sample_rate: number;
760
+ sampleRate: number;
761
+ feature_dim: number;
762
+ featureDim: number;
763
+ enable_debug: boolean;
764
+ enableDebug: boolean;
765
+ is_open: boolean;
766
+ isOpen: boolean;
767
+ }
768
+ }
769
+
770
+ /**
771
+ * @gir-type Class
772
+ */
773
+ class OfflineRecognizer extends GObject.Object {
774
+ static $gtype: GObject.GType<OfflineRecognizer>;
775
+
776
+ // Properties
777
+ /**
778
+ * @construct-only
779
+ */
780
+ get encoder(): string;
781
+
782
+ /**
783
+ * @construct-only
784
+ */
785
+ get decoder(): string;
786
+
787
+ /**
788
+ * @construct-only
789
+ */
790
+ get joiner(): string;
791
+
792
+ /**
793
+ * @construct-only
794
+ */
795
+ get tokens(): string;
796
+
797
+ get model_type(): string | null;
798
+ set model_type(val: string | null);
799
+
800
+ get modelType(): string;
801
+ set modelType(val: string);
802
+
803
+ get provider(): string;
804
+ set provider(val: string);
805
+
806
+ get num_threads(): number;
807
+ set num_threads(val: number);
808
+
809
+ get numThreads(): number;
810
+ set numThreads(val: number);
811
+
812
+ get decoding_method(): string;
813
+ set decoding_method(val: string);
814
+
815
+ get decodingMethod(): string;
816
+ set decodingMethod(val: string);
817
+
818
+ get max_active_paths(): number;
819
+ set max_active_paths(val: number);
820
+
821
+ get maxActivePaths(): number;
822
+ set maxActivePaths(val: number);
823
+
824
+ get hotwords_score(): number;
825
+ set hotwords_score(val: number);
826
+
827
+ get hotwordsScore(): number;
828
+ set hotwordsScore(val: number);
829
+
830
+ get blank_penalty(): number;
831
+ set blank_penalty(val: number);
832
+
833
+ get blankPenalty(): number;
834
+ set blankPenalty(val: number);
835
+
836
+ get sample_rate(): number;
837
+ set sample_rate(val: number);
838
+
839
+ get sampleRate(): number;
840
+ set sampleRate(val: number);
841
+
842
+ get feature_dim(): number;
843
+ set feature_dim(val: number);
844
+
845
+ get featureDim(): number;
846
+ set featureDim(val: number);
847
+
848
+ get enable_debug(): boolean;
849
+ set enable_debug(val: boolean);
850
+
851
+ get enableDebug(): boolean;
852
+ set enableDebug(val: boolean);
853
+
854
+ /**
855
+ * @read-only
856
+ */
857
+ get is_open(): boolean;
858
+
859
+ /**
860
+ * @read-only
861
+ */
862
+ get isOpen(): boolean;
863
+
864
+ /**
865
+ * Compile-time signal type information.
866
+ *
867
+ * This instance property is generated only for TypeScript type checking.
868
+ * It is not defined at runtime and should not be accessed in JS code.
869
+ * @internal
870
+ */
871
+ $signals: OfflineRecognizer.SignalSignatures;
872
+
873
+ // Constructors
874
+ constructor(properties?: Partial<OfflineRecognizer.ConstructorProps>, ...args: any[]);
875
+
876
+ _init(...args: any[]): void;
877
+
878
+ static ['new'](encoder: string, decoder: string, joiner: string, tokens: string): OfflineRecognizer;
879
+
880
+ // Signals
881
+ /** @signal */
882
+ connect<K extends keyof OfflineRecognizer.SignalSignatures>(
883
+ signal: K,
884
+ callback: GObject.SignalCallback<this, OfflineRecognizer.SignalSignatures[K]>,
885
+ ): number;
886
+ connect(signal: string, callback: (...args: any[]) => any): number;
887
+
888
+ /** @signal */
889
+ connect_after<K extends keyof OfflineRecognizer.SignalSignatures>(
890
+ signal: K,
891
+ callback: GObject.SignalCallback<this, OfflineRecognizer.SignalSignatures[K]>,
892
+ ): number;
893
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
894
+
895
+ /** @signal */
896
+ emit<K extends keyof OfflineRecognizer.SignalSignatures>(
897
+ signal: K,
898
+ ...args: GObject.GjsParameters<OfflineRecognizer.SignalSignatures[K]> extends [any, ...infer Q]
899
+ ? Q
900
+ : never
901
+ ): void;
902
+ emit(signal: string, ...args: any[]): void;
903
+
904
+ // Methods
905
+ open(): void;
906
+
907
+ close(): void;
908
+
909
+ /**
910
+ * @param hotwords
911
+ */
912
+ create_stream(hotwords: string | null): OfflineStream;
913
+
914
+ get_encoder(): string;
915
+
916
+ get_decoder(): string;
917
+
918
+ get_joiner(): string;
919
+
920
+ get_tokens(): string;
921
+
922
+ get_model_type(): string | null;
923
+
924
+ /**
925
+ * @param value
926
+ */
927
+ set_model_type(value: string | null): void;
928
+
929
+ get_provider(): string;
930
+
931
+ /**
932
+ * @param value
933
+ */
934
+ set_provider(value: string): void;
935
+
936
+ get_num_threads(): number;
937
+
938
+ /**
939
+ * @param value
940
+ */
941
+ set_num_threads(value: number): void;
942
+
943
+ get_decoding_method(): string;
944
+
945
+ /**
946
+ * @param value
947
+ */
948
+ set_decoding_method(value: string): void;
949
+
950
+ get_max_active_paths(): number;
951
+
952
+ /**
953
+ * @param value
954
+ */
955
+ set_max_active_paths(value: number): void;
956
+
957
+ get_hotwords_score(): number;
958
+
959
+ /**
960
+ * @param value
961
+ */
962
+ set_hotwords_score(value: number): void;
963
+
964
+ get_blank_penalty(): number;
965
+
966
+ /**
967
+ * @param value
968
+ */
969
+ set_blank_penalty(value: number): void;
970
+
971
+ get_sample_rate(): number;
972
+
973
+ /**
974
+ * @param value
975
+ */
976
+ set_sample_rate(value: number): void;
977
+
978
+ get_feature_dim(): number;
979
+
980
+ /**
981
+ * @param value
982
+ */
983
+ set_feature_dim(value: number): void;
984
+
985
+ get_enable_debug(): boolean;
986
+
987
+ /**
988
+ * @param value
989
+ */
990
+ set_enable_debug(value: boolean): void;
991
+
992
+ get_is_open(): boolean;
993
+ }
994
+
995
+ namespace OfflineStream {
996
+ // Signal signatures
997
+ interface SignalSignatures extends GObject.Object.SignalSignatures {
998
+ 'notify::is-open': (pspec: GObject.ParamSpec) => void;
999
+ }
1000
+
1001
+ // Constructor properties interface
1002
+ interface ConstructorProps extends GObject.Object.ConstructorProps {
1003
+ is_open: boolean;
1004
+ isOpen: boolean;
1005
+ }
1006
+ }
1007
+
1008
+ /**
1009
+ * @gir-type Class
1010
+ */
1011
+ class OfflineStream extends GObject.Object {
1012
+ static $gtype: GObject.GType<OfflineStream>;
1013
+
1014
+ // Properties
1015
+ /**
1016
+ * @read-only
1017
+ */
1018
+ get is_open(): boolean;
1019
+
1020
+ /**
1021
+ * @read-only
1022
+ */
1023
+ get isOpen(): boolean;
1024
+
1025
+ /**
1026
+ * Compile-time signal type information.
1027
+ *
1028
+ * This instance property is generated only for TypeScript type checking.
1029
+ * It is not defined at runtime and should not be accessed in JS code.
1030
+ * @internal
1031
+ */
1032
+ $signals: OfflineStream.SignalSignatures;
1033
+
1034
+ // Constructors
1035
+ constructor(properties?: Partial<OfflineStream.ConstructorProps>, ...args: any[]);
1036
+
1037
+ _init(...args: any[]): void;
1038
+
1039
+ // Signals
1040
+ /** @signal */
1041
+ connect<K extends keyof OfflineStream.SignalSignatures>(
1042
+ signal: K,
1043
+ callback: GObject.SignalCallback<this, OfflineStream.SignalSignatures[K]>,
1044
+ ): number;
1045
+ connect(signal: string, callback: (...args: any[]) => any): number;
1046
+
1047
+ /** @signal */
1048
+ connect_after<K extends keyof OfflineStream.SignalSignatures>(
1049
+ signal: K,
1050
+ callback: GObject.SignalCallback<this, OfflineStream.SignalSignatures[K]>,
1051
+ ): number;
1052
+ connect_after(signal: string, callback: (...args: any[]) => any): number;
1053
+
1054
+ /** @signal */
1055
+ emit<K extends keyof OfflineStream.SignalSignatures>(
1056
+ signal: K,
1057
+ ...args: GObject.GjsParameters<OfflineStream.SignalSignatures[K]> extends [any, ...infer Q] ? Q : never
1058
+ ): void;
1059
+ emit(signal: string, ...args: any[]): void;
1060
+
1061
+ // Methods
1062
+ close(): void;
1063
+
1064
+ /**
1065
+ * @param sample_rate
1066
+ * @param samples
1067
+ */
1068
+ accept(sample_rate: number, samples: number[]): void;
1069
+
1070
+ decode(): void;
1071
+
1072
+ get_text(): string;
1073
+
1074
+ get_json(): string;
1075
+
1076
+ get_is_open(): boolean;
1077
+ }
1078
+
1079
+ /**
1080
+ * @gir-type Alias
1081
+ */
1082
+ type VadClass = typeof Vad;
1083
+
1084
+ /**
1085
+ * @gir-type Struct
1086
+ */
1087
+ abstract class VadPrivate {
1088
+ static $gtype: GObject.GType<VadPrivate>;
1089
+ }
1090
+
1091
+ /**
1092
+ * @gir-type Alias
1093
+ */
1094
+ type OnlineRecognizerClass = typeof OnlineRecognizer;
1095
+
1096
+ /**
1097
+ * @gir-type Struct
1098
+ */
1099
+ abstract class OnlineRecognizerPrivate {
1100
+ static $gtype: GObject.GType<OnlineRecognizerPrivate>;
1101
+ }
1102
+
1103
+ /**
1104
+ * @gir-type Alias
1105
+ */
1106
+ type OnlineStreamClass = typeof OnlineStream;
1107
+
1108
+ /**
1109
+ * @gir-type Struct
1110
+ */
1111
+ abstract class OnlineStreamPrivate {
1112
+ static $gtype: GObject.GType<OnlineStreamPrivate>;
1113
+ }
1114
+
1115
+ /**
1116
+ * @gir-type Alias
1117
+ */
1118
+ type OfflineRecognizerClass = typeof OfflineRecognizer;
1119
+
1120
+ /**
1121
+ * @gir-type Struct
1122
+ */
1123
+ abstract class OfflineRecognizerPrivate {
1124
+ static $gtype: GObject.GType<OfflineRecognizerPrivate>;
1125
+ }
1126
+
1127
+ /**
1128
+ * @gir-type Alias
1129
+ */
1130
+ type OfflineStreamClass = typeof OfflineStream;
1131
+
1132
+ /**
1133
+ * @gir-type Struct
1134
+ */
1135
+ abstract class OfflineStreamPrivate {
1136
+ static $gtype: GObject.GType<OfflineStreamPrivate>;
1137
+ }
1138
+
1139
+ /**
1140
+ * Name of the imported GIR library
1141
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L188
1142
+ */
1143
+ const __name__: string;
1144
+
1145
+ /**
1146
+ * Version of the imported GIR library
1147
+ * `see` https://gitlab.gnome.org/GNOME/gjs/-/blob/master/gi/ns.cpp#L189
1148
+ */
1149
+ const __version__: string;
1150
+ }
1151
+
1152
+ export default GjsifySherpa;
1153
+ }
1154
+
1155
+ declare module 'gi://GjsifySherpa' {
1156
+ import GjsifySherpa10 from 'gi://GjsifySherpa?version=1.0';
1157
+ export default GjsifySherpa10;
1158
+ }
1159
+ // END