transcribe-cpp-sys 0.4.1

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
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
// @generated by `cargo xtask bindgen` from include/transcribe/extensions.h
// DO NOT EDIT BY HAND. Regenerate: `cargo xtask bindgen`.
// Pinned to include/transcribe.abihash = f99ad4169374b8f3

/// 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 = "f99ad4169374b8f3";

/* automatically generated by rust-bindgen 0.72.1 */

pub const TRANSCRIBE_BACKEND_MASK_CPU: u32 = 1;
pub const TRANSCRIBE_BACKEND_MASK_METAL: u32 = 2;
pub const TRANSCRIBE_BACKEND_MASK_VULKAN: u32 = 4;
pub const TRANSCRIBE_BACKEND_MASK_CUDA: u32 = 8;
pub const TRANSCRIBE_BACKEND_MASK_ROCM: u32 = 16;
pub const TRANSCRIBE_BACKEND_MASK_OTHER: u32 = 2147483648;
pub const TRANSCRIBE_BACKEND_MASK_ALL: u32 = 4294967295;
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_SORTFORMER_DIARIZE: u32 = 1380206163;
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);
    pub const TRANSCRIBE_ERR_OUTPUT_REPETITION: transcribe_status = transcribe_status(19);
    pub const TRANSCRIBE_ERR_UNSUPPORTED_ROLE: transcribe_status = transcribe_status(20);
    pub const TRANSCRIBE_ERR_INPUT_TOO_SHORT: transcribe_status = transcribe_status(21);
}
#[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_DEVICE_INFO: transcribe_abi_struct = transcribe_abi_struct(13);
    pub const TRANSCRIBE_ABI_SPEAKER_SEGMENT: transcribe_abi_struct = transcribe_abi_struct(14);
    pub const TRANSCRIBE_ABI_BACKEND_INIT_PARAMS: transcribe_abi_struct = transcribe_abi_struct(15);
    pub const TRANSCRIBE_ABI_DIARIZE_INFO: transcribe_abi_struct = transcribe_abi_struct(16);
    pub const TRANSCRIBE_ABI_DIARIZE_SESSION_PARAMS: transcribe_abi_struct =
        transcribe_abi_struct(17);
    pub const TRANSCRIBE_ABI_DIARIZE_PARAMS: transcribe_abi_struct = transcribe_abi_struct(18);
    pub const TRANSCRIBE_ABI_LANGID_INFO: transcribe_abi_struct = transcribe_abi_struct(19);
    pub const TRANSCRIBE_ABI_LANGID_SESSION_PARAMS: transcribe_abi_struct =
        transcribe_abi_struct(20);
    pub const TRANSCRIBE_ABI_LANGID_PARAMS: transcribe_abi_struct = transcribe_abi_struct(21);
    pub const TRANSCRIBE_ABI_LANGID_RESULT: transcribe_abi_struct = transcribe_abi_struct(22);
    pub const TRANSCRIBE_ABI_LANGID_CANDIDATE: transcribe_abi_struct = transcribe_abi_struct(23);
    pub const TRANSCRIBE_ABI_VAD_INFO: transcribe_abi_struct = transcribe_abi_struct(24);
    pub const TRANSCRIBE_ABI_VAD_SESSION_PARAMS: transcribe_abi_struct = transcribe_abi_struct(25);
    pub const TRANSCRIBE_ABI_VAD_PARAMS: transcribe_abi_struct = transcribe_abi_struct(26);
    pub const TRANSCRIBE_ABI_VAD_RESULT: transcribe_abi_struct = transcribe_abi_struct(27);
    pub const TRANSCRIBE_ABI_VAD_SEGMENT: transcribe_abi_struct = transcribe_abi_struct(28);
}
#[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);
    pub const TRANSCRIBE_TASK_INSTRUCT: transcribe_task = transcribe_task(2);
}
#[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);
impl transcribe_diarize_mode {
    pub const TRANSCRIBE_DIARIZE_MODE_DEFAULT: transcribe_diarize_mode = transcribe_diarize_mode(0);
    pub const TRANSCRIBE_DIARIZE_MODE_OFF: transcribe_diarize_mode = transcribe_diarize_mode(1);
    pub const TRANSCRIBE_DIARIZE_MODE_ON: transcribe_diarize_mode = transcribe_diarize_mode(2);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_diarize_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);
    pub const TRANSCRIBE_EXT_SLOT_DIARIZE_RUN: transcribe_ext_slot = transcribe_ext_slot(2);
}
#[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);
    pub const TRANSCRIBE_BACKEND_ROCM: transcribe_backend_request = transcribe_backend_request(6);
}
#[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;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_backend_init_params {
    pub struct_size: u64,
    pub artifact_dir: *const ::std::os::raw::c_char,
    pub allowed_backends: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_backend_init_params"]
        [::std::mem::size_of::<transcribe_backend_init_params>() - 24usize];
    ["Alignment of transcribe_backend_init_params"]
        [::std::mem::align_of::<transcribe_backend_init_params>() - 8usize];
    ["Offset of field: transcribe_backend_init_params::struct_size"]
        [::std::mem::offset_of!(transcribe_backend_init_params, struct_size) - 0usize];
    ["Offset of field: transcribe_backend_init_params::artifact_dir"]
        [::std::mem::offset_of!(transcribe_backend_init_params, artifact_dir) - 8usize];
    ["Offset of field: transcribe_backend_init_params::allowed_backends"]
        [::std::mem::offset_of!(transcribe_backend_init_params, allowed_backends) - 16usize];
};
unsafe extern "C" {
    pub fn transcribe_backend_init_params_init(p: *mut transcribe_backend_init_params);
}
unsafe extern "C" {
    pub fn transcribe_init_backends_ex(
        params: *const transcribe_backend_init_params,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_allowed_backends() -> u32;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_device {
    _unused: [u8; 0],
}
pub type transcribe_device_t = *mut transcribe_device;
unsafe extern "C" {
    pub fn transcribe_device_count() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_device_get(index: ::std::os::raw::c_int) -> transcribe_device_t;
}
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_device_info {
    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_device_info"][::std::mem::size_of::<transcribe_device_info>() - 64usize];
    ["Alignment of transcribe_device_info"]
        [::std::mem::align_of::<transcribe_device_info>() - 8usize];
    ["Offset of field: transcribe_device_info::struct_size"]
        [::std::mem::offset_of!(transcribe_device_info, struct_size) - 0usize];
    ["Offset of field: transcribe_device_info::name"]
        [::std::mem::offset_of!(transcribe_device_info, name) - 8usize];
    ["Offset of field: transcribe_device_info::description"]
        [::std::mem::offset_of!(transcribe_device_info, description) - 16usize];
    ["Offset of field: transcribe_device_info::kind"]
        [::std::mem::offset_of!(transcribe_device_info, kind) - 24usize];
    ["Offset of field: transcribe_device_info::device_id"]
        [::std::mem::offset_of!(transcribe_device_info, device_id) - 32usize];
    ["Offset of field: transcribe_device_info::memory_total"]
        [::std::mem::offset_of!(transcribe_device_info, memory_total) - 40usize];
    ["Offset of field: transcribe_device_info::memory_free"]
        [::std::mem::offset_of!(transcribe_device_info, memory_free) - 48usize];
    ["Offset of field: transcribe_device_info::device_type"]
        [::std::mem::offset_of!(transcribe_device_info, device_type) - 56usize];
};
unsafe extern "C" {
    pub fn transcribe_device_info_init(p: *mut transcribe_device_info);
}
unsafe extern "C" {
    pub fn transcribe_device_get_info(
        device: transcribe_device_t,
        out: *mut transcribe_device_info,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_backend_available(kind: transcribe_backend_request) -> bool;
}
unsafe extern "C" {
    pub fn transcribe_model_device(model: *const transcribe_model) -> transcribe_device_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_model_load_params {
    pub struct_size: u64,
    pub backend: transcribe_backend_request,
    pub device: transcribe_device_t,
    pub no_mmap: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_model_load_params"]
        [::std::mem::size_of::<transcribe_model_load_params>() - 32usize];
    ["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::device"]
        [::std::mem::offset_of!(transcribe_model_load_params, device) - 16usize];
    ["Offset of field: transcribe_model_load_params::no_mmap"]
        [::std::mem::offset_of!(transcribe_model_load_params, no_mmap) - 24usize];
};
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 diarize: transcribe_diarize_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,
    pub vocabulary: *const *const ::std::os::raw::c_char,
    pub n_vocabulary: i32,
    pub prompt: *const ::std::os::raw::c_char,
    pub prefix: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_run_params"][::std::mem::size_of::<transcribe_run_params>() - 104usize];
    ["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::diarize"]
        [::std::mem::offset_of!(transcribe_run_params, diarize) - 24usize];
    ["Offset of field: transcribe_run_params::language"]
        [::std::mem::offset_of!(transcribe_run_params, language) - 32usize];
    ["Offset of field: transcribe_run_params::target_language"]
        [::std::mem::offset_of!(transcribe_run_params, target_language) - 40usize];
    ["Offset of field: transcribe_run_params::keep_special_tags"]
        [::std::mem::offset_of!(transcribe_run_params, keep_special_tags) - 48usize];
    ["Offset of field: transcribe_run_params::family"]
        [::std::mem::offset_of!(transcribe_run_params, family) - 56usize];
    ["Offset of field: transcribe_run_params::spec_k_drafts"]
        [::std::mem::offset_of!(transcribe_run_params, spec_k_drafts) - 64usize];
    ["Offset of field: transcribe_run_params::vocabulary"]
        [::std::mem::offset_of!(transcribe_run_params, vocabulary) - 72usize];
    ["Offset of field: transcribe_run_params::n_vocabulary"]
        [::std::mem::offset_of!(transcribe_run_params, n_vocabulary) - 80usize];
    ["Offset of field: transcribe_run_params::prompt"]
        [::std::mem::offset_of!(transcribe_run_params, prompt) - 88usize];
    ["Offset of field: transcribe_run_params::prefix"]
        [::std::mem::offset_of!(transcribe_run_params, prefix) - 96usize];
};
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);
}
impl transcribe_role {
    pub const TRANSCRIBE_ROLE_ASR: transcribe_role = transcribe_role(1);
    pub const TRANSCRIBE_ROLE_DIARIZE: transcribe_role = transcribe_role(2);
    pub const TRANSCRIBE_ROLE_LANGID: transcribe_role = transcribe_role(4);
    pub const TRANSCRIBE_ROLE_VAD: transcribe_role = transcribe_role(8);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_role(pub ::std::os::raw::c_uint);
unsafe extern "C" {
    pub fn transcribe_model_roles(model: *const transcribe_model) -> u32;
}
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);
    pub const TRANSCRIBE_FEATURE_DIARIZATION: transcribe_feature = transcribe_feature(6);
    pub const TRANSCRIBE_FEATURE_VOCABULARY: transcribe_feature = transcribe_feature(7);
    pub const TRANSCRIBE_FEATURE_CONTEXT_PROMPT: transcribe_feature = transcribe_feature(8);
    pub const TRANSCRIBE_FEATURE_INSTRUCT: transcribe_feature = transcribe_feature(9);
    pub const TRANSCRIBE_FEATURE_TRANSCRIPT_PREFIX: transcribe_feature = transcribe_feature(10);
}
#[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_raw_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,
    pub speaker_id: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_segment"][::std::mem::size_of::<transcribe_segment>() - 56usize];
    ["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];
    ["Offset of field: transcribe_segment::speaker_id"]
        [::std::mem::offset_of!(transcribe_segment, speaker_id) - 48usize];
};
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;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_speaker_segment {
    pub struct_size: u64,
    pub t0_ms: i64,
    pub t1_ms: i64,
    pub speaker_id: i32,
    pub p: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_speaker_segment"]
        [::std::mem::size_of::<transcribe_speaker_segment>() - 32usize];
    ["Alignment of transcribe_speaker_segment"]
        [::std::mem::align_of::<transcribe_speaker_segment>() - 8usize];
    ["Offset of field: transcribe_speaker_segment::struct_size"]
        [::std::mem::offset_of!(transcribe_speaker_segment, struct_size) - 0usize];
    ["Offset of field: transcribe_speaker_segment::t0_ms"]
        [::std::mem::offset_of!(transcribe_speaker_segment, t0_ms) - 8usize];
    ["Offset of field: transcribe_speaker_segment::t1_ms"]
        [::std::mem::offset_of!(transcribe_speaker_segment, t1_ms) - 16usize];
    ["Offset of field: transcribe_speaker_segment::speaker_id"]
        [::std::mem::offset_of!(transcribe_speaker_segment, speaker_id) - 24usize];
    ["Offset of field: transcribe_speaker_segment::p"]
        [::std::mem::offset_of!(transcribe_speaker_segment, p) - 28usize];
};
unsafe extern "C" {
    pub fn transcribe_speaker_segment_init(out: *mut transcribe_speaker_segment);
}
unsafe extern "C" {
    pub fn transcribe_n_speaker_segments(
        session: *const transcribe_session,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_get_speaker_segment(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_speaker_segment,
    ) -> 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_raw_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_n_speaker_segments(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_batch_get_speaker_segment(
        session: *const transcribe_session,
        i: ::std::os::raw::c_int,
        j: ::std::os::raw::c_int,
        out: *mut transcribe_speaker_segment,
    ) -> 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_diarize_session {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_diarize_info {
    pub struct_size: u64,
    pub sample_rate: i32,
    pub max_speakers: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_diarize_info"][::std::mem::size_of::<transcribe_diarize_info>() - 16usize];
    ["Alignment of transcribe_diarize_info"]
        [::std::mem::align_of::<transcribe_diarize_info>() - 8usize];
    ["Offset of field: transcribe_diarize_info::struct_size"]
        [::std::mem::offset_of!(transcribe_diarize_info, struct_size) - 0usize];
    ["Offset of field: transcribe_diarize_info::sample_rate"]
        [::std::mem::offset_of!(transcribe_diarize_info, sample_rate) - 8usize];
    ["Offset of field: transcribe_diarize_info::max_speakers"]
        [::std::mem::offset_of!(transcribe_diarize_info, max_speakers) - 12usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_diarize_session_params {
    pub struct_size: u64,
    pub n_threads: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_diarize_session_params"]
        [::std::mem::size_of::<transcribe_diarize_session_params>() - 16usize];
    ["Alignment of transcribe_diarize_session_params"]
        [::std::mem::align_of::<transcribe_diarize_session_params>() - 8usize];
    ["Offset of field: transcribe_diarize_session_params::struct_size"]
        [::std::mem::offset_of!(transcribe_diarize_session_params, struct_size) - 0usize];
    ["Offset of field: transcribe_diarize_session_params::n_threads"]
        [::std::mem::offset_of!(transcribe_diarize_session_params, n_threads) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_diarize_params {
    pub struct_size: u64,
    pub family: *const transcribe_ext,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_diarize_params"]
        [::std::mem::size_of::<transcribe_diarize_params>() - 16usize];
    ["Alignment of transcribe_diarize_params"]
        [::std::mem::align_of::<transcribe_diarize_params>() - 8usize];
    ["Offset of field: transcribe_diarize_params::struct_size"]
        [::std::mem::offset_of!(transcribe_diarize_params, struct_size) - 0usize];
    ["Offset of field: transcribe_diarize_params::family"]
        [::std::mem::offset_of!(transcribe_diarize_params, family) - 8usize];
};
unsafe extern "C" {
    pub fn transcribe_diarize_info_init(out: *mut transcribe_diarize_info);
}
unsafe extern "C" {
    pub fn transcribe_diarize_session_params_init(params: *mut transcribe_diarize_session_params);
}
unsafe extern "C" {
    pub fn transcribe_diarize_params_init(params: *mut transcribe_diarize_params);
}
unsafe extern "C" {
    pub fn transcribe_diarize_get_info(
        model: *const transcribe_model,
        out: *mut transcribe_diarize_info,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_diarize_session_init(
        model: *mut transcribe_model,
        params: *const transcribe_diarize_session_params,
        out_session: *mut *mut transcribe_diarize_session,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_diarize_session_free(session: *mut transcribe_diarize_session);
}
unsafe extern "C" {
    pub fn transcribe_diarize_set_abort_callback(
        session: *mut transcribe_diarize_session,
        cb: transcribe_abort_callback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn transcribe_diarize_run(
        session: *mut transcribe_diarize_session,
        pcm: *const f32,
        n_samples: ::std::os::raw::c_int,
        params: *const transcribe_diarize_params,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_diarize_n_segments(
        session: *const transcribe_diarize_session,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn transcribe_diarize_get_segment(
        session: *const transcribe_diarize_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_speaker_segment,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_diarize_get_timings(
        session: *const transcribe_diarize_session,
        out: *mut transcribe_timings,
    ) -> transcribe_status;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_langid_session {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_langid_info {
    pub struct_size: u64,
    pub sample_rate: i32,
    pub n_labels: i32,
    pub min_audio_ms: i32,
    pub max_audio_ms: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_langid_info"][::std::mem::size_of::<transcribe_langid_info>() - 24usize];
    ["Alignment of transcribe_langid_info"]
        [::std::mem::align_of::<transcribe_langid_info>() - 8usize];
    ["Offset of field: transcribe_langid_info::struct_size"]
        [::std::mem::offset_of!(transcribe_langid_info, struct_size) - 0usize];
    ["Offset of field: transcribe_langid_info::sample_rate"]
        [::std::mem::offset_of!(transcribe_langid_info, sample_rate) - 8usize];
    ["Offset of field: transcribe_langid_info::n_labels"]
        [::std::mem::offset_of!(transcribe_langid_info, n_labels) - 12usize];
    ["Offset of field: transcribe_langid_info::min_audio_ms"]
        [::std::mem::offset_of!(transcribe_langid_info, min_audio_ms) - 16usize];
    ["Offset of field: transcribe_langid_info::max_audio_ms"]
        [::std::mem::offset_of!(transcribe_langid_info, max_audio_ms) - 20usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_langid_session_params {
    pub struct_size: u64,
    pub n_threads: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_langid_session_params"]
        [::std::mem::size_of::<transcribe_langid_session_params>() - 16usize];
    ["Alignment of transcribe_langid_session_params"]
        [::std::mem::align_of::<transcribe_langid_session_params>() - 8usize];
    ["Offset of field: transcribe_langid_session_params::struct_size"]
        [::std::mem::offset_of!(transcribe_langid_session_params, struct_size) - 0usize];
    ["Offset of field: transcribe_langid_session_params::n_threads"]
        [::std::mem::offset_of!(transcribe_langid_session_params, n_threads) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_langid_params {
    pub struct_size: u64,
    pub allowed: *const *const ::std::os::raw::c_char,
    pub n_allowed: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_langid_params"]
        [::std::mem::size_of::<transcribe_langid_params>() - 24usize];
    ["Alignment of transcribe_langid_params"]
        [::std::mem::align_of::<transcribe_langid_params>() - 8usize];
    ["Offset of field: transcribe_langid_params::struct_size"]
        [::std::mem::offset_of!(transcribe_langid_params, struct_size) - 0usize];
    ["Offset of field: transcribe_langid_params::allowed"]
        [::std::mem::offset_of!(transcribe_langid_params, allowed) - 8usize];
    ["Offset of field: transcribe_langid_params::n_allowed"]
        [::std::mem::offset_of!(transcribe_langid_params, n_allowed) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_langid_result {
    pub struct_size: u64,
    pub n_candidates: i32,
    pub allowed_mass: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_langid_result"]
        [::std::mem::size_of::<transcribe_langid_result>() - 16usize];
    ["Alignment of transcribe_langid_result"]
        [::std::mem::align_of::<transcribe_langid_result>() - 8usize];
    ["Offset of field: transcribe_langid_result::struct_size"]
        [::std::mem::offset_of!(transcribe_langid_result, struct_size) - 0usize];
    ["Offset of field: transcribe_langid_result::n_candidates"]
        [::std::mem::offset_of!(transcribe_langid_result, n_candidates) - 8usize];
    ["Offset of field: transcribe_langid_result::allowed_mass"]
        [::std::mem::offset_of!(transcribe_langid_result, allowed_mass) - 12usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_langid_candidate {
    pub struct_size: u64,
    pub index: i32,
    pub code: *const ::std::os::raw::c_char,
    pub name: *const ::std::os::raw::c_char,
    pub p: f32,
    pub logit: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_langid_candidate"]
        [::std::mem::size_of::<transcribe_langid_candidate>() - 40usize];
    ["Alignment of transcribe_langid_candidate"]
        [::std::mem::align_of::<transcribe_langid_candidate>() - 8usize];
    ["Offset of field: transcribe_langid_candidate::struct_size"]
        [::std::mem::offset_of!(transcribe_langid_candidate, struct_size) - 0usize];
    ["Offset of field: transcribe_langid_candidate::index"]
        [::std::mem::offset_of!(transcribe_langid_candidate, index) - 8usize];
    ["Offset of field: transcribe_langid_candidate::code"]
        [::std::mem::offset_of!(transcribe_langid_candidate, code) - 16usize];
    ["Offset of field: transcribe_langid_candidate::name"]
        [::std::mem::offset_of!(transcribe_langid_candidate, name) - 24usize];
    ["Offset of field: transcribe_langid_candidate::p"]
        [::std::mem::offset_of!(transcribe_langid_candidate, p) - 32usize];
    ["Offset of field: transcribe_langid_candidate::logit"]
        [::std::mem::offset_of!(transcribe_langid_candidate, logit) - 36usize];
};
unsafe extern "C" {
    pub fn transcribe_langid_info_init(out: *mut transcribe_langid_info);
}
unsafe extern "C" {
    pub fn transcribe_langid_session_params_init(params: *mut transcribe_langid_session_params);
}
unsafe extern "C" {
    pub fn transcribe_langid_params_init(params: *mut transcribe_langid_params);
}
unsafe extern "C" {
    pub fn transcribe_langid_result_init(out: *mut transcribe_langid_result);
}
unsafe extern "C" {
    pub fn transcribe_langid_candidate_init(out: *mut transcribe_langid_candidate);
}
unsafe extern "C" {
    pub fn transcribe_langid_get_info(
        model: *const transcribe_model,
        out: *mut transcribe_langid_info,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_langid_label_code(
        model: *const transcribe_model,
        i: i32,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_langid_label_name(
        model: *const transcribe_model,
        i: i32,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn transcribe_langid_label_index(
        model: *const transcribe_model,
        code_or_alias: *const ::std::os::raw::c_char,
    ) -> i32;
}
unsafe extern "C" {
    pub fn transcribe_langid_session_init(
        model: *mut transcribe_model,
        params: *const transcribe_langid_session_params,
        out_session: *mut *mut transcribe_langid_session,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_langid_session_free(session: *mut transcribe_langid_session);
}
unsafe extern "C" {
    pub fn transcribe_langid_set_abort_callback(
        session: *mut transcribe_langid_session,
        cb: transcribe_abort_callback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn transcribe_langid_run(
        session: *mut transcribe_langid_session,
        pcm: *const f32,
        n_samples: ::std::os::raw::c_int,
        params: *const transcribe_langid_params,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_langid_get_result(
        session: *const transcribe_langid_session,
        out: *mut transcribe_langid_result,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_langid_get_candidate(
        session: *const transcribe_langid_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_langid_candidate,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_langid_get_timings(
        session: *const transcribe_langid_session,
        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,
    );
}
impl transcribe_sortformer_preset {
    pub const TRANSCRIBE_SORTFORMER_PRESET_DEFAULT: transcribe_sortformer_preset =
        transcribe_sortformer_preset(0);
    pub const TRANSCRIBE_SORTFORMER_PRESET_VERY_HIGH_LATENCY: transcribe_sortformer_preset =
        transcribe_sortformer_preset(1);
    pub const TRANSCRIBE_SORTFORMER_PRESET_HIGH_LATENCY: transcribe_sortformer_preset =
        transcribe_sortformer_preset(2);
    pub const TRANSCRIBE_SORTFORMER_PRESET_LOW_LATENCY: transcribe_sortformer_preset =
        transcribe_sortformer_preset(3);
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct transcribe_sortformer_preset(pub ::std::os::raw::c_uint);
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_sortformer_diarize_ext {
    pub ext: transcribe_ext,
    pub preset: transcribe_sortformer_preset,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_sortformer_diarize_ext"]
        [::std::mem::size_of::<transcribe_sortformer_diarize_ext>() - 24usize];
    ["Alignment of transcribe_sortformer_diarize_ext"]
        [::std::mem::align_of::<transcribe_sortformer_diarize_ext>() - 8usize];
    ["Offset of field: transcribe_sortformer_diarize_ext::ext"]
        [::std::mem::offset_of!(transcribe_sortformer_diarize_ext, ext) - 0usize];
    ["Offset of field: transcribe_sortformer_diarize_ext::preset"]
        [::std::mem::offset_of!(transcribe_sortformer_diarize_ext, preset) - 16usize];
};
unsafe extern "C" {
    pub fn transcribe_sortformer_diarize_ext_init(ext: *mut transcribe_sortformer_diarize_ext);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_vad_session {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_vad_info {
    pub struct_size: u64,
    pub sample_rate: i32,
    pub frame_samples: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_vad_info"][::std::mem::size_of::<transcribe_vad_info>() - 16usize];
    ["Alignment of transcribe_vad_info"][::std::mem::align_of::<transcribe_vad_info>() - 8usize];
    ["Offset of field: transcribe_vad_info::struct_size"]
        [::std::mem::offset_of!(transcribe_vad_info, struct_size) - 0usize];
    ["Offset of field: transcribe_vad_info::sample_rate"]
        [::std::mem::offset_of!(transcribe_vad_info, sample_rate) - 8usize];
    ["Offset of field: transcribe_vad_info::frame_samples"]
        [::std::mem::offset_of!(transcribe_vad_info, frame_samples) - 12usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_vad_session_params {
    pub struct_size: u64,
    pub n_threads: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_vad_session_params"]
        [::std::mem::size_of::<transcribe_vad_session_params>() - 16usize];
    ["Alignment of transcribe_vad_session_params"]
        [::std::mem::align_of::<transcribe_vad_session_params>() - 8usize];
    ["Offset of field: transcribe_vad_session_params::struct_size"]
        [::std::mem::offset_of!(transcribe_vad_session_params, struct_size) - 0usize];
    ["Offset of field: transcribe_vad_session_params::n_threads"]
        [::std::mem::offset_of!(transcribe_vad_session_params, n_threads) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_vad_params {
    pub struct_size: u64,
    pub threshold: f64,
    pub neg_threshold: f64,
    pub min_speech_ms: i32,
    pub min_silence_ms: i32,
    pub speech_pad_ms: i32,
    pub max_speech_ms: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_vad_params"][::std::mem::size_of::<transcribe_vad_params>() - 40usize];
    ["Alignment of transcribe_vad_params"]
        [::std::mem::align_of::<transcribe_vad_params>() - 8usize];
    ["Offset of field: transcribe_vad_params::struct_size"]
        [::std::mem::offset_of!(transcribe_vad_params, struct_size) - 0usize];
    ["Offset of field: transcribe_vad_params::threshold"]
        [::std::mem::offset_of!(transcribe_vad_params, threshold) - 8usize];
    ["Offset of field: transcribe_vad_params::neg_threshold"]
        [::std::mem::offset_of!(transcribe_vad_params, neg_threshold) - 16usize];
    ["Offset of field: transcribe_vad_params::min_speech_ms"]
        [::std::mem::offset_of!(transcribe_vad_params, min_speech_ms) - 24usize];
    ["Offset of field: transcribe_vad_params::min_silence_ms"]
        [::std::mem::offset_of!(transcribe_vad_params, min_silence_ms) - 28usize];
    ["Offset of field: transcribe_vad_params::speech_pad_ms"]
        [::std::mem::offset_of!(transcribe_vad_params, speech_pad_ms) - 32usize];
    ["Offset of field: transcribe_vad_params::max_speech_ms"]
        [::std::mem::offset_of!(transcribe_vad_params, max_speech_ms) - 36usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_vad_result {
    pub struct_size: u64,
    pub n_probs: i32,
    pub first_frame: i64,
    pub n_segments: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_vad_result"][::std::mem::size_of::<transcribe_vad_result>() - 32usize];
    ["Alignment of transcribe_vad_result"]
        [::std::mem::align_of::<transcribe_vad_result>() - 8usize];
    ["Offset of field: transcribe_vad_result::struct_size"]
        [::std::mem::offset_of!(transcribe_vad_result, struct_size) - 0usize];
    ["Offset of field: transcribe_vad_result::n_probs"]
        [::std::mem::offset_of!(transcribe_vad_result, n_probs) - 8usize];
    ["Offset of field: transcribe_vad_result::first_frame"]
        [::std::mem::offset_of!(transcribe_vad_result, first_frame) - 16usize];
    ["Offset of field: transcribe_vad_result::n_segments"]
        [::std::mem::offset_of!(transcribe_vad_result, n_segments) - 24usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct transcribe_vad_segment {
    pub struct_size: u64,
    pub start_sample: i64,
    pub end_sample: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of transcribe_vad_segment"][::std::mem::size_of::<transcribe_vad_segment>() - 24usize];
    ["Alignment of transcribe_vad_segment"]
        [::std::mem::align_of::<transcribe_vad_segment>() - 8usize];
    ["Offset of field: transcribe_vad_segment::struct_size"]
        [::std::mem::offset_of!(transcribe_vad_segment, struct_size) - 0usize];
    ["Offset of field: transcribe_vad_segment::start_sample"]
        [::std::mem::offset_of!(transcribe_vad_segment, start_sample) - 8usize];
    ["Offset of field: transcribe_vad_segment::end_sample"]
        [::std::mem::offset_of!(transcribe_vad_segment, end_sample) - 16usize];
};
unsafe extern "C" {
    pub fn transcribe_vad_info_init(out: *mut transcribe_vad_info);
}
unsafe extern "C" {
    pub fn transcribe_vad_session_params_init(params: *mut transcribe_vad_session_params);
}
unsafe extern "C" {
    pub fn transcribe_vad_params_init(params: *mut transcribe_vad_params);
}
unsafe extern "C" {
    pub fn transcribe_vad_result_init(out: *mut transcribe_vad_result);
}
unsafe extern "C" {
    pub fn transcribe_vad_segment_init(out: *mut transcribe_vad_segment);
}
unsafe extern "C" {
    pub fn transcribe_vad_get_info(
        model: *const transcribe_model,
        out: *mut transcribe_vad_info,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_vad_session_init(
        model: *mut transcribe_model,
        params: *const transcribe_vad_session_params,
        out_session: *mut *mut transcribe_vad_session,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_vad_session_free(session: *mut transcribe_vad_session);
}
unsafe extern "C" {
    pub fn transcribe_vad_set_abort_callback(
        session: *mut transcribe_vad_session,
        cb: transcribe_abort_callback,
        user_data: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn transcribe_vad_run(
        session: *mut transcribe_vad_session,
        pcm: *const f32,
        n_samples: ::std::os::raw::c_int,
        params: *const transcribe_vad_params,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_vad_stream_feed(
        session: *mut transcribe_vad_session,
        pcm: *const f32,
        n_samples: ::std::os::raw::c_int,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_vad_stream_flush(session: *mut transcribe_vad_session) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_vad_stream_reset(session: *mut transcribe_vad_session);
}
unsafe extern "C" {
    pub fn transcribe_vad_get_result(
        session: *const transcribe_vad_session,
        out: *mut transcribe_vad_result,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_vad_probs(session: *const transcribe_vad_session) -> *const f32;
}
unsafe extern "C" {
    pub fn transcribe_vad_get_segment(
        session: *const transcribe_vad_session,
        i: ::std::os::raw::c_int,
        out: *mut transcribe_vad_segment,
    ) -> transcribe_status;
}
unsafe extern "C" {
    pub fn transcribe_vad_get_timings(
        session: *const transcribe_vad_session,
        out: *mut transcribe_timings,
    ) -> transcribe_status;
}
#[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;
}