transcribe-cpp-sys 0.1.3

Native FFI bindings for transcribe.cpp, a C/C++ speech-to-text library built on ggml
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
// @generated by `cargo xtask bindgen` from include/transcribe/extensions.h
// DO NOT EDIT BY HAND. Regenerate: `cargo xtask bindgen`.
// Pinned to include/transcribe.abihash = 86b16dd97ad1cb58

/// The public-ABI digest these bindings were generated against
/// (sha256/16 over the normalized FFI surface). The load-time version
/// gate and the CI drift check both anchor on this value.
pub const PUBLIC_HEADER_HASH: &str = "86b16dd97ad1cb58";

/* automatically generated by rust-bindgen 0.72.1 */

pub const TRANSCRIBE_EXT_KIND_MOONSHINE_STREAMING_STREAM: u32 = 1414746957;
pub const TRANSCRIBE_EXT_KIND_PARAKEET_STREAM: u32 = 1414744912;
pub const TRANSCRIBE_EXT_KIND_PARAKEET_BUFFERED_STREAM: u32 = 1396853584;
pub const TRANSCRIBE_EXT_KIND_VOXTRAL_REALTIME_STREAM: u32 = 1414746710;
pub const TRANSCRIBE_EXT_KIND_WHISPER_RUN: u32 = 1314015319;
impl transcribe_status {
    pub const TRANSCRIBE_OK: transcribe_status = transcribe_status(0);
    pub const TRANSCRIBE_ERR_INVALID_ARG: transcribe_status = transcribe_status(1);
    pub const TRANSCRIBE_ERR_NOT_IMPLEMENTED: transcribe_status = transcribe_status(2);
    pub const TRANSCRIBE_ERR_FILE_NOT_FOUND: transcribe_status = transcribe_status(3);
    pub const TRANSCRIBE_ERR_GGUF: transcribe_status = transcribe_status(4);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_ARCH: transcribe_status = transcribe_status(5);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_VARIANT: transcribe_status = transcribe_status(6);
    pub const TRANSCRIBE_ERR_OOM: transcribe_status = transcribe_status(7);
    pub const TRANSCRIBE_ERR_BACKEND: transcribe_status = transcribe_status(8);
    pub const TRANSCRIBE_ERR_SAMPLE_RATE: transcribe_status = transcribe_status(9);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_LANGUAGE: transcribe_status = transcribe_status(10);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_TASK: transcribe_status = transcribe_status(11);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_TIMESTAMPS: transcribe_status = transcribe_status(12);
    pub const TRANSCRIBE_ERR_ABORTED: transcribe_status = transcribe_status(13);
    pub const TRANSCRIBE_ERR_BAD_STRUCT_SIZE: transcribe_status = transcribe_status(14);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_PNC: transcribe_status = transcribe_status(15);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_ITN: transcribe_status = transcribe_status(16);
    pub const TRANSCRIBE_ERR_INPUT_TOO_LONG: transcribe_status = transcribe_status(17);
    pub const TRANSCRIBE_ERR_OUTPUT_TRUNCATED: transcribe_status = transcribe_status(18);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_status(pub ::std::os::raw::c_uint);
unsafe extern "C" {
    pub fn transcribe_status_string(status: ::std::os::raw::c_int)
        -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_version() -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_version_commit() -> *const ::std::os::raw::c_char;
}
impl transcribe_abi_struct {
    pub const TRANSCRIBE_ABI_MODEL_LOAD_PARAMS: transcribe_abi_struct = transcribe_abi_struct(0);
    pub const TRANSCRIBE_ABI_SESSION_PARAMS: transcribe_abi_struct = transcribe_abi_struct(1);
    pub const TRANSCRIBE_ABI_RUN_PARAMS: transcribe_abi_struct = transcribe_abi_struct(2);
    pub const TRANSCRIBE_ABI_STREAM_PARAMS: transcribe_abi_struct = transcribe_abi_struct(3);
    pub const TRANSCRIBE_ABI_CAPABILITIES: transcribe_abi_struct = transcribe_abi_struct(4);
    pub const TRANSCRIBE_ABI_TIMINGS: transcribe_abi_struct = transcribe_abi_struct(5);
    pub const TRANSCRIBE_ABI_SEGMENT: transcribe_abi_struct = transcribe_abi_struct(6);
    pub const TRANSCRIBE_ABI_WORD: transcribe_abi_struct = transcribe_abi_struct(7);
    pub const TRANSCRIBE_ABI_TOKEN: transcribe_abi_struct = transcribe_abi_struct(8);
    pub const TRANSCRIBE_ABI_STREAM_UPDATE: transcribe_abi_struct = transcribe_abi_struct(9);
    pub const TRANSCRIBE_ABI_STREAM_TEXT: transcribe_abi_struct = transcribe_abi_struct(10);
    pub const TRANSCRIBE_ABI_SESSION_LIMITS: transcribe_abi_struct = transcribe_abi_struct(11);
    pub const TRANSCRIBE_ABI_EXT: transcribe_abi_struct = transcribe_abi_struct(12);
    pub const TRANSCRIBE_ABI_BACKEND_DEVICE: transcribe_abi_struct = transcribe_abi_struct(13);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_abi_struct(pub ::std::os::raw::c_uint);
unsafe extern "C" {
    pub fn transcribe_abi_struct_size(which: transcribe_abi_struct) -> usize;
}
unsafe extern "C" {
    pub fn transcribe_abi_struct_align(which: transcribe_abi_struct) -> usize;
}
impl transcribe_log_level {
    pub const TRANSCRIBE_LOG_LEVEL_NONE: transcribe_log_level = transcribe_log_level(0);
    pub const TRANSCRIBE_LOG_LEVEL_INFO: transcribe_log_level = transcribe_log_level(1);
    pub const TRANSCRIBE_LOG_LEVEL_WARN: transcribe_log_level = transcribe_log_level(2);
    pub const TRANSCRIBE_LOG_LEVEL_ERROR: transcribe_log_level = transcribe_log_level(3);
    pub const TRANSCRIBE_LOG_LEVEL_DEBUG: transcribe_log_level = transcribe_log_level(4);
    pub const TRANSCRIBE_LOG_LEVEL_CONT: transcribe_log_level = transcribe_log_level(5);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_log_level(pub ::std::os::raw::c_uint);
pub type transcribe_log_callback = ::std::option::Option<
    unsafe extern "C" fn(
        level: transcribe_log_level,
        msg: *const ::std::os::raw::c_char,
        userdata: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    pub fn transcribe_log_set(cb: transcribe_log_callback, userdata: *mut ::std::os::raw::c_void);
}
impl transcribe_task {
    pub const TRANSCRIBE_TASK_TRANSCRIBE: transcribe_task = transcribe_task(0);
    pub const TRANSCRIBE_TASK_TRANSLATE: transcribe_task = transcribe_task(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_task(pub ::std::os::raw::c_uint);
impl transcribe_timestamp_kind {
    pub const TRANSCRIBE_TIMESTAMPS_NONE: transcribe_timestamp_kind = transcribe_timestamp_kind(0);
    pub const TRANSCRIBE_TIMESTAMPS_AUTO: transcribe_timestamp_kind = transcribe_timestamp_kind(1);
    pub const TRANSCRIBE_TIMESTAMPS_SEGMENT: transcribe_timestamp_kind =
        transcribe_timestamp_kind(2);
    pub const TRANSCRIBE_TIMESTAMPS_WORD: transcribe_timestamp_kind = transcribe_timestamp_kind(3);
    pub const TRANSCRIBE_TIMESTAMPS_TOKEN: transcribe_timestamp_kind = transcribe_timestamp_kind(4);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_timestamp_kind(pub ::std::os::raw::c_uint);
impl transcribe_kv_type {
    pub const TRANSCRIBE_KV_TYPE_AUTO: transcribe_kv_type = transcribe_kv_type(0);
    pub const TRANSCRIBE_KV_TYPE_F32: transcribe_kv_type = transcribe_kv_type(1);
    pub const TRANSCRIBE_KV_TYPE_F16: transcribe_kv_type = transcribe_kv_type(2);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_kv_type(pub ::std::os::raw::c_uint);
impl transcribe_pnc_mode {
    pub const TRANSCRIBE_PNC_MODE_DEFAULT: transcribe_pnc_mode = transcribe_pnc_mode(0);
    pub const TRANSCRIBE_PNC_MODE_OFF: transcribe_pnc_mode = transcribe_pnc_mode(1);
    pub const TRANSCRIBE_PNC_MODE_ON: transcribe_pnc_mode = transcribe_pnc_mode(2);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_pnc_mode(pub ::std::os::raw::c_uint);
impl transcribe_itn_mode {
    pub const TRANSCRIBE_ITN_MODE_DEFAULT: transcribe_itn_mode = transcribe_itn_mode(0);
    pub const TRANSCRIBE_ITN_MODE_OFF: transcribe_itn_mode = transcribe_itn_mode(1);
    pub const TRANSCRIBE_ITN_MODE_ON: transcribe_itn_mode = transcribe_itn_mode(2);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_itn_mode(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_model {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_session {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_ext {
    pub size: u64,
    pub kind: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_ext"][::std::mem::size_of::<transcribe_ext>() - 16usize];
    ["Alignment of transcribe_ext"][::std::mem::align_of::<transcribe_ext>() - 8usize];
    ["Offset of field: transcribe_ext::size"]
        [::std::mem::offset_of!(transcribe_ext, size) - 0usize];
    ["Offset of field: transcribe_ext::kind"]
        [::std::mem::offset_of!(transcribe_ext, kind) - 8usize];
};
unsafe extern "C" {
    pub fn transcribe_ext_check(
        ext: *const transcribe_ext,
        expected_kind: u32,
        min_size: u64,
    ) -> transcribe_status;
}
impl transcribe_ext_slot {
    pub const TRANSCRIBE_EXT_SLOT_RUN: transcribe_ext_slot = transcribe_ext_slot(0);
    pub const TRANSCRIBE_EXT_SLOT_STREAM: transcribe_ext_slot = transcribe_ext_slot(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_ext_slot(pub ::std::os::raw::c_uint);
unsafe extern "C" {
    pub fn transcribe_model_accepts_ext_kind(
        model: *const transcribe_model,
        slot: transcribe_ext_slot,
        kind: u32,
    ) -> bool;
}
impl transcribe_backend_request {
    pub const TRANSCRIBE_BACKEND_AUTO: transcribe_backend_request = transcribe_backend_request(0);
    pub const TRANSCRIBE_BACKEND_CPU: transcribe_backend_request = transcribe_backend_request(1);
    pub const TRANSCRIBE_BACKEND_METAL: transcribe_backend_request = transcribe_backend_request(2);
    pub const TRANSCRIBE_BACKEND_VULKAN: transcribe_backend_request = transcribe_backend_request(3);
    pub const TRANSCRIBE_BACKEND_CPU_ACCEL: transcribe_backend_request =
        transcribe_backend_request(4);
    pub const TRANSCRIBE_BACKEND_CUDA: transcribe_backend_request = transcribe_backend_request(5);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_backend_request(pub ::std::os::raw::c_uint);
unsafe extern "C" {
    pub fn transcribe_init_backends(
        artifact_dir: *const ::std::os::raw::c_char,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_init_backends_default() -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_backend_device_count() -> ::std::os::raw::c_int;
}
impl transcribe_device_type {
    pub const TRANSCRIBE_DEVICE_TYPE_CPU: transcribe_device_type = transcribe_device_type(0);
    pub const TRANSCRIBE_DEVICE_TYPE_GPU: transcribe_device_type = transcribe_device_type(1);
    pub const TRANSCRIBE_DEVICE_TYPE_IGPU: transcribe_device_type = transcribe_device_type(2);
    pub const TRANSCRIBE_DEVICE_TYPE_ACCEL: transcribe_device_type = transcribe_device_type(3);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_device_type(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_backend_device {
    pub struct_size: u64,
    pub name: *const ::std::os::raw::c_char,
    pub description: *const ::std::os::raw::c_char,
    pub kind: *const ::std::os::raw::c_char,
    pub device_id: *const ::std::os::raw::c_char,
    pub memory_total: u64,
    pub memory_free: u64,
    pub device_type: transcribe_device_type,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_backend_device"]
        [::std::mem::size_of::<transcribe_backend_device>() - 64usize];
    ["Alignment of transcribe_backend_device"]
        [::std::mem::align_of::<transcribe_backend_device>() - 8usize];
    ["Offset of field: transcribe_backend_device::struct_size"]
        [::std::mem::offset_of!(transcribe_backend_device, struct_size) - 0usize];
    ["Offset of field: transcribe_backend_device::name"]
        [::std::mem::offset_of!(transcribe_backend_device, name) - 8usize];
    ["Offset of field: transcribe_backend_device::description"]
        [::std::mem::offset_of!(transcribe_backend_device, description) - 16usize];
    ["Offset of field: transcribe_backend_device::kind"]
        [::std::mem::offset_of!(transcribe_backend_device, kind) - 24usize];
    ["Offset of field: transcribe_backend_device::device_id"]
        [::std::mem::offset_of!(transcribe_backend_device, device_id) - 32usize];
    ["Offset of field: transcribe_backend_device::memory_total"]
        [::std::mem::offset_of!(transcribe_backend_device, memory_total) - 40usize];
    ["Offset of field: transcribe_backend_device::memory_free"]
        [::std::mem::offset_of!(transcribe_backend_device, memory_free) - 48usize];
    ["Offset of field: transcribe_backend_device::device_type"]
        [::std::mem::offset_of!(transcribe_backend_device, device_type) - 56usize];
};
unsafe extern "C" {
    pub fn transcribe_backend_device_init(p: *mut transcribe_backend_device);
}
unsafe extern "C" {
    pub fn transcribe_get_backend_device(
        index: ::std::os::raw::c_int,
        out: *mut transcribe_backend_device,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_backend_available(kind: transcribe_backend_request) -> bool;
}
unsafe extern "C" {
    pub fn transcribe_model_get_device(
        model: *const transcribe_model,
        out: *mut transcribe_backend_device,
    ) -> transcribe_status;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_model_load_params {
    pub struct_size: u64,
    pub backend: transcribe_backend_request,
    pub gpu_device: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_model_load_params"]
        [::std::mem::size_of::<transcribe_model_load_params>() - 16usize];
    ["Alignment of transcribe_model_load_params"]
        [::std::mem::align_of::<transcribe_model_load_params>() - 8usize];
    ["Offset of field: transcribe_model_load_params::struct_size"]
        [::std::mem::offset_of!(transcribe_model_load_params, struct_size) - 0usize];
    ["Offset of field: transcribe_model_load_params::backend"]
        [::std::mem::offset_of!(transcribe_model_load_params, backend) - 8usize];
    ["Offset of field: transcribe_model_load_params::gpu_device"]
        [::std::mem::offset_of!(transcribe_model_load_params, gpu_device) - 12usize];
};
unsafe extern "C" {
    pub fn transcribe_model_load_params_init(params: *mut transcribe_model_load_params);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_session_params {
    pub struct_size: u64,
    pub n_threads: ::std::os::raw::c_int,
    pub kv_type: transcribe_kv_type,
    pub n_ctx: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_session_params"]
        [::std::mem::size_of::<transcribe_session_params>() - 24usize];
    ["Alignment of transcribe_session_params"]
        [::std::mem::align_of::<transcribe_session_params>() - 8usize];
    ["Offset of field: transcribe_session_params::struct_size"]
        [::std::mem::offset_of!(transcribe_session_params, struct_size) - 0usize];
    ["Offset of field: transcribe_session_params::n_threads"]
        [::std::mem::offset_of!(transcribe_session_params, n_threads) - 8usize];
    ["Offset of field: transcribe_session_params::kv_type"]
        [::std::mem::offset_of!(transcribe_session_params, kv_type) - 12usize];
    ["Offset of field: transcribe_session_params::n_ctx"]
        [::std::mem::offset_of!(transcribe_session_params, n_ctx) - 16usize];
};
unsafe extern "C" {
    pub fn transcribe_session_params_init(params: *mut transcribe_session_params);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_run_params {
    pub struct_size: u64,
    pub task: transcribe_task,
    pub timestamps: transcribe_timestamp_kind,
    pub pnc: transcribe_pnc_mode,
    pub itn: transcribe_itn_mode,
    pub language: *const ::std::os::raw::c_char,
    pub target_language: *const ::std::os::raw::c_char,
    pub keep_special_tags: bool,
    pub family: *const transcribe_ext,
    pub spec_k_drafts: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_run_params"][::std::mem::size_of::<transcribe_run_params>() - 64usize];
    ["Alignment of transcribe_run_params"]
        [::std::mem::align_of::<transcribe_run_params>() - 8usize];
    ["Offset of field: transcribe_run_params::struct_size"]
        [::std::mem::offset_of!(transcribe_run_params, struct_size) - 0usize];
    ["Offset of field: transcribe_run_params::task"]
        [::std::mem::offset_of!(transcribe_run_params, task) - 8usize];
    ["Offset of field: transcribe_run_params::timestamps"]
        [::std::mem::offset_of!(transcribe_run_params, timestamps) - 12usize];
    ["Offset of field: transcribe_run_params::pnc"]
        [::std::mem::offset_of!(transcribe_run_params, pnc) - 16usize];
    ["Offset of field: transcribe_run_params::itn"]
        [::std::mem::offset_of!(transcribe_run_params, itn) - 20usize];
    ["Offset of field: transcribe_run_params::language"]
        [::std::mem::offset_of!(transcribe_run_params, language) - 24usize];
    ["Offset of field: transcribe_run_params::target_language"]
        [::std::mem::offset_of!(transcribe_run_params, target_language) - 32usize];
    ["Offset of field: transcribe_run_params::keep_special_tags"]
        [::std::mem::offset_of!(transcribe_run_params, keep_special_tags) - 40usize];
    ["Offset of field: transcribe_run_params::family"]
        [::std::mem::offset_of!(transcribe_run_params, family) - 48usize];
    ["Offset of field: transcribe_run_params::spec_k_drafts"]
        [::std::mem::offset_of!(transcribe_run_params, spec_k_drafts) - 56usize];
};
unsafe extern "C" {
    pub fn transcribe_run_params_init(params: *mut transcribe_run_params);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_capabilities {
    pub struct_size: u64,
    pub native_sample_rate: i32,
    pub n_languages: ::std::os::raw::c_int,
    pub languages: *const *const ::std::os::raw::c_char,
    pub max_timestamp_kind: transcribe_timestamp_kind,
    pub supports_language_detect: bool,
    pub supports_translate: bool,
    pub supports_streaming: bool,
    pub supports_spec_decode: bool,
    pub max_audio_ms: i64,
    pub n_translate_target_languages: ::std::os::raw::c_int,
    pub translate_target_languages: *const *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_capabilities"][::std::mem::size_of::<transcribe_capabilities>() - 56usize];
    ["Alignment of transcribe_capabilities"]
        [::std::mem::align_of::<transcribe_capabilities>() - 8usize];
    ["Offset of field: transcribe_capabilities::struct_size"]
        [::std::mem::offset_of!(transcribe_capabilities, struct_size) - 0usize];
    ["Offset of field: transcribe_capabilities::native_sample_rate"]
        [::std::mem::offset_of!(transcribe_capabilities, native_sample_rate) - 8usize];
    ["Offset of field: transcribe_capabilities::n_languages"]
        [::std::mem::offset_of!(transcribe_capabilities, n_languages) - 12usize];
    ["Offset of field: transcribe_capabilities::languages"]
        [::std::mem::offset_of!(transcribe_capabilities, languages) - 16usize];
    ["Offset of field: transcribe_capabilities::max_timestamp_kind"]
        [::std::mem::offset_of!(transcribe_capabilities, max_timestamp_kind) - 24usize];
    ["Offset of field: transcribe_capabilities::supports_language_detect"]
        [::std::mem::offset_of!(transcribe_capabilities, supports_language_detect) - 28usize];
    ["Offset of field: transcribe_capabilities::supports_translate"]
        [::std::mem::offset_of!(transcribe_capabilities, supports_translate) - 29usize];
    ["Offset of field: transcribe_capabilities::supports_streaming"]
        [::std::mem::offset_of!(transcribe_capabilities, supports_streaming) - 30usize];
    ["Offset of field: transcribe_capabilities::supports_spec_decode"]
        [::std::mem::offset_of!(transcribe_capabilities, supports_spec_decode) - 31usize];
    ["Offset of field: transcribe_capabilities::max_audio_ms"]
        [::std::mem::offset_of!(transcribe_capabilities, max_audio_ms) - 32usize];
    ["Offset of field: transcribe_capabilities::n_translate_target_languages"]
        [::std::mem::offset_of!(transcribe_capabilities, n_translate_target_languages) - 40usize];
    ["Offset of field: transcribe_capabilities::translate_target_languages"]
        [::std::mem::offset_of!(transcribe_capabilities, translate_target_languages) - 48usize];
};
unsafe extern "C" {
    pub fn transcribe_capabilities_init(out: *mut transcribe_capabilities);
}
unsafe extern "C" {
    pub fn transcribe_model_get_capabilities(
        model: *const transcribe_model,
        out_caps: *mut transcribe_capabilities,
    ) -> transcribe_status;
}
impl transcribe_feature {
    pub const TRANSCRIBE_FEATURE_INITIAL_PROMPT: transcribe_feature = transcribe_feature(0);
    pub const TRANSCRIBE_FEATURE_TEMPERATURE_FALLBACK: transcribe_feature = transcribe_feature(1);
    pub const TRANSCRIBE_FEATURE_LONG_FORM: transcribe_feature = transcribe_feature(2);
    pub const TRANSCRIBE_FEATURE_CANCELLATION: transcribe_feature = transcribe_feature(3);
    pub const TRANSCRIBE_FEATURE_PNC: transcribe_feature = transcribe_feature(4);
    pub const TRANSCRIBE_FEATURE_ITN: transcribe_feature = transcribe_feature(5);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_feature(pub ::std::os::raw::c_uint);
unsafe extern "C" {
    pub fn transcribe_model_supports(
        model: *const transcribe_model,
        feature: transcribe_feature,
    ) -> bool;
}
unsafe extern "C" {
    pub fn transcribe_model_arch_string(
        model: *const transcribe_model,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_model_variant_string(
        model: *const transcribe_model,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_model_backend(
        model: *const transcribe_model,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_model_meta_val_str(
        model: *const transcribe_model,
        key: *const ::std::os::raw::c_char,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_model_load_file(
        path: *const ::std::os::raw::c_char,
        params: *const transcribe_model_load_params,
        out_model: *mut *mut transcribe_model,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_model_free(model: *mut transcribe_model);
}
unsafe extern "C" {
    pub fn transcribe_session_init(
        model: *mut transcribe_model,
        params: *const transcribe_session_params,
        out_session: *mut *mut transcribe_session,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_session_free(session: *mut transcribe_session);
}
unsafe extern "C" {
    pub fn transcribe_open(
        path: *const ::std::os::raw::c_char,
        load_params: *const transcribe_model_load_params,
        session_params: *const transcribe_session_params,
        out_session: *mut *mut transcribe_session,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_close(session: *mut transcribe_session);
}
unsafe extern "C" {
    pub fn transcribe_get_model(session: *const transcribe_session) -> *const transcribe_model;
}
unsafe extern "C" {
    pub fn transcribe_run(
        session: *mut transcribe_session,
        pcm: *const f32,
        n_samples: ::std::os::raw::c_int,
        params: *const transcribe_run_params,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_run_batch(
        session: *mut transcribe_session,
        pcm: *const *const f32,
        n_samples: *const ::std::os::raw::c_int,
        n: ::std::os::raw::c_int,
        params: *const transcribe_run_params,
    ) -> transcribe_status;
}
pub type transcribe_abort_callback =
    ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> bool>;
unsafe extern "C" {
    pub fn transcribe_set_abort_callback(
        session: *mut transcribe_session,
        cb: transcribe_abort_callback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn transcribe_was_aborted(session: *const transcribe_session) -> bool;
}
unsafe extern "C" {
    pub fn transcribe_was_truncated(session: *const transcribe_session) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_session_limits {
    pub struct_size: u64,
    pub effective_n_ctx: i32,
    pub effective_max_audio_ms: i64,
    pub max_kv_bytes: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_session_limits"]
        [::std::mem::size_of::<transcribe_session_limits>() - 32usize];
    ["Alignment of transcribe_session_limits"]
        [::std::mem::align_of::<transcribe_session_limits>() - 8usize];
    ["Offset of field: transcribe_session_limits::struct_size"]
        [::std::mem::offset_of!(transcribe_session_limits, struct_size) - 0usize];
    ["Offset of field: transcribe_session_limits::effective_n_ctx"]
        [::std::mem::offset_of!(transcribe_session_limits, effective_n_ctx) - 8usize];
    ["Offset of field: transcribe_session_limits::effective_max_audio_ms"]
        [::std::mem::offset_of!(transcribe_session_limits, effective_max_audio_ms) - 16usize];
    ["Offset of field: transcribe_session_limits::max_kv_bytes"]
        [::std::mem::offset_of!(transcribe_session_limits, max_kv_bytes) - 24usize];
};
unsafe extern "C" {
    pub fn transcribe_session_limits_init(out: *mut transcribe_session_limits);
}
unsafe extern "C" {
    pub fn transcribe_session_get_limits(
        session: *const transcribe_session,
        out: *mut transcribe_session_limits,
    ) -> transcribe_status;
}
impl transcribe_stream_state {
    pub const TRANSCRIBE_STREAM_IDLE: transcribe_stream_state = transcribe_stream_state(0);
    pub const TRANSCRIBE_STREAM_ACTIVE: transcribe_stream_state = transcribe_stream_state(1);
    pub const TRANSCRIBE_STREAM_FINISHED: transcribe_stream_state = transcribe_stream_state(2);
    pub const TRANSCRIBE_STREAM_FAILED: transcribe_stream_state = transcribe_stream_state(3);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_stream_state(pub ::std::os::raw::c_uint);
impl transcribe_stream_commit_policy {
    pub const TRANSCRIBE_STREAM_COMMIT_AUTO: transcribe_stream_commit_policy =
        transcribe_stream_commit_policy(0);
    pub const TRANSCRIBE_STREAM_COMMIT_ON_FINALIZE: transcribe_stream_commit_policy =
        transcribe_stream_commit_policy(1);
    pub const TRANSCRIBE_STREAM_COMMIT_STABLE_PREFIX: transcribe_stream_commit_policy =
        transcribe_stream_commit_policy(2);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_stream_commit_policy(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_stream_params {
    pub struct_size: u64,
    pub family: *const transcribe_ext,
    pub commit_policy: transcribe_stream_commit_policy,
    pub stable_prefix_agreement_n: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_stream_params"]
        [::std::mem::size_of::<transcribe_stream_params>() - 24usize];
    ["Alignment of transcribe_stream_params"]
        [::std::mem::align_of::<transcribe_stream_params>() - 8usize];
    ["Offset of field: transcribe_stream_params::struct_size"]
        [::std::mem::offset_of!(transcribe_stream_params, struct_size) - 0usize];
    ["Offset of field: transcribe_stream_params::family"]
        [::std::mem::offset_of!(transcribe_stream_params, family) - 8usize];
    ["Offset of field: transcribe_stream_params::commit_policy"]
        [::std::mem::offset_of!(transcribe_stream_params, commit_policy) - 16usize];
    ["Offset of field: transcribe_stream_params::stable_prefix_agreement_n"]
        [::std::mem::offset_of!(transcribe_stream_params, stable_prefix_agreement_n) - 20usize];
};
unsafe extern "C" {
    pub fn transcribe_stream_params_init(params: *mut transcribe_stream_params);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_stream_update {
    pub struct_size: u64,
    pub result_changed: bool,
    pub is_final: bool,
    pub revision: i32,
    pub input_received_ms: i64,
    pub audio_committed_ms: i64,
    pub buffered_ms: i64,
    pub committed_changed: bool,
    pub tentative_changed: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_stream_update"]
        [::std::mem::size_of::<transcribe_stream_update>() - 48usize];
    ["Alignment of transcribe_stream_update"]
        [::std::mem::align_of::<transcribe_stream_update>() - 8usize];
    ["Offset of field: transcribe_stream_update::struct_size"]
        [::std::mem::offset_of!(transcribe_stream_update, struct_size) - 0usize];
    ["Offset of field: transcribe_stream_update::result_changed"]
        [::std::mem::offset_of!(transcribe_stream_update, result_changed) - 8usize];
    ["Offset of field: transcribe_stream_update::is_final"]
        [::std::mem::offset_of!(transcribe_stream_update, is_final) - 9usize];
    ["Offset of field: transcribe_stream_update::revision"]
        [::std::mem::offset_of!(transcribe_stream_update, revision) - 12usize];
    ["Offset of field: transcribe_stream_update::input_received_ms"]
        [::std::mem::offset_of!(transcribe_stream_update, input_received_ms) - 16usize];
    ["Offset of field: transcribe_stream_update::audio_committed_ms"]
        [::std::mem::offset_of!(transcribe_stream_update, audio_committed_ms) - 24usize];
    ["Offset of field: transcribe_stream_update::buffered_ms"]
        [::std::mem::offset_of!(transcribe_stream_update, buffered_ms) - 32usize];
    ["Offset of field: transcribe_stream_update::committed_changed"]
        [::std::mem::offset_of!(transcribe_stream_update, committed_changed) - 40usize];
    ["Offset of field: transcribe_stream_update::tentative_changed"]
        [::std::mem::offset_of!(transcribe_stream_update, tentative_changed) - 41usize];
};
unsafe extern "C" {
    pub fn transcribe_stream_update_init(out: *mut transcribe_stream_update);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_stream_text {
    pub struct_size: u64,
    pub full_text: *const ::std::os::raw::c_char,
    pub full_text_bytes: u64,
    pub committed_text: *const ::std::os::raw::c_char,
    pub committed_text_bytes: u64,
    pub tentative_text: *const ::std::os::raw::c_char,
    pub tentative_text_bytes: u64,
    pub raw_tentative_start_bytes: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_stream_text"][::std::mem::size_of::<transcribe_stream_text>() - 64usize];
    ["Alignment of transcribe_stream_text"]
        [::std::mem::align_of::<transcribe_stream_text>() - 8usize];
    ["Offset of field: transcribe_stream_text::struct_size"]
        [::std::mem::offset_of!(transcribe_stream_text, struct_size) - 0usize];
    ["Offset of field: transcribe_stream_text::full_text"]
        [::std::mem::offset_of!(transcribe_stream_text, full_text) - 8usize];
    ["Offset of field: transcribe_stream_text::full_text_bytes"]
        [::std::mem::offset_of!(transcribe_stream_text, full_text_bytes) - 16usize];
    ["Offset of field: transcribe_stream_text::committed_text"]
        [::std::mem::offset_of!(transcribe_stream_text, committed_text) - 24usize];
    ["Offset of field: transcribe_stream_text::committed_text_bytes"]
        [::std::mem::offset_of!(transcribe_stream_text, committed_text_bytes) - 32usize];
    ["Offset of field: transcribe_stream_text::tentative_text"]
        [::std::mem::offset_of!(transcribe_stream_text, tentative_text) - 40usize];
    ["Offset of field: transcribe_stream_text::tentative_text_bytes"]
        [::std::mem::offset_of!(transcribe_stream_text, tentative_text_bytes) - 48usize];
    ["Offset of field: transcribe_stream_text::raw_tentative_start_bytes"]
        [::std::mem::offset_of!(transcribe_stream_text, raw_tentative_start_bytes) - 56usize];
};
unsafe extern "C" {
    pub fn transcribe_stream_text_init(out: *mut transcribe_stream_text);
}
unsafe extern "C" {
    pub fn transcribe_stream_get_text(
        session: *const transcribe_session,
        out: *mut transcribe_stream_text,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_stream_begin(
        session: *mut transcribe_session,
        run_params: *const transcribe_run_params,
        stream_params: *const transcribe_stream_params,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_stream_feed(
        session: *mut transcribe_session,
        pcm: *const f32,
        n_samples: ::std::os::raw::c_int,
        update: *mut transcribe_stream_update,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_stream_finalize(
        session: *mut transcribe_session,
        update: *mut transcribe_stream_update,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_stream_reset(session: *mut transcribe_session);
}
unsafe extern "C" {
    pub fn transcribe_stream_get_state(
        session: *const transcribe_session,
    ) -> transcribe_stream_state;
}
unsafe extern "C" {
    pub fn transcribe_stream_revision(session: *const transcribe_session) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_stream_n_committed_segments(
        session: *const transcribe_session,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_stream_n_committed_words(
        session: *const transcribe_session,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_stream_n_committed_tokens(
        session: *const transcribe_session,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_stream_last_status(session: *const transcribe_session) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_tokenize(
        model: *const transcribe_model,
        text: *const ::std::os::raw::c_char,
        tokens: *mut i32,
        n_max: usize,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_timings {
    pub struct_size: u64,
    pub load_ms: f32,
    pub mel_ms: f32,
    pub encode_ms: f32,
    pub decode_ms: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_timings"][::std::mem::size_of::<transcribe_timings>() - 24usize];
    ["Alignment of transcribe_timings"][::std::mem::align_of::<transcribe_timings>() - 8usize];
    ["Offset of field: transcribe_timings::struct_size"]
        [::std::mem::offset_of!(transcribe_timings, struct_size) - 0usize];
    ["Offset of field: transcribe_timings::load_ms"]
        [::std::mem::offset_of!(transcribe_timings, load_ms) - 8usize];
    ["Offset of field: transcribe_timings::mel_ms"]
        [::std::mem::offset_of!(transcribe_timings, mel_ms) - 12usize];
    ["Offset of field: transcribe_timings::encode_ms"]
        [::std::mem::offset_of!(transcribe_timings, encode_ms) - 16usize];
    ["Offset of field: transcribe_timings::decode_ms"]
        [::std::mem::offset_of!(transcribe_timings, decode_ms) - 20usize];
};
unsafe extern "C" {
    pub fn transcribe_timings_init(out: *mut transcribe_timings);
}
unsafe extern "C" {
    pub fn transcribe_get_timings(
        session: *const transcribe_session,
        out_timings: *mut transcribe_timings,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_print_timings(session: *const transcribe_session);
}
unsafe extern "C" {
    pub fn transcribe_reset_timings(session: *mut transcribe_session);
}
unsafe extern "C" {
    pub fn transcribe_full_text(
        session: *const transcribe_session,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_returned_timestamp_kind(
        session: *const transcribe_session,
    ) -> transcribe_timestamp_kind;
}
unsafe extern "C" {
    pub fn transcribe_n_segments(session: *const transcribe_session) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_n_words(session: *const transcribe_session) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_n_tokens(session: *const transcribe_session) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_detected_language(
        session: *const transcribe_session,
    ) -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_segment {
    pub struct_size: u64,
    pub t0_ms: i64,
    pub t1_ms: i64,
    pub first_word: ::std::os::raw::c_int,
    pub n_words: ::std::os::raw::c_int,
    pub first_token: ::std::os::raw::c_int,
    pub n_tokens: ::std::os::raw::c_int,
    pub text: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_segment"][::std::mem::size_of::<transcribe_segment>() - 48usize];
    ["Alignment of transcribe_segment"][::std::mem::align_of::<transcribe_segment>() - 8usize];
    ["Offset of field: transcribe_segment::struct_size"]
        [::std::mem::offset_of!(transcribe_segment, struct_size) - 0usize];
    ["Offset of field: transcribe_segment::t0_ms"]
        [::std::mem::offset_of!(transcribe_segment, t0_ms) - 8usize];
    ["Offset of field: transcribe_segment::t1_ms"]
        [::std::mem::offset_of!(transcribe_segment, t1_ms) - 16usize];
    ["Offset of field: transcribe_segment::first_word"]
        [::std::mem::offset_of!(transcribe_segment, first_word) - 24usize];
    ["Offset of field: transcribe_segment::n_words"]
        [::std::mem::offset_of!(transcribe_segment, n_words) - 28usize];
    ["Offset of field: transcribe_segment::first_token"]
        [::std::mem::offset_of!(transcribe_segment, first_token) - 32usize];
    ["Offset of field: transcribe_segment::n_tokens"]
        [::std::mem::offset_of!(transcribe_segment, n_tokens) - 36usize];
    ["Offset of field: transcribe_segment::text"]
        [::std::mem::offset_of!(transcribe_segment, text) - 40usize];
};
unsafe extern "C" {
    pub fn transcribe_segment_init(out: *mut transcribe_segment);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_word {
    pub struct_size: u64,
    pub t0_ms: i64,
    pub t1_ms: i64,
    pub seg_index: ::std::os::raw::c_int,
    pub first_token: ::std::os::raw::c_int,
    pub n_tokens: ::std::os::raw::c_int,
    pub text: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_word"][::std::mem::size_of::<transcribe_word>() - 48usize];
    ["Alignment of transcribe_word"][::std::mem::align_of::<transcribe_word>() - 8usize];
    ["Offset of field: transcribe_word::struct_size"]
        [::std::mem::offset_of!(transcribe_word, struct_size) - 0usize];
    ["Offset of field: transcribe_word::t0_ms"]
        [::std::mem::offset_of!(transcribe_word, t0_ms) - 8usize];
    ["Offset of field: transcribe_word::t1_ms"]
        [::std::mem::offset_of!(transcribe_word, t1_ms) - 16usize];
    ["Offset of field: transcribe_word::seg_index"]
        [::std::mem::offset_of!(transcribe_word, seg_index) - 24usize];
    ["Offset of field: transcribe_word::first_token"]
        [::std::mem::offset_of!(transcribe_word, first_token) - 28usize];
    ["Offset of field: transcribe_word::n_tokens"]
        [::std::mem::offset_of!(transcribe_word, n_tokens) - 32usize];
    ["Offset of field: transcribe_word::text"]
        [::std::mem::offset_of!(transcribe_word, text) - 40usize];
};
unsafe extern "C" {
    pub fn transcribe_word_init(out: *mut transcribe_word);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_token {
    pub struct_size: u64,
    pub id: ::std::os::raw::c_int,
    pub p: f32,
    pub t0_ms: i64,
    pub t1_ms: i64,
    pub seg_index: ::std::os::raw::c_int,
    pub word_index: ::std::os::raw::c_int,
    pub text: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_token"][::std::mem::size_of::<transcribe_token>() - 48usize];
    ["Alignment of transcribe_token"][::std::mem::align_of::<transcribe_token>() - 8usize];
    ["Offset of field: transcribe_token::struct_size"]
        [::std::mem::offset_of!(transcribe_token, struct_size) - 0usize];
    ["Offset of field: transcribe_token::id"]
        [::std::mem::offset_of!(transcribe_token, id) - 8usize];
    ["Offset of field: transcribe_token::p"][::std::mem::offset_of!(transcribe_token, p) - 12usize];
    ["Offset of field: transcribe_token::t0_ms"]
        [::std::mem::offset_of!(transcribe_token, t0_ms) - 16usize];
    ["Offset of field: transcribe_token::t1_ms"]
        [::std::mem::offset_of!(transcribe_token, t1_ms) - 24usize];
    ["Offset of field: transcribe_token::seg_index"]
        [::std::mem::offset_of!(transcribe_token, seg_index) - 32usize];
    ["Offset of field: transcribe_token::word_index"]
        [::std::mem::offset_of!(transcribe_token, word_index) - 36usize];
    ["Offset of field: transcribe_token::text"]
        [::std::mem::offset_of!(transcribe_token, text) - 40usize];
};
unsafe extern "C" {
    pub fn transcribe_token_init(out: *mut transcribe_token);
}
unsafe extern "C" {
    pub fn transcribe_get_segment(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_segment,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_get_word(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_word,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_get_token(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_token,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_batch_n_results(session: *const transcribe_session) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_batch_status(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_batch_full_text(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_batch_returned_timestamp_kind(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> transcribe_timestamp_kind;
}
unsafe extern "C" {
    pub fn transcribe_batch_detected_language(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_batch_n_segments(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_batch_n_words(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_batch_n_tokens(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_batch_get_segment(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        j: ::std::os::raw::c_int,
        out: *mut transcribe_segment,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_batch_get_word(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        j: ::std::os::raw::c_int,
        out: *mut transcribe_word,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_batch_get_token(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        j: ::std::os::raw::c_int,
        out: *mut transcribe_token,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_batch_get_timings(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_timings,
    ) -> transcribe_status;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_moonshine_streaming_stream_ext {
    pub ext: transcribe_ext,
    pub min_decode_interval_ms: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_moonshine_streaming_stream_ext"]
        [::std::mem::size_of::<transcribe_moonshine_streaming_stream_ext>() - 24usize];
    ["Alignment of transcribe_moonshine_streaming_stream_ext"]
        [::std::mem::align_of::<transcribe_moonshine_streaming_stream_ext>() - 8usize];
    ["Offset of field: transcribe_moonshine_streaming_stream_ext::ext"]
        [::std::mem::offset_of!(transcribe_moonshine_streaming_stream_ext, ext) - 0usize];
    ["Offset of field: transcribe_moonshine_streaming_stream_ext::min_decode_interval_ms"][::std::mem::offset_of!(
        transcribe_moonshine_streaming_stream_ext,
        min_decode_interval_ms
    )
        - 16usize];
};
unsafe extern "C" {
    pub fn transcribe_moonshine_streaming_stream_ext_init(
        ext: *mut transcribe_moonshine_streaming_stream_ext,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_parakeet_stream_ext {
    pub ext: transcribe_ext,
    pub att_context_right: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_parakeet_stream_ext"]
        [::std::mem::size_of::<transcribe_parakeet_stream_ext>() - 24usize];
    ["Alignment of transcribe_parakeet_stream_ext"]
        [::std::mem::align_of::<transcribe_parakeet_stream_ext>() - 8usize];
    ["Offset of field: transcribe_parakeet_stream_ext::ext"]
        [::std::mem::offset_of!(transcribe_parakeet_stream_ext, ext) - 0usize];
    ["Offset of field: transcribe_parakeet_stream_ext::att_context_right"]
        [::std::mem::offset_of!(transcribe_parakeet_stream_ext, att_context_right) - 16usize];
};
unsafe extern "C" {
    pub fn transcribe_parakeet_stream_ext_init(ext: *mut transcribe_parakeet_stream_ext);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_parakeet_buffered_stream_ext {
    pub ext: transcribe_ext,
    pub left_ms: i32,
    pub chunk_ms: i32,
    pub right_ms: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_parakeet_buffered_stream_ext"]
        [::std::mem::size_of::<transcribe_parakeet_buffered_stream_ext>() - 32usize];
    ["Alignment of transcribe_parakeet_buffered_stream_ext"]
        [::std::mem::align_of::<transcribe_parakeet_buffered_stream_ext>() - 8usize];
    ["Offset of field: transcribe_parakeet_buffered_stream_ext::ext"]
        [::std::mem::offset_of!(transcribe_parakeet_buffered_stream_ext, ext) - 0usize];
    ["Offset of field: transcribe_parakeet_buffered_stream_ext::left_ms"]
        [::std::mem::offset_of!(transcribe_parakeet_buffered_stream_ext, left_ms) - 16usize];
    ["Offset of field: transcribe_parakeet_buffered_stream_ext::chunk_ms"]
        [::std::mem::offset_of!(transcribe_parakeet_buffered_stream_ext, chunk_ms) - 20usize];
    ["Offset of field: transcribe_parakeet_buffered_stream_ext::right_ms"]
        [::std::mem::offset_of!(transcribe_parakeet_buffered_stream_ext, right_ms) - 24usize];
};
unsafe extern "C" {
    pub fn transcribe_parakeet_buffered_stream_ext_init(
        ext: *mut transcribe_parakeet_buffered_stream_ext,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_voxtral_realtime_stream_ext {
    pub ext: transcribe_ext,
    pub num_delay_tokens: i32,
    pub min_decode_interval_ms: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_voxtral_realtime_stream_ext"]
        [::std::mem::size_of::<transcribe_voxtral_realtime_stream_ext>() - 24usize];
    ["Alignment of transcribe_voxtral_realtime_stream_ext"]
        [::std::mem::align_of::<transcribe_voxtral_realtime_stream_ext>() - 8usize];
    ["Offset of field: transcribe_voxtral_realtime_stream_ext::ext"]
        [::std::mem::offset_of!(transcribe_voxtral_realtime_stream_ext, ext) - 0usize];
    ["Offset of field: transcribe_voxtral_realtime_stream_ext::num_delay_tokens"][::std::mem::offset_of!(
        transcribe_voxtral_realtime_stream_ext,
        num_delay_tokens
    ) - 16usize];
    ["Offset of field: transcribe_voxtral_realtime_stream_ext::min_decode_interval_ms"][::std::mem::offset_of!(
        transcribe_voxtral_realtime_stream_ext,
        min_decode_interval_ms
    )
        - 20usize];
};
unsafe extern "C" {
    pub fn transcribe_voxtral_realtime_stream_ext_init(
        ext: *mut transcribe_voxtral_realtime_stream_ext,
    );
}
impl transcribe_whisper_prompt_condition {
    pub const TRANSCRIBE_WHISPER_PROMPT_FIRST_SEGMENT: transcribe_whisper_prompt_condition =
        transcribe_whisper_prompt_condition(0);
    pub const TRANSCRIBE_WHISPER_PROMPT_ALL_SEGMENTS: transcribe_whisper_prompt_condition =
        transcribe_whisper_prompt_condition(1);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_whisper_prompt_condition(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_whisper_run_ext {
    pub ext: transcribe_ext,
    pub initial_prompt: *const ::std::os::raw::c_char,
    pub prompt_tokens: *const i32,
    pub n_prompt_tokens: usize,
    pub prompt_condition: transcribe_whisper_prompt_condition,
    pub condition_on_prev_tokens: bool,
    pub max_prev_context_tokens: i32,
    pub temperature: f32,
    pub temperature_inc: f32,
    pub compression_ratio_thold: f32,
    pub logprob_thold: f32,
    pub no_speech_thold: f32,
    pub seed: u32,
    pub max_initial_timestamp: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_whisper_run_ext"]
        [::std::mem::size_of::<transcribe_whisper_run_ext>() - 80usize];
    ["Alignment of transcribe_whisper_run_ext"]
        [::std::mem::align_of::<transcribe_whisper_run_ext>() - 8usize];
    ["Offset of field: transcribe_whisper_run_ext::ext"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, ext) - 0usize];
    ["Offset of field: transcribe_whisper_run_ext::initial_prompt"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, initial_prompt) - 16usize];
    ["Offset of field: transcribe_whisper_run_ext::prompt_tokens"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, prompt_tokens) - 24usize];
    ["Offset of field: transcribe_whisper_run_ext::n_prompt_tokens"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, n_prompt_tokens) - 32usize];
    ["Offset of field: transcribe_whisper_run_ext::prompt_condition"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, prompt_condition) - 40usize];
    ["Offset of field: transcribe_whisper_run_ext::condition_on_prev_tokens"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, condition_on_prev_tokens) - 44usize];
    ["Offset of field: transcribe_whisper_run_ext::max_prev_context_tokens"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, max_prev_context_tokens) - 48usize];
    ["Offset of field: transcribe_whisper_run_ext::temperature"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, temperature) - 52usize];
    ["Offset of field: transcribe_whisper_run_ext::temperature_inc"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, temperature_inc) - 56usize];
    ["Offset of field: transcribe_whisper_run_ext::compression_ratio_thold"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, compression_ratio_thold) - 60usize];
    ["Offset of field: transcribe_whisper_run_ext::logprob_thold"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, logprob_thold) - 64usize];
    ["Offset of field: transcribe_whisper_run_ext::no_speech_thold"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, no_speech_thold) - 68usize];
    ["Offset of field: transcribe_whisper_run_ext::seed"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, seed) - 72usize];
    ["Offset of field: transcribe_whisper_run_ext::max_initial_timestamp"]
        [::std::mem::offset_of!(transcribe_whisper_run_ext, max_initial_timestamp) - 76usize];
};
unsafe extern "C" {
    pub fn transcribe_whisper_run_ext_init(ext: *mut transcribe_whisper_run_ext);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_whisper_chunk_trace {
    pub struct_size: u64,
    pub t0_ms: i64,
    pub t1_ms: i64,
    pub temperature_used: f32,
    pub compression_ratio: f32,
    pub avg_logprob: f32,
    pub no_speech_prob: f32,
    pub no_speech_triggered: bool,
    pub n_fallbacks: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_whisper_chunk_trace"]
        [::std::mem::size_of::<transcribe_whisper_chunk_trace>() - 48usize];
    ["Alignment of transcribe_whisper_chunk_trace"]
        [::std::mem::align_of::<transcribe_whisper_chunk_trace>() - 8usize];
    ["Offset of field: transcribe_whisper_chunk_trace::struct_size"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, struct_size) - 0usize];
    ["Offset of field: transcribe_whisper_chunk_trace::t0_ms"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, t0_ms) - 8usize];
    ["Offset of field: transcribe_whisper_chunk_trace::t1_ms"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, t1_ms) - 16usize];
    ["Offset of field: transcribe_whisper_chunk_trace::temperature_used"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, temperature_used) - 24usize];
    ["Offset of field: transcribe_whisper_chunk_trace::compression_ratio"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, compression_ratio) - 28usize];
    ["Offset of field: transcribe_whisper_chunk_trace::avg_logprob"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, avg_logprob) - 32usize];
    ["Offset of field: transcribe_whisper_chunk_trace::no_speech_prob"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, no_speech_prob) - 36usize];
    ["Offset of field: transcribe_whisper_chunk_trace::no_speech_triggered"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, no_speech_triggered) - 40usize];
    ["Offset of field: transcribe_whisper_chunk_trace::n_fallbacks"]
        [::std::mem::offset_of!(transcribe_whisper_chunk_trace, n_fallbacks) - 44usize];
};
unsafe extern "C" {
    pub fn transcribe_whisper_chunk_trace_init(out: *mut transcribe_whisper_chunk_trace);
}
unsafe extern "C" {
    pub fn transcribe_get_whisper_chunk_count(
        session: *const transcribe_session,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_get_whisper_chunk_trace(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        out_trace: *mut transcribe_whisper_chunk_trace,
    ) -> transcribe_status;
}