webslm 0.9.0 → 0.10.0
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/README.md +32 -1
- package/dist/ai-sdk/index.d.ts +15 -0
- package/dist/ai-sdk/index.js +19 -0
- package/dist/ai-sdk/transcription-model.d.ts +48 -0
- package/dist/ai-sdk/transcription-model.js +115 -0
- package/dist/audio.d.ts +33 -0
- package/dist/audio.js +87 -0
- package/dist/engine.js +52 -0
- package/dist/hub.d.ts +9 -0
- package/dist/hub.js +12 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/models.d.ts +19 -1
- package/dist/models.js +55 -1
- package/dist/native.d.ts +6 -0
- package/dist/protocol.d.ts +31 -0
- package/dist/types.d.ts +68 -0
- package/dist/wasm.d.ts +2 -0
- package/native-manifest.json +29 -29
- package/package.json +1 -1
- package/wasm/relaxed/webslm_wasm.d.ts +30 -3
- package/wasm/relaxed/webslm_wasm.js +75 -15
- package/wasm/relaxed/webslm_wasm_bg.wasm +0 -0
- package/wasm/relaxed/webslm_wasm_bg.wasm.d.ts +6 -3
- package/wasm/simd/webslm_wasm.d.ts +30 -3
- package/wasm/simd/webslm_wasm.js +75 -15
- package/wasm/simd/webslm_wasm_bg.wasm +0 -0
- package/wasm/simd/webslm_wasm_bg.wasm.d.ts +6 -3
- package/wasm/threads/webslm_wasm.d.ts +31 -4
- package/wasm/threads/webslm_wasm.js +80 -20
- package/wasm/threads/webslm_wasm_bg.wasm +0 -0
- package/wasm/threads/webslm_wasm_bg.wasm.d.ts +7 -4
|
@@ -196,10 +196,28 @@ export class WasmModel {
|
|
|
196
196
|
* its limit, as `embed` does).
|
|
197
197
|
*/
|
|
198
198
|
tokenize(text: string, add_special_tokens: boolean): Uint32Array;
|
|
199
|
+
/**
|
|
200
|
+
* Transcribes speech with a speech recognition model (Whisper).
|
|
201
|
+
* `audio` is mono PCM (`Float32Array`, at `sampleRate`, 16 kHz by
|
|
202
|
+
* default) or the bytes of a WAV file (`Uint8Array`; browsers decode
|
|
203
|
+
* other formats with `AudioContext` first). `options_json`:
|
|
204
|
+
* `{ language?: string, task?: "transcribe" | "translate",
|
|
205
|
+
* maxNewTokens?: number, sampleRate?: number }` (no language: detected).
|
|
206
|
+
* `on_text(text)` receives the text as it is generated and stops the
|
|
207
|
+
* transcription by returning `false` (or a promise resolving to
|
|
208
|
+
* `false`). Resolves to `{ text, language,
|
|
209
|
+
* duration, segments: [{ id, start, end, text, tokens }], tokens,
|
|
210
|
+
* stopped }`. Rejects with `UNSUPPORTED_TASK` on other models.
|
|
211
|
+
*/
|
|
212
|
+
transcribe(audio: any, options_json: string, on_text?: Function | null): Promise<any>;
|
|
199
213
|
/**
|
|
200
214
|
* Whether the model is an encoder (it answers `embed`, not `chat`).
|
|
201
215
|
*/
|
|
202
216
|
readonly isEncoder: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Whether the model recognizes speech (it answers `transcribe`).
|
|
219
|
+
*/
|
|
220
|
+
readonly isSpeech: boolean;
|
|
203
221
|
}
|
|
204
222
|
|
|
205
223
|
/**
|
|
@@ -342,6 +360,12 @@ export function supportedEncoderTypes(): string[];
|
|
|
342
360
|
*/
|
|
343
361
|
export function supportedModelTypes(): string[];
|
|
344
362
|
|
|
363
|
+
/**
|
|
364
|
+
* `model_type` values of the speech recognition models this build runs
|
|
365
|
+
* (models whose `WasmModel` answers `transcribe`).
|
|
366
|
+
*/
|
|
367
|
+
export function supportedSpeechTypes(): string[];
|
|
368
|
+
|
|
345
369
|
/**
|
|
346
370
|
* Version of the Rust engine, as declared in `Cargo.toml`.
|
|
347
371
|
*/
|
|
@@ -366,6 +390,7 @@ export interface InitOutput {
|
|
|
366
390
|
readonly sha256hasher_update: (a: number, b: number, c: number) => void;
|
|
367
391
|
readonly supportedEncoderTypes: () => [number, number];
|
|
368
392
|
readonly supportedModelTypes: () => [number, number];
|
|
393
|
+
readonly supportedSpeechTypes: () => [number, number];
|
|
369
394
|
readonly version: () => [number, number];
|
|
370
395
|
readonly wasmimagemodel_generate: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
371
396
|
readonly wasmimagemodel_info: (a: number) => [number, number, number];
|
|
@@ -379,11 +404,13 @@ export interface InitOutput {
|
|
|
379
404
|
readonly wasmmodel_generate: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
|
|
380
405
|
readonly wasmmodel_info: (a: number) => [number, number, number];
|
|
381
406
|
readonly wasmmodel_isEncoder: (a: number) => number;
|
|
407
|
+
readonly wasmmodel_isSpeech: (a: number) => number;
|
|
382
408
|
readonly wasmmodel_load: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
383
409
|
readonly wasmmodel_removeAdapter: (a: number) => any;
|
|
384
410
|
readonly wasmmodel_renderChat: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
385
411
|
readonly wasmmodel_reset: (a: number) => [number, number];
|
|
386
412
|
readonly wasmmodel_tokenize: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
413
|
+
readonly wasmmodel_transcribe: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
387
414
|
readonly wasmsession_capacity: (a: number) => [number, number, number];
|
|
388
415
|
readonly wasmsession_chat: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
|
|
389
416
|
readonly wasmsession_chatWithMedia: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: any, k: number) => any;
|
|
@@ -401,10 +428,10 @@ export interface InitOutput {
|
|
|
401
428
|
readonly wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___js_sys_56365fc49d784db6___Function_fn_wasm_bindgen_8cf186fa7724d16d___JsValue_____wasm_bindgen_8cf186fa7724d16d___sys__Undefined___js_sys_56365fc49d784db6___Function_fn_wasm_bindgen_8cf186fa7724d16d___JsValue_____wasm_bindgen_8cf186fa7724d16d___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
402
429
|
readonly wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
403
430
|
readonly wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
404
|
-
readonly
|
|
405
|
-
readonly
|
|
431
|
+
readonly wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__49: (a: number, b: number, c: any) => [number, number];
|
|
432
|
+
readonly wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__50: (a: number, b: number, c: any) => [number, number];
|
|
406
433
|
readonly wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_: (a: number, b: number, c: any) => void;
|
|
407
|
-
readonly
|
|
434
|
+
readonly wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__48: (a: number, b: number, c: any) => void;
|
|
408
435
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
409
436
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
410
437
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/wasm/simd/webslm_wasm.js
CHANGED
|
@@ -371,6 +371,14 @@ export class WasmModel {
|
|
|
371
371
|
const ret = wasm.wasmmodel_isEncoder(this.__wbg_ptr);
|
|
372
372
|
return ret !== 0;
|
|
373
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* Whether the model recognizes speech (it answers `transcribe`).
|
|
376
|
+
* @returns {boolean}
|
|
377
|
+
*/
|
|
378
|
+
get isSpeech() {
|
|
379
|
+
const ret = wasm.wasmmodel_isSpeech(this.__wbg_ptr);
|
|
380
|
+
return ret !== 0;
|
|
381
|
+
}
|
|
374
382
|
/**
|
|
375
383
|
* Loads a checkpoint from `source`. `options_json` is a JSON object:
|
|
376
384
|
* `{ format?: "q8" | "q4" | "q4_0" | "f32" | "f16" | "bf16",
|
|
@@ -499,6 +507,29 @@ export class WasmModel {
|
|
|
499
507
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
500
508
|
return v2;
|
|
501
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* Transcribes speech with a speech recognition model (Whisper).
|
|
512
|
+
* `audio` is mono PCM (`Float32Array`, at `sampleRate`, 16 kHz by
|
|
513
|
+
* default) or the bytes of a WAV file (`Uint8Array`; browsers decode
|
|
514
|
+
* other formats with `AudioContext` first). `options_json`:
|
|
515
|
+
* `{ language?: string, task?: "transcribe" | "translate",
|
|
516
|
+
* maxNewTokens?: number, sampleRate?: number }` (no language: detected).
|
|
517
|
+
* `on_text(text)` receives the text as it is generated and stops the
|
|
518
|
+
* transcription by returning `false` (or a promise resolving to
|
|
519
|
+
* `false`). Resolves to `{ text, language,
|
|
520
|
+
* duration, segments: [{ id, start, end, text, tokens }], tokens,
|
|
521
|
+
* stopped }`. Rejects with `UNSUPPORTED_TASK` on other models.
|
|
522
|
+
* @param {any} audio
|
|
523
|
+
* @param {string} options_json
|
|
524
|
+
* @param {Function | null} [on_text]
|
|
525
|
+
* @returns {Promise<any>}
|
|
526
|
+
*/
|
|
527
|
+
transcribe(audio, options_json, on_text) {
|
|
528
|
+
const ptr0 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
529
|
+
const len0 = WASM_VECTOR_LEN;
|
|
530
|
+
const ret = wasm.wasmmodel_transcribe(this.__wbg_ptr, audio, ptr0, len0, isLikeNone(on_text) ? 0 : addToExternrefTable0(on_text));
|
|
531
|
+
return ret;
|
|
532
|
+
}
|
|
502
533
|
}
|
|
503
534
|
if (Symbol.dispose) WasmModel.prototype[Symbol.dispose] = WasmModel.prototype.free;
|
|
504
535
|
|
|
@@ -806,6 +837,18 @@ export function supportedModelTypes() {
|
|
|
806
837
|
return v1;
|
|
807
838
|
}
|
|
808
839
|
|
|
840
|
+
/**
|
|
841
|
+
* `model_type` values of the speech recognition models this build runs
|
|
842
|
+
* (models whose `WasmModel` answers `transcribe`).
|
|
843
|
+
* @returns {string[]}
|
|
844
|
+
*/
|
|
845
|
+
export function supportedSpeechTypes() {
|
|
846
|
+
const ret = wasm.supportedSpeechTypes();
|
|
847
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
|
|
848
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
849
|
+
return v1;
|
|
850
|
+
}
|
|
851
|
+
|
|
809
852
|
/**
|
|
810
853
|
* Version of the Rust engine, as declared in `Cargo.toml`.
|
|
811
854
|
* @returns {string}
|
|
@@ -1025,6 +1068,16 @@ function __wbg_get_imports() {
|
|
|
1025
1068
|
const ret = result;
|
|
1026
1069
|
return ret;
|
|
1027
1070
|
},
|
|
1071
|
+
__wbg_instanceof_Float32Array_31e80d3e88752523: function(arg0) {
|
|
1072
|
+
let result;
|
|
1073
|
+
try {
|
|
1074
|
+
result = arg0 instanceof Float32Array;
|
|
1075
|
+
} catch (_) {
|
|
1076
|
+
result = false;
|
|
1077
|
+
}
|
|
1078
|
+
const ret = result;
|
|
1079
|
+
return ret;
|
|
1080
|
+
},
|
|
1028
1081
|
__wbg_instanceof_GpuOutOfMemoryError_829d8185d83170f0: function(arg0) {
|
|
1029
1082
|
let result;
|
|
1030
1083
|
try {
|
|
@@ -1088,6 +1141,10 @@ function __wbg_get_imports() {
|
|
|
1088
1141
|
const ret = arg0.length;
|
|
1089
1142
|
return ret;
|
|
1090
1143
|
},
|
|
1144
|
+
__wbg_length_8768c6f6941913e3: function(arg0) {
|
|
1145
|
+
const ret = arg0.length;
|
|
1146
|
+
return ret;
|
|
1147
|
+
},
|
|
1091
1148
|
__wbg_limits_f4203404018656d1: function(arg0) {
|
|
1092
1149
|
const ret = arg0.limits;
|
|
1093
1150
|
return ret;
|
|
@@ -1316,6 +1373,9 @@ function __wbg_get_imports() {
|
|
|
1316
1373
|
const ret = arg0.popErrorScope();
|
|
1317
1374
|
return ret;
|
|
1318
1375
|
},
|
|
1376
|
+
__wbg_prototypesetcall_804a1eb1b047ccb9: function(arg0, arg1, arg2) {
|
|
1377
|
+
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
|
|
1378
|
+
},
|
|
1319
1379
|
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
1320
1380
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1321
1381
|
},
|
|
@@ -1626,33 +1686,33 @@ function __wbg_get_imports() {
|
|
|
1626
1686
|
arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
|
|
1627
1687
|
}, arguments); },
|
|
1628
1688
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
1629
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1689
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 359, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1630
1690
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_);
|
|
1631
1691
|
return ret;
|
|
1632
1692
|
},
|
|
1633
1693
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
1634
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
1694
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 287, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1635
1695
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_);
|
|
1636
1696
|
return ret;
|
|
1637
1697
|
},
|
|
1638
1698
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1639
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
1699
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 291, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1640
1700
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
|
|
1641
1701
|
return ret;
|
|
1642
1702
|
},
|
|
1643
1703
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
1644
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx:
|
|
1645
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1704
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 291, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1705
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__48);
|
|
1646
1706
|
return ret;
|
|
1647
1707
|
},
|
|
1648
1708
|
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
1649
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
1650
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1709
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 287, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1710
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__49);
|
|
1651
1711
|
return ret;
|
|
1652
1712
|
},
|
|
1653
1713
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
1654
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
1655
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1714
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 287, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1715
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__50);
|
|
1656
1716
|
return ret;
|
|
1657
1717
|
},
|
|
1658
1718
|
__wbindgen_generic_0000000000000007: function(arg0) {
|
|
@@ -1695,8 +1755,8 @@ function wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_549
|
|
|
1695
1755
|
wasm.wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_(arg0, arg1, arg2);
|
|
1696
1756
|
}
|
|
1697
1757
|
|
|
1698
|
-
function
|
|
1699
|
-
wasm.
|
|
1758
|
+
function wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__48(arg0, arg1, arg2) {
|
|
1759
|
+
wasm.wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__48(arg0, arg1, arg2);
|
|
1700
1760
|
}
|
|
1701
1761
|
|
|
1702
1762
|
function wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_(arg0, arg1, arg2) {
|
|
@@ -1713,15 +1773,15 @@ function wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bin
|
|
|
1713
1773
|
}
|
|
1714
1774
|
}
|
|
1715
1775
|
|
|
1716
|
-
function
|
|
1717
|
-
const ret = wasm.
|
|
1776
|
+
function wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__49(arg0, arg1, arg2) {
|
|
1777
|
+
const ret = wasm.wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__49(arg0, arg1, arg2);
|
|
1718
1778
|
if (ret[1]) {
|
|
1719
1779
|
throw takeFromExternrefTable0(ret[0]);
|
|
1720
1780
|
}
|
|
1721
1781
|
}
|
|
1722
1782
|
|
|
1723
|
-
function
|
|
1724
|
-
const ret = wasm.
|
|
1783
|
+
function wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__50(arg0, arg1, arg2) {
|
|
1784
|
+
const ret = wasm.wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__50(arg0, arg1, arg2);
|
|
1725
1785
|
if (ret[1]) {
|
|
1726
1786
|
throw takeFromExternrefTable0(ret[0]);
|
|
1727
1787
|
}
|
|
Binary file
|
|
@@ -16,6 +16,7 @@ export const sha256hasher_new: () => number;
|
|
|
16
16
|
export const sha256hasher_update: (a: number, b: number, c: number) => void;
|
|
17
17
|
export const supportedEncoderTypes: () => [number, number];
|
|
18
18
|
export const supportedModelTypes: () => [number, number];
|
|
19
|
+
export const supportedSpeechTypes: () => [number, number];
|
|
19
20
|
export const version: () => [number, number];
|
|
20
21
|
export const wasmimagemodel_generate: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
21
22
|
export const wasmimagemodel_info: (a: number) => [number, number, number];
|
|
@@ -29,11 +30,13 @@ export const wasmmodel_embed: (a: number, b: number, c: number, d: number, e: nu
|
|
|
29
30
|
export const wasmmodel_generate: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
|
|
30
31
|
export const wasmmodel_info: (a: number) => [number, number, number];
|
|
31
32
|
export const wasmmodel_isEncoder: (a: number) => number;
|
|
33
|
+
export const wasmmodel_isSpeech: (a: number) => number;
|
|
32
34
|
export const wasmmodel_load: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
33
35
|
export const wasmmodel_removeAdapter: (a: number) => any;
|
|
34
36
|
export const wasmmodel_renderChat: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
35
37
|
export const wasmmodel_reset: (a: number) => [number, number];
|
|
36
38
|
export const wasmmodel_tokenize: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
39
|
+
export const wasmmodel_transcribe: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
37
40
|
export const wasmsession_capacity: (a: number) => [number, number, number];
|
|
38
41
|
export const wasmsession_chat: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
|
|
39
42
|
export const wasmsession_chatWithMedia: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: any, k: number) => any;
|
|
@@ -51,10 +54,10 @@ export const wasmsession_truncate: (a: number, b: number) => [number, number];
|
|
|
51
54
|
export const wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___js_sys_56365fc49d784db6___Function_fn_wasm_bindgen_8cf186fa7724d16d___JsValue_____wasm_bindgen_8cf186fa7724d16d___sys__Undefined___js_sys_56365fc49d784db6___Function_fn_wasm_bindgen_8cf186fa7724d16d___JsValue_____wasm_bindgen_8cf186fa7724d16d___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
52
55
|
export const wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
53
56
|
export const wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
57
|
+
export const wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__49: (a: number, b: number, c: any) => [number, number];
|
|
58
|
+
export const wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wasm_bindgen_8cf186fa7724d16d___sys__JsNullable_wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_8cf186fa7724d16d___JsError___true__50: (a: number, b: number, c: any) => [number, number];
|
|
56
59
|
export const wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_: (a: number, b: number, c: any) => void;
|
|
57
|
-
export const
|
|
60
|
+
export const wasm_bindgen_8cf186fa7724d16d___convert__closures_____invoke___wgpu_54917290532eaf6b___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__48: (a: number, b: number, c: any) => void;
|
|
58
61
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
59
62
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
60
63
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
@@ -196,10 +196,28 @@ export class WasmModel {
|
|
|
196
196
|
* its limit, as `embed` does).
|
|
197
197
|
*/
|
|
198
198
|
tokenize(text: string, add_special_tokens: boolean): Uint32Array;
|
|
199
|
+
/**
|
|
200
|
+
* Transcribes speech with a speech recognition model (Whisper).
|
|
201
|
+
* `audio` is mono PCM (`Float32Array`, at `sampleRate`, 16 kHz by
|
|
202
|
+
* default) or the bytes of a WAV file (`Uint8Array`; browsers decode
|
|
203
|
+
* other formats with `AudioContext` first). `options_json`:
|
|
204
|
+
* `{ language?: string, task?: "transcribe" | "translate",
|
|
205
|
+
* maxNewTokens?: number, sampleRate?: number }` (no language: detected).
|
|
206
|
+
* `on_text(text)` receives the text as it is generated and stops the
|
|
207
|
+
* transcription by returning `false` (or a promise resolving to
|
|
208
|
+
* `false`). Resolves to `{ text, language,
|
|
209
|
+
* duration, segments: [{ id, start, end, text, tokens }], tokens,
|
|
210
|
+
* stopped }`. Rejects with `UNSUPPORTED_TASK` on other models.
|
|
211
|
+
*/
|
|
212
|
+
transcribe(audio: any, options_json: string, on_text?: Function | null): Promise<any>;
|
|
199
213
|
/**
|
|
200
214
|
* Whether the model is an encoder (it answers `embed`, not `chat`).
|
|
201
215
|
*/
|
|
202
216
|
readonly isEncoder: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Whether the model recognizes speech (it answers `transcribe`).
|
|
219
|
+
*/
|
|
220
|
+
readonly isSpeech: boolean;
|
|
203
221
|
}
|
|
204
222
|
|
|
205
223
|
/**
|
|
@@ -351,6 +369,12 @@ export function supportedEncoderTypes(): string[];
|
|
|
351
369
|
*/
|
|
352
370
|
export function supportedModelTypes(): string[];
|
|
353
371
|
|
|
372
|
+
/**
|
|
373
|
+
* `model_type` values of the speech recognition models this build runs
|
|
374
|
+
* (models whose `WasmModel` answers `transcribe`).
|
|
375
|
+
*/
|
|
376
|
+
export function supportedSpeechTypes(): string[];
|
|
377
|
+
|
|
354
378
|
/**
|
|
355
379
|
* Version of the Rust engine, as declared in `Cargo.toml`.
|
|
356
380
|
*/
|
|
@@ -388,6 +412,7 @@ export interface InitOutput {
|
|
|
388
412
|
readonly startThreadPool: (a: number) => any;
|
|
389
413
|
readonly supportedEncoderTypes: () => [number, number];
|
|
390
414
|
readonly supportedModelTypes: () => [number, number];
|
|
415
|
+
readonly supportedSpeechTypes: () => [number, number];
|
|
391
416
|
readonly version: () => [number, number];
|
|
392
417
|
readonly wasmimagemodel_generate: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
393
418
|
readonly wasmimagemodel_info: (a: number) => [number, number, number];
|
|
@@ -401,11 +426,13 @@ export interface InitOutput {
|
|
|
401
426
|
readonly wasmmodel_generate: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
|
|
402
427
|
readonly wasmmodel_info: (a: number) => [number, number, number];
|
|
403
428
|
readonly wasmmodel_isEncoder: (a: number) => number;
|
|
429
|
+
readonly wasmmodel_isSpeech: (a: number) => number;
|
|
404
430
|
readonly wasmmodel_load: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
405
431
|
readonly wasmmodel_removeAdapter: (a: number) => any;
|
|
406
432
|
readonly wasmmodel_renderChat: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
407
433
|
readonly wasmmodel_reset: (a: number) => [number, number];
|
|
408
434
|
readonly wasmmodel_tokenize: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
435
|
+
readonly wasmmodel_transcribe: (a: number, b: any, c: number, d: number, e: number) => any;
|
|
409
436
|
readonly wasmsession_capacity: (a: number) => [number, number, number];
|
|
410
437
|
readonly wasmsession_chat: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
|
|
411
438
|
readonly wasmsession_chatWithMedia: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: any, k: number) => any;
|
|
@@ -427,12 +454,12 @@ export interface InitOutput {
|
|
|
427
454
|
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___js_sys_b608be85a12bc1d0___Function_fn_wasm_bindgen_3c612a990bfab728___JsValue_____wasm_bindgen_3c612a990bfab728___sys__Undefined___js_sys_b608be85a12bc1d0___Function_fn_wasm_bindgen_3c612a990bfab728___JsValue_____wasm_bindgen_3c612a990bfab728___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
428
455
|
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue__core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
429
456
|
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
430
|
-
readonly
|
|
431
|
-
readonly
|
|
457
|
+
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__57: (a: number, b: number, c: any) => [number, number];
|
|
458
|
+
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__58: (a: number, b: number, c: any) => [number, number];
|
|
432
459
|
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___js_sys_b608be85a12bc1d0___futures__task__wait_async_polyfill__MessageEvent______true_: (a: number, b: number, c: any) => void;
|
|
433
460
|
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true_: (a: number, b: number, c: any) => void;
|
|
434
|
-
readonly
|
|
435
|
-
readonly
|
|
461
|
+
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__55: (a: number, b: number, c: any) => void;
|
|
462
|
+
readonly wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__56: (a: number, b: number, c: any) => void;
|
|
436
463
|
readonly memory: WebAssembly.Memory;
|
|
437
464
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
438
465
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -373,6 +373,14 @@ export class WasmModel {
|
|
|
373
373
|
const ret = wasm.wasmmodel_isEncoder(this.__wbg_ptr);
|
|
374
374
|
return ret !== 0;
|
|
375
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* Whether the model recognizes speech (it answers `transcribe`).
|
|
378
|
+
* @returns {boolean}
|
|
379
|
+
*/
|
|
380
|
+
get isSpeech() {
|
|
381
|
+
const ret = wasm.wasmmodel_isSpeech(this.__wbg_ptr);
|
|
382
|
+
return ret !== 0;
|
|
383
|
+
}
|
|
376
384
|
/**
|
|
377
385
|
* Loads a checkpoint from `source`. `options_json` is a JSON object:
|
|
378
386
|
* `{ format?: "q8" | "q4" | "q4_0" | "f32" | "f16" | "bf16",
|
|
@@ -501,6 +509,29 @@ export class WasmModel {
|
|
|
501
509
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
502
510
|
return v2;
|
|
503
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* Transcribes speech with a speech recognition model (Whisper).
|
|
514
|
+
* `audio` is mono PCM (`Float32Array`, at `sampleRate`, 16 kHz by
|
|
515
|
+
* default) or the bytes of a WAV file (`Uint8Array`; browsers decode
|
|
516
|
+
* other formats with `AudioContext` first). `options_json`:
|
|
517
|
+
* `{ language?: string, task?: "transcribe" | "translate",
|
|
518
|
+
* maxNewTokens?: number, sampleRate?: number }` (no language: detected).
|
|
519
|
+
* `on_text(text)` receives the text as it is generated and stops the
|
|
520
|
+
* transcription by returning `false` (or a promise resolving to
|
|
521
|
+
* `false`). Resolves to `{ text, language,
|
|
522
|
+
* duration, segments: [{ id, start, end, text, tokens }], tokens,
|
|
523
|
+
* stopped }`. Rejects with `UNSUPPORTED_TASK` on other models.
|
|
524
|
+
* @param {any} audio
|
|
525
|
+
* @param {string} options_json
|
|
526
|
+
* @param {Function | null} [on_text]
|
|
527
|
+
* @returns {Promise<any>}
|
|
528
|
+
*/
|
|
529
|
+
transcribe(audio, options_json, on_text) {
|
|
530
|
+
const ptr0 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
531
|
+
const len0 = WASM_VECTOR_LEN;
|
|
532
|
+
const ret = wasm.wasmmodel_transcribe(this.__wbg_ptr, audio, ptr0, len0, isLikeNone(on_text) ? 0 : addToExternrefTable0(on_text));
|
|
533
|
+
return ret;
|
|
534
|
+
}
|
|
504
535
|
}
|
|
505
536
|
if (Symbol.dispose) WasmModel.prototype[Symbol.dispose] = WasmModel.prototype.free;
|
|
506
537
|
|
|
@@ -829,6 +860,18 @@ export function supportedModelTypes() {
|
|
|
829
860
|
return v1;
|
|
830
861
|
}
|
|
831
862
|
|
|
863
|
+
/**
|
|
864
|
+
* `model_type` values of the speech recognition models this build runs
|
|
865
|
+
* (models whose `WasmModel` answers `transcribe`).
|
|
866
|
+
* @returns {string[]}
|
|
867
|
+
*/
|
|
868
|
+
export function supportedSpeechTypes() {
|
|
869
|
+
const ret = wasm.supportedSpeechTypes();
|
|
870
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]);
|
|
871
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
872
|
+
return v1;
|
|
873
|
+
}
|
|
874
|
+
|
|
832
875
|
/**
|
|
833
876
|
* Version of the Rust engine, as declared in `Cargo.toml`.
|
|
834
877
|
* @returns {string}
|
|
@@ -1115,6 +1158,16 @@ function __wbg_get_imports(memory) {
|
|
|
1115
1158
|
const ret = result;
|
|
1116
1159
|
return ret;
|
|
1117
1160
|
},
|
|
1161
|
+
__wbg_instanceof_Float32Array_31e80d3e88752523: function(arg0) {
|
|
1162
|
+
let result;
|
|
1163
|
+
try {
|
|
1164
|
+
result = arg0 instanceof Float32Array;
|
|
1165
|
+
} catch (_) {
|
|
1166
|
+
result = false;
|
|
1167
|
+
}
|
|
1168
|
+
const ret = result;
|
|
1169
|
+
return ret;
|
|
1170
|
+
},
|
|
1118
1171
|
__wbg_instanceof_GpuOutOfMemoryError_829d8185d83170f0: function(arg0) {
|
|
1119
1172
|
let result;
|
|
1120
1173
|
try {
|
|
@@ -1188,6 +1241,10 @@ function __wbg_get_imports(memory) {
|
|
|
1188
1241
|
const ret = arg0.length;
|
|
1189
1242
|
return ret;
|
|
1190
1243
|
},
|
|
1244
|
+
__wbg_length_8768c6f6941913e3: function(arg0) {
|
|
1245
|
+
const ret = arg0.length;
|
|
1246
|
+
return ret;
|
|
1247
|
+
},
|
|
1191
1248
|
__wbg_limits_f4203404018656d1: function(arg0) {
|
|
1192
1249
|
const ret = arg0.limits;
|
|
1193
1250
|
return ret;
|
|
@@ -1453,6 +1510,9 @@ function __wbg_get_imports(memory) {
|
|
|
1453
1510
|
__wbg_postMessage_8105a302ed002474: function() { return handleError(function (arg0, arg1) {
|
|
1454
1511
|
arg0.postMessage(arg1);
|
|
1455
1512
|
}, arguments); },
|
|
1513
|
+
__wbg_prototypesetcall_804a1eb1b047ccb9: function(arg0, arg1, arg2) {
|
|
1514
|
+
Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);
|
|
1515
|
+
},
|
|
1456
1516
|
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
1457
1517
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1458
1518
|
},
|
|
@@ -1786,43 +1846,43 @@ function __wbg_get_imports(memory) {
|
|
|
1786
1846
|
arg0.writeBuffer(arg1, arg2, getArrayU8FromWasm0(arg3, arg4), arg5, arg6);
|
|
1787
1847
|
}, arguments); },
|
|
1788
1848
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
1789
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1849
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 440, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1790
1850
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true_);
|
|
1791
1851
|
return ret;
|
|
1792
1852
|
},
|
|
1793
1853
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
1794
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1854
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 991, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1795
1855
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue__core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_);
|
|
1796
1856
|
return ret;
|
|
1797
1857
|
},
|
|
1798
1858
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1799
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1859
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 993, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1800
1860
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___js_sys_b608be85a12bc1d0___futures__task__wait_async_polyfill__MessageEvent______true_);
|
|
1801
1861
|
return ret;
|
|
1802
1862
|
},
|
|
1803
1863
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
1804
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
1864
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 438, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1805
1865
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_);
|
|
1806
1866
|
return ret;
|
|
1807
1867
|
},
|
|
1808
1868
|
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
1809
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
1810
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1869
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 440, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1870
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__55);
|
|
1811
1871
|
return ret;
|
|
1812
1872
|
},
|
|
1813
1873
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
1814
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx:
|
|
1815
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1874
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 440, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1875
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__56);
|
|
1816
1876
|
return ret;
|
|
1817
1877
|
},
|
|
1818
1878
|
__wbindgen_generic_0000000000000007: function(arg0, arg1) {
|
|
1819
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
1820
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1879
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 438, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1880
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__57);
|
|
1821
1881
|
return ret;
|
|
1822
1882
|
},
|
|
1823
1883
|
__wbindgen_generic_0000000000000008: function(arg0, arg1) {
|
|
1824
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
1825
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1884
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 438, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1885
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__58);
|
|
1826
1886
|
return ret;
|
|
1827
1887
|
},
|
|
1828
1888
|
__wbindgen_generic_0000000000000009: function(arg0) {
|
|
@@ -1884,12 +1944,12 @@ function wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___js_sys_b
|
|
|
1884
1944
|
wasm.wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___js_sys_b608be85a12bc1d0___futures__task__wait_async_polyfill__MessageEvent______true_(arg0, arg1, arg2);
|
|
1885
1945
|
}
|
|
1886
1946
|
|
|
1887
|
-
function
|
|
1888
|
-
wasm.
|
|
1947
|
+
function wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__55(arg0, arg1, arg2) {
|
|
1948
|
+
wasm.wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__55(arg0, arg1, arg2);
|
|
1889
1949
|
}
|
|
1890
1950
|
|
|
1891
|
-
function
|
|
1892
|
-
wasm.
|
|
1951
|
+
function wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__56(arg0, arg1, arg2) {
|
|
1952
|
+
wasm.wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue______true__56(arg0, arg1, arg2);
|
|
1893
1953
|
}
|
|
1894
1954
|
|
|
1895
1955
|
function wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___JsValue__core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true_(arg0, arg1, arg2) {
|
|
@@ -1906,15 +1966,15 @@ function wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bin
|
|
|
1906
1966
|
}
|
|
1907
1967
|
}
|
|
1908
1968
|
|
|
1909
|
-
function
|
|
1910
|
-
const ret = wasm.
|
|
1969
|
+
function wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__57(arg0, arg1, arg2) {
|
|
1970
|
+
const ret = wasm.wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__57(arg0, arg1, arg2);
|
|
1911
1971
|
if (ret[1]) {
|
|
1912
1972
|
throw takeFromExternrefTable0(ret[0]);
|
|
1913
1973
|
}
|
|
1914
1974
|
}
|
|
1915
1975
|
|
|
1916
|
-
function
|
|
1917
|
-
const ret = wasm.
|
|
1976
|
+
function wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__58(arg0, arg1, arg2) {
|
|
1977
|
+
const ret = wasm.wasm_bindgen_3c612a990bfab728___convert__closures_____invoke___wasm_bindgen_3c612a990bfab728___sys__JsNullable_wgpu_4ecf802b864e9046___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_2b10d7c4e784534e___result__Result_____wasm_bindgen_3c612a990bfab728___JsError___true__58(arg0, arg1, arg2);
|
|
1918
1978
|
if (ret[1]) {
|
|
1919
1979
|
throw takeFromExternrefTable0(ret[0]);
|
|
1920
1980
|
}
|
|
Binary file
|