transcribe-cpp 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_generated.d.ts +9 -1
- package/dist/_generated.js +15 -1
- package/package.json +6 -6
package/dist/_generated.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PUBLIC_HEADER_HASH = "
|
|
1
|
+
export declare const PUBLIC_HEADER_HASH = "57b1af43650f195d";
|
|
2
2
|
export declare const TRANSCRIBE_OK = 0;
|
|
3
3
|
export declare const TRANSCRIBE_ERR_INVALID_ARG = 1;
|
|
4
4
|
export declare const TRANSCRIBE_ERR_NOT_IMPLEMENTED = 2;
|
|
@@ -34,6 +34,7 @@ export declare const TRANSCRIBE_ABI_SESSION_LIMITS = 11;
|
|
|
34
34
|
export declare const TRANSCRIBE_ABI_EXT = 12;
|
|
35
35
|
export declare const TRANSCRIBE_ABI_DEVICE_INFO = 13;
|
|
36
36
|
export declare const TRANSCRIBE_ABI_SPEAKER_SEGMENT = 14;
|
|
37
|
+
export declare const TRANSCRIBE_ABI_BACKEND_INIT_PARAMS = 15;
|
|
37
38
|
export declare const TRANSCRIBE_LOG_LEVEL_NONE = 0;
|
|
38
39
|
export declare const TRANSCRIBE_LOG_LEVEL_INFO = 1;
|
|
39
40
|
export declare const TRANSCRIBE_LOG_LEVEL_WARN = 2;
|
|
@@ -97,6 +98,13 @@ export declare const TRANSCRIBE_SORTFORMER_PRESET_HIGH_LATENCY = 2;
|
|
|
97
98
|
export declare const TRANSCRIBE_SORTFORMER_PRESET_LOW_LATENCY = 3;
|
|
98
99
|
export declare const TRANSCRIBE_WHISPER_PROMPT_FIRST_SEGMENT = 0;
|
|
99
100
|
export declare const TRANSCRIBE_WHISPER_PROMPT_ALL_SEGMENTS = 1;
|
|
101
|
+
export declare const TRANSCRIBE_BACKEND_MASK_ALL = 4294967295;
|
|
102
|
+
export declare const TRANSCRIBE_BACKEND_MASK_CPU = 1;
|
|
103
|
+
export declare const TRANSCRIBE_BACKEND_MASK_CUDA = 8;
|
|
104
|
+
export declare const TRANSCRIBE_BACKEND_MASK_METAL = 2;
|
|
105
|
+
export declare const TRANSCRIBE_BACKEND_MASK_OTHER = 2147483648;
|
|
106
|
+
export declare const TRANSCRIBE_BACKEND_MASK_ROCM = 16;
|
|
107
|
+
export declare const TRANSCRIBE_BACKEND_MASK_VULKAN = 4;
|
|
100
108
|
export declare const TRANSCRIBE_EXT_KIND_MOONSHINE_STREAMING_STREAM = 1414746957;
|
|
101
109
|
export declare const TRANSCRIBE_EXT_KIND_PARAKEET_BUFFERED_STREAM = 1396853584;
|
|
102
110
|
export declare const TRANSCRIBE_EXT_KIND_PARAKEET_STREAM = 1414744912;
|
package/dist/_generated.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// Stable digest of the ABI surface (structs, enums, macros, layout,
|
|
11
11
|
// prototypes), computed by the Python oracle and pinned here so a header
|
|
12
12
|
// ABI change turns this binding's drift check red for conscious review.
|
|
13
|
-
export const PUBLIC_HEADER_HASH = "
|
|
13
|
+
export const PUBLIC_HEADER_HASH = "57b1af43650f195d";
|
|
14
14
|
// === enum constants ===
|
|
15
15
|
export const TRANSCRIBE_OK = 0;
|
|
16
16
|
export const TRANSCRIBE_ERR_INVALID_ARG = 1;
|
|
@@ -47,6 +47,7 @@ export const TRANSCRIBE_ABI_SESSION_LIMITS = 11;
|
|
|
47
47
|
export const TRANSCRIBE_ABI_EXT = 12;
|
|
48
48
|
export const TRANSCRIBE_ABI_DEVICE_INFO = 13;
|
|
49
49
|
export const TRANSCRIBE_ABI_SPEAKER_SEGMENT = 14;
|
|
50
|
+
export const TRANSCRIBE_ABI_BACKEND_INIT_PARAMS = 15;
|
|
50
51
|
export const TRANSCRIBE_LOG_LEVEL_NONE = 0;
|
|
51
52
|
export const TRANSCRIBE_LOG_LEVEL_INFO = 1;
|
|
52
53
|
export const TRANSCRIBE_LOG_LEVEL_WARN = 2;
|
|
@@ -111,6 +112,13 @@ export const TRANSCRIBE_SORTFORMER_PRESET_LOW_LATENCY = 3;
|
|
|
111
112
|
export const TRANSCRIBE_WHISPER_PROMPT_FIRST_SEGMENT = 0;
|
|
112
113
|
export const TRANSCRIBE_WHISPER_PROMPT_ALL_SEGMENTS = 1;
|
|
113
114
|
// === macro constants (integer object-like macros) ===
|
|
115
|
+
export const TRANSCRIBE_BACKEND_MASK_ALL = 4294967295;
|
|
116
|
+
export const TRANSCRIBE_BACKEND_MASK_CPU = 1;
|
|
117
|
+
export const TRANSCRIBE_BACKEND_MASK_CUDA = 8;
|
|
118
|
+
export const TRANSCRIBE_BACKEND_MASK_METAL = 2;
|
|
119
|
+
export const TRANSCRIBE_BACKEND_MASK_OTHER = 2147483648;
|
|
120
|
+
export const TRANSCRIBE_BACKEND_MASK_ROCM = 16;
|
|
121
|
+
export const TRANSCRIBE_BACKEND_MASK_VULKAN = 4;
|
|
114
122
|
export const TRANSCRIBE_EXT_KIND_MOONSHINE_STREAMING_STREAM = 1414746957;
|
|
115
123
|
export const TRANSCRIBE_EXT_KIND_PARAKEET_BUFFERED_STREAM = 1396853584;
|
|
116
124
|
export const TRANSCRIBE_EXT_KIND_PARAKEET_STREAM = 1414744912;
|
|
@@ -119,6 +127,7 @@ export const TRANSCRIBE_EXT_KIND_VOXTRAL_REALTIME_STREAM = 1414746710;
|
|
|
119
127
|
export const TRANSCRIBE_EXT_KIND_WHISPER_RUN = 1314015319;
|
|
120
128
|
export const STRUCT_LAYOUT = {
|
|
121
129
|
'transcribe_ext': { size: 16, align: 8, offsets: { 'size': 0, 'kind': 8 } },
|
|
130
|
+
'transcribe_backend_init_params': { size: 24, align: 8, offsets: { 'struct_size': 0, 'artifact_dir': 8, 'allowed_backends': 16 } },
|
|
122
131
|
'transcribe_device_info': { size: 64, align: 8, offsets: { 'struct_size': 0, 'name': 8, 'description': 16, 'kind': 24, 'device_id': 32, 'memory_total': 40, 'memory_free': 48, 'device_type': 56 } },
|
|
123
132
|
'transcribe_model_load_params': { size: 24, align: 8, offsets: { 'struct_size': 0, 'backend': 8, 'device': 16 } },
|
|
124
133
|
'transcribe_session_params': { size: 24, align: 8, offsets: { 'struct_size': 0, 'n_threads': 8, 'kv_type': 12, 'n_ctx': 16 } },
|
|
@@ -143,6 +152,7 @@ export const STRUCT_LAYOUT = {
|
|
|
143
152
|
};
|
|
144
153
|
export const ABI_STRUCT_IDS = {
|
|
145
154
|
'transcribe_ext': 12,
|
|
155
|
+
'transcribe_backend_init_params': 15,
|
|
146
156
|
'transcribe_device_info': 13,
|
|
147
157
|
'transcribe_model_load_params': 0,
|
|
148
158
|
'transcribe_session_params': 1,
|
|
@@ -162,6 +172,7 @@ export const ABI_STRUCT_IDS = {
|
|
|
162
172
|
export function defineTypes(koffi) {
|
|
163
173
|
const T = {};
|
|
164
174
|
T['transcribe_ext'] = koffi.struct({ size: 'uint64_t', kind: 'uint32_t' });
|
|
175
|
+
T['transcribe_backend_init_params'] = koffi.struct({ struct_size: 'uint64_t', artifact_dir: 'char *', allowed_backends: 'uint32_t' });
|
|
165
176
|
T['transcribe_device_info'] = koffi.struct({ struct_size: 'uint64_t', name: 'char *', description: 'char *', kind: 'char *', device_id: 'char *', memory_total: 'uint64_t', memory_free: 'uint64_t', device_type: 'int' });
|
|
166
177
|
T['transcribe_model_load_params'] = koffi.struct({ struct_size: 'uint64_t', backend: 'int', device: 'void *' });
|
|
167
178
|
T['transcribe_session_params'] = koffi.struct({ struct_size: 'uint64_t', n_threads: 'int', kv_type: 'int', n_ctx: 'int32_t' });
|
|
@@ -188,7 +199,9 @@ export function defineTypes(koffi) {
|
|
|
188
199
|
export const FUNCTION_SIGNATURES = {
|
|
189
200
|
'transcribe_abi_struct_align': { ret: 'size_t', args: ['transcribe_abi_struct'] },
|
|
190
201
|
'transcribe_abi_struct_size': { ret: 'size_t', args: ['transcribe_abi_struct'] },
|
|
202
|
+
'transcribe_allowed_backends': { ret: 'uint32_t', args: [] },
|
|
191
203
|
'transcribe_backend_available': { ret: '_Bool', args: ['transcribe_backend_request'] },
|
|
204
|
+
'transcribe_backend_init_params_init': { ret: 'void', args: ['struct transcribe_backend_init_params *'] },
|
|
192
205
|
'transcribe_batch_detected_language': { ret: 'const char *', args: ['const struct transcribe_session *', 'int'] },
|
|
193
206
|
'transcribe_batch_full_text': { ret: 'const char *', args: ['const struct transcribe_session *', 'int'] },
|
|
194
207
|
'transcribe_batch_get_segment': { ret: 'transcribe_status', args: ['const struct transcribe_session *', 'int', 'int', 'struct transcribe_segment *'] },
|
|
@@ -223,6 +236,7 @@ export const FUNCTION_SIGNATURES = {
|
|
|
223
236
|
'transcribe_get_word': { ret: 'transcribe_status', args: ['const struct transcribe_session *', 'int', 'struct transcribe_word *'] },
|
|
224
237
|
'transcribe_init_backends': { ret: 'transcribe_status', args: ['const char *'] },
|
|
225
238
|
'transcribe_init_backends_default': { ret: 'transcribe_status', args: [] },
|
|
239
|
+
'transcribe_init_backends_ex': { ret: 'transcribe_status', args: ['const struct transcribe_backend_init_params *'] },
|
|
226
240
|
'transcribe_log_set': { ret: 'void', args: ['transcribe_log_callback', 'void *'] },
|
|
227
241
|
'transcribe_model_accepts_ext_kind': { ret: '_Bool', args: ['const struct transcribe_model *', 'transcribe_ext_slot', 'uint32_t'] },
|
|
228
242
|
'transcribe_model_arch_string': { ret: 'const char *', args: ['const struct transcribe_model *'] },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "transcribe-cpp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "TypeScript/Node.js bindings for transcribe.cpp — a C/C++ speech-to-text library built on ggml",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"koffi": "^3.0.2"
|
|
52
52
|
},
|
|
53
53
|
"optionalDependencies": {
|
|
54
|
-
"@transcribe-cpp/darwin-arm64-metal": "0.3.
|
|
55
|
-
"@transcribe-cpp/darwin-x64-cpu": "0.3.
|
|
56
|
-
"@transcribe-cpp/linux-x64-cpu-vulkan": "0.3.
|
|
57
|
-
"@transcribe-cpp/linux-arm64-cpu-vulkan": "0.3.
|
|
58
|
-
"@transcribe-cpp/win32-x64-cpu-vulkan": "0.3.
|
|
54
|
+
"@transcribe-cpp/darwin-arm64-metal": "0.3.1",
|
|
55
|
+
"@transcribe-cpp/darwin-x64-cpu": "0.3.1",
|
|
56
|
+
"@transcribe-cpp/linux-x64-cpu-vulkan": "0.3.1",
|
|
57
|
+
"@transcribe-cpp/linux-arm64-cpu-vulkan": "0.3.1",
|
|
58
|
+
"@transcribe-cpp/win32-x64-cpu-vulkan": "0.3.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/node": "^22.0.0",
|