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
package/dist/models.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Public model API: {@link loadModel}, {@link Model} and {@link Session}. */
|
|
2
2
|
import { AsyncQueue } from "./async-queue.js";
|
|
3
|
+
import { prepareAudio } from "./audio.js";
|
|
3
4
|
import { EngineClient } from "./client.js";
|
|
4
5
|
import { recommendedSampling } from "./curated.js";
|
|
5
6
|
import { WebslmError, abortError, isAborted, toWebslmError } from "./errors.js";
|
|
@@ -773,7 +774,8 @@ export class Model extends Conversation {
|
|
|
773
774
|
throw new WebslmError("INVALID_ARGUMENT", "embed takes a string or an array of strings");
|
|
774
775
|
}
|
|
775
776
|
if (this.#info.embedding === undefined) {
|
|
776
|
-
|
|
777
|
+
const kind = this.#info.speech === undefined ? "a language model" : "a speech recognition model";
|
|
778
|
+
throw new WebslmError("UNSUPPORTED_TASK", `${this.#info.repo ?? this.#info.modelType} is ${kind}; embed needs an embedding model`);
|
|
777
779
|
}
|
|
778
780
|
const result = await this.client.request({
|
|
779
781
|
type: "embed",
|
|
@@ -788,6 +790,58 @@ export class Model extends Conversation {
|
|
|
788
790
|
const vectors = list.map((_, i) => data.subarray(i * dimensions, (i + 1) * dimensions));
|
|
789
791
|
return { vectors, data, dimensions, tokens: Array.from(result.tokens) };
|
|
790
792
|
}
|
|
793
|
+
/**
|
|
794
|
+
* Transcribes speech with a speech recognition model (Whisper; see
|
|
795
|
+
* {@link ModelInfo.speech}), 30 s at a time, decoding greedily as
|
|
796
|
+
* `transformers` does. `audio` is mono PCM (`Float32Array`, at
|
|
797
|
+
* `options.sampleRate`, 16 kHz by default) or an audio file: WAV
|
|
798
|
+
* everywhere, any format the browser decodes in a page (see
|
|
799
|
+
* {@link AudioInput}). The language is detected unless given;
|
|
800
|
+
* `task: "translate"` translates into English. Rejects with
|
|
801
|
+
* `UNSUPPORTED_TASK` on other models, and with `ABORTED` when
|
|
802
|
+
* `options.signal` fires.
|
|
803
|
+
*
|
|
804
|
+
* ```ts
|
|
805
|
+
* const model = await loadModel("openai/whisper-tiny");
|
|
806
|
+
* const file = await fetch("/speech.mp3").then((r) => r.blob());
|
|
807
|
+
* const { text, language } = await model.transcribe(file, { onToken: (t) => output.append(t) });
|
|
808
|
+
* ```
|
|
809
|
+
*/
|
|
810
|
+
async transcribe(audio, options = {}) {
|
|
811
|
+
if (this.#info.speech === undefined) {
|
|
812
|
+
throw new WebslmError("UNSUPPORTED_TASK", `${this.#info.repo ?? this.#info.modelType} is not a speech recognition model; transcribe needs one (Whisper)`);
|
|
813
|
+
}
|
|
814
|
+
if (options.task !== undefined && options.task !== "transcribe" && options.task !== "translate") {
|
|
815
|
+
throw new WebslmError("INVALID_ARGUMENT", 'task must be "transcribe" or "translate"');
|
|
816
|
+
}
|
|
817
|
+
if (isAborted(options.signal))
|
|
818
|
+
throw abortError(options.signal);
|
|
819
|
+
const prepared = await prepareAudio(audio, options.sampleRate);
|
|
820
|
+
const onToken = options.onToken;
|
|
821
|
+
const result = await this.client.request({
|
|
822
|
+
type: "transcribe",
|
|
823
|
+
model: this.modelId,
|
|
824
|
+
audio: prepared.audio,
|
|
825
|
+
options: {
|
|
826
|
+
...(options.language === undefined ? {} : { language: options.language }),
|
|
827
|
+
...(options.task === undefined ? {} : { task: options.task }),
|
|
828
|
+
...(options.maxNewTokens === undefined ? {} : { maxNewTokens: options.maxNewTokens }),
|
|
829
|
+
...(prepared.sampleRate === undefined ? {} : { sampleRate: prepared.sampleRate }),
|
|
830
|
+
},
|
|
831
|
+
}, {
|
|
832
|
+
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
833
|
+
...(onToken === undefined ? {} : { onDelta: (delta) => onToken(delta.text) }),
|
|
834
|
+
});
|
|
835
|
+
if (result.stopped && isAborted(options.signal))
|
|
836
|
+
throw abortError(options.signal);
|
|
837
|
+
return {
|
|
838
|
+
text: result.text,
|
|
839
|
+
...(result.language === null ? {} : { language: result.language }),
|
|
840
|
+
duration: result.duration,
|
|
841
|
+
segments: result.segments,
|
|
842
|
+
tokens: result.tokens,
|
|
843
|
+
};
|
|
844
|
+
}
|
|
791
845
|
/** Starts an independent session (its own KV cache) for low-level use. */
|
|
792
846
|
async session() {
|
|
793
847
|
const id = await this.client.request({ type: "createSession", model: this.modelId });
|
package/dist/native.d.ts
CHANGED
|
@@ -91,6 +91,12 @@ export interface NativeModel {
|
|
|
91
91
|
dimensions: number;
|
|
92
92
|
tokens: Uint32Array;
|
|
93
93
|
}>;
|
|
94
|
+
/**
|
|
95
|
+
* Speech recognition models only (`UNSUPPORTED_TASK` otherwise). Resolves
|
|
96
|
+
* to the transcription and `pieces`, the number of `onText` calls (they
|
|
97
|
+
* can arrive after the result).
|
|
98
|
+
*/
|
|
99
|
+
transcribe?(audio: Float32Array | Uint8Array, optionsJson: string, onText: ((text: string) => void) | null, cancel: NativeCancelToken | null): Promise<unknown>;
|
|
94
100
|
free(): void;
|
|
95
101
|
}
|
|
96
102
|
/** The exports of the addon. */
|
package/dist/protocol.d.ts
CHANGED
|
@@ -253,6 +253,12 @@ export type Request = WithId<{
|
|
|
253
253
|
readonly model: number;
|
|
254
254
|
readonly prompt: string;
|
|
255
255
|
readonly options: WireImageOptions;
|
|
256
|
+
} | {
|
|
257
|
+
readonly type: "transcribe";
|
|
258
|
+
readonly model: number;
|
|
259
|
+
/** Mono PCM samples, or the bytes of a WAV file. */
|
|
260
|
+
readonly audio: Float32Array | Uint8Array;
|
|
261
|
+
readonly options: WireTranscribeOptions;
|
|
256
262
|
} | {
|
|
257
263
|
readonly type: "unload";
|
|
258
264
|
readonly model: number;
|
|
@@ -313,6 +319,31 @@ export type Response = {
|
|
|
313
319
|
};
|
|
314
320
|
/** Value of an `applyAdapter` result (`removeAdapter` resolves to it or `null`). */
|
|
315
321
|
export type WireLoraResult = LoraInfo;
|
|
322
|
+
/** Options of a `transcribe` request (no signal, no callback). */
|
|
323
|
+
export interface WireTranscribeOptions {
|
|
324
|
+
readonly language?: string;
|
|
325
|
+
readonly task?: "transcribe" | "translate";
|
|
326
|
+
readonly maxNewTokens?: number;
|
|
327
|
+
readonly sampleRate?: number;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Value of a `transcribe` result. Its text streams as `delta` messages
|
|
331
|
+
* (`token` is -1: pieces of text, not tokens).
|
|
332
|
+
*/
|
|
333
|
+
export interface WireTranscription {
|
|
334
|
+
readonly text: string;
|
|
335
|
+
readonly language: string | null;
|
|
336
|
+
readonly duration: number;
|
|
337
|
+
readonly segments: readonly {
|
|
338
|
+
readonly id: number;
|
|
339
|
+
readonly start: number;
|
|
340
|
+
readonly end: number;
|
|
341
|
+
readonly text: string;
|
|
342
|
+
readonly tokens: readonly number[];
|
|
343
|
+
}[];
|
|
344
|
+
readonly tokens: number;
|
|
345
|
+
readonly stopped: boolean;
|
|
346
|
+
}
|
|
316
347
|
/** Value of an `embed` result. */
|
|
317
348
|
export interface WireEmbedResult {
|
|
318
349
|
readonly data: Float32Array;
|
package/dist/types.d.ts
CHANGED
|
@@ -629,6 +629,69 @@ export interface Embeddings {
|
|
|
629
629
|
/** Tokens read from each text (texts longer than the model's limit are cut). */
|
|
630
630
|
readonly tokens: readonly number[];
|
|
631
631
|
}
|
|
632
|
+
/** What a speech recognition model (Whisper) reads, in {@link ModelInfo.speech}. */
|
|
633
|
+
export interface SpeechInfo {
|
|
634
|
+
/** Sample rate the model reads (16000); other rates are resampled. */
|
|
635
|
+
readonly sampleRate: number;
|
|
636
|
+
/** Mel bins of the features (80, or 128 for large-v3 checkpoints). */
|
|
637
|
+
readonly melBins: number;
|
|
638
|
+
/** Seconds of audio per window (30): longer audio is transcribed one window after the other. */
|
|
639
|
+
readonly windowSeconds: number;
|
|
640
|
+
/** Whether the model knows several languages (and translates into English). */
|
|
641
|
+
readonly multilingual: boolean;
|
|
642
|
+
/** Codes of the languages it has tokens for (empty for English-only models). */
|
|
643
|
+
readonly languages: readonly string[];
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Audio for {@link Model.transcribe}: mono PCM samples (`Float32Array`, at
|
|
647
|
+
* {@link TranscribeOptions.sampleRate}, 16 kHz by default), or an encoded
|
|
648
|
+
* file (`ArrayBuffer`, `Uint8Array` or `Blob`). WAV files are decoded by the
|
|
649
|
+
* engine everywhere; browsers decode the other formats (MP3, Ogg, WebM, M4A...)
|
|
650
|
+
* with Web Audio first. In Node, pass PCM or WAV (convert other formats with
|
|
651
|
+
* ffmpeg, e.g. `ffmpeg -i in.mp3 -ac 1 -ar 16000 out.wav`).
|
|
652
|
+
*/
|
|
653
|
+
export type AudioInput = Float32Array | ArrayBuffer | Uint8Array | Blob;
|
|
654
|
+
/** Options of {@link Model.transcribe}. */
|
|
655
|
+
export interface TranscribeOptions {
|
|
656
|
+
/**
|
|
657
|
+
* The spoken language: a code (`"en"`), an English name (`"french"`) or a
|
|
658
|
+
* token (`"<|fr|>"`). Default: detected from the first 30 s (ignored by
|
|
659
|
+
* English-only models, which take only English).
|
|
660
|
+
*/
|
|
661
|
+
readonly language?: string;
|
|
662
|
+
/** `"transcribe"` (default), or `"translate"` into English (multilingual models). */
|
|
663
|
+
readonly task?: "transcribe" | "translate";
|
|
664
|
+
/** Largest number of tokens per 30 s window (default: the model's limit, 448 positions). */
|
|
665
|
+
readonly maxNewTokens?: number;
|
|
666
|
+
/** Sample rate of PCM input (default 16000; other rates are resampled). Ignored for files. */
|
|
667
|
+
readonly sampleRate?: number;
|
|
668
|
+
/** Stops the transcription: the promise rejects with an `ABORTED` error. */
|
|
669
|
+
readonly signal?: AbortSignal;
|
|
670
|
+
/** Receives the text as it is generated, piece by piece. */
|
|
671
|
+
readonly onToken?: (text: string) => void;
|
|
672
|
+
}
|
|
673
|
+
/** One 30 s window of a {@link Transcription}. */
|
|
674
|
+
export interface TranscriptionSegment {
|
|
675
|
+
readonly id: number;
|
|
676
|
+
/** Start and end of the window, in seconds. */
|
|
677
|
+
readonly start: number;
|
|
678
|
+
readonly end: number;
|
|
679
|
+
readonly text: string;
|
|
680
|
+
/** Token ids generated for the window (no prompt, no end token). */
|
|
681
|
+
readonly tokens: readonly number[];
|
|
682
|
+
}
|
|
683
|
+
/** What {@link Model.transcribe} resolves to. */
|
|
684
|
+
export interface Transcription {
|
|
685
|
+
/** The whole text, trimmed. */
|
|
686
|
+
readonly text: string;
|
|
687
|
+
/** The language code used (given or detected); absent for English-only models. */
|
|
688
|
+
readonly language?: string;
|
|
689
|
+
/** Length of the audio, in seconds. */
|
|
690
|
+
readonly duration: number;
|
|
691
|
+
readonly segments: readonly TranscriptionSegment[];
|
|
692
|
+
/** Tokens generated, over every window. */
|
|
693
|
+
readonly tokens: number;
|
|
694
|
+
}
|
|
632
695
|
export interface ModelInfo {
|
|
633
696
|
/** Hub repository id, when loaded from the hub. */
|
|
634
697
|
readonly repo?: string;
|
|
@@ -682,6 +745,11 @@ export interface ModelInfo {
|
|
|
682
745
|
* BERT, ModernBERT, model2vec); absent for language models.
|
|
683
746
|
*/
|
|
684
747
|
readonly embedding?: EmbeddingInfo;
|
|
748
|
+
/**
|
|
749
|
+
* What `transcribe` reads, for a speech recognition model (Whisper);
|
|
750
|
+
* absent for other models.
|
|
751
|
+
*/
|
|
752
|
+
readonly speech?: SpeechInfo;
|
|
685
753
|
readonly stopTokens: readonly number[];
|
|
686
754
|
readonly tokenizer: {
|
|
687
755
|
readonly vocabSize: number;
|
package/dist/wasm.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface WasmExports {
|
|
|
13
13
|
supportedModelTypes(): string[];
|
|
14
14
|
/** `model_type` values of the encoders the engine embeds with. */
|
|
15
15
|
supportedEncoderTypes(): string[];
|
|
16
|
+
/** `model_type` values of the speech recognition models the engine transcribes with. */
|
|
17
|
+
supportedSpeechTypes(): string[];
|
|
16
18
|
/** Parses a safetensors header (see `parseSafetensorsHeader`). */
|
|
17
19
|
parseSafetensorsHeader(bytes: Uint8Array): unknown;
|
|
18
20
|
/** Incremental SHA-256 (`finish()` returns the hex digest and resets). */
|
package/native-manifest.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.10.0",
|
|
3
3
|
"assets": {
|
|
4
4
|
"darwin-arm64": {
|
|
5
|
-
"file": "webslm-node-0.
|
|
6
|
-
"size":
|
|
7
|
-
"sha256": "
|
|
8
|
-
"nodeSha256": "
|
|
5
|
+
"file": "webslm-node-0.10.0-darwin-arm64.node.gz",
|
|
6
|
+
"size": 5735325,
|
|
7
|
+
"sha256": "1c71b3a4118910683e4c8bad68dd3e1a3bfa2dd52f0ad175fdbdca4411ead808",
|
|
8
|
+
"nodeSha256": "340dd77e562ee2a2c16baa9e9d58e51d839d739c4e136d6f004f410a9ae1db28"
|
|
9
9
|
},
|
|
10
10
|
"darwin-x64": {
|
|
11
|
-
"file": "webslm-node-0.
|
|
12
|
-
"size":
|
|
13
|
-
"sha256": "
|
|
14
|
-
"nodeSha256": "
|
|
11
|
+
"file": "webslm-node-0.10.0-darwin-x64.node.gz",
|
|
12
|
+
"size": 6050335,
|
|
13
|
+
"sha256": "3af237e3ee639cfb6c282a57d04cbf064009e5e16aac7eb00e94fcdc4e081709",
|
|
14
|
+
"nodeSha256": "5a57693b8f73b5e594d7a742181d87bf8a6c4e08f2f7a22c142b8cf1b1dad692"
|
|
15
15
|
},
|
|
16
16
|
"linux-x64-gnu": {
|
|
17
|
-
"file": "webslm-node-0.
|
|
18
|
-
"size":
|
|
19
|
-
"sha256": "
|
|
20
|
-
"nodeSha256": "
|
|
17
|
+
"file": "webslm-node-0.10.0-linux-x64-gnu.node.gz",
|
|
18
|
+
"size": 6072387,
|
|
19
|
+
"sha256": "1e0da2b585266ae48d7c0a627e2666ed0535b6c9284c0605ea287a76236fb1af",
|
|
20
|
+
"nodeSha256": "c28830b7d6e940160161b3f202d4ee767627e7bd48d34958ed6c5c04bff1ccc8"
|
|
21
21
|
},
|
|
22
22
|
"linux-arm64-gnu": {
|
|
23
|
-
"file": "webslm-node-0.
|
|
24
|
-
"size":
|
|
25
|
-
"sha256": "
|
|
26
|
-
"nodeSha256": "
|
|
23
|
+
"file": "webslm-node-0.10.0-linux-arm64-gnu.node.gz",
|
|
24
|
+
"size": 5696840,
|
|
25
|
+
"sha256": "2ec200a92be2b0bf5f2923d992e395fa1cd6de52ed83bc0153c319f10b44cc3b",
|
|
26
|
+
"nodeSha256": "93fe958e29512ee71a1c10013e775e28aba2e5e6c38606b17519d292ae290390"
|
|
27
27
|
},
|
|
28
28
|
"linux-x64-musl": {
|
|
29
|
-
"file": "webslm-node-0.
|
|
30
|
-
"size":
|
|
31
|
-
"sha256": "
|
|
32
|
-
"nodeSha256": "
|
|
29
|
+
"file": "webslm-node-0.10.0-linux-x64-musl.node.gz",
|
|
30
|
+
"size": 6479536,
|
|
31
|
+
"sha256": "30b430823f967231d5dec99f5dca9634e490f7ab62c1363b1fd723548ea42e91",
|
|
32
|
+
"nodeSha256": "069dc4e6fe0abe7a656f29233e04ac8cb3c51c044cec5fb88ef1b12dbeefa83b"
|
|
33
33
|
},
|
|
34
34
|
"linux-arm64-musl": {
|
|
35
|
-
"file": "webslm-node-0.
|
|
36
|
-
"size":
|
|
37
|
-
"sha256": "
|
|
38
|
-
"nodeSha256": "
|
|
35
|
+
"file": "webslm-node-0.10.0-linux-arm64-musl.node.gz",
|
|
36
|
+
"size": 6233551,
|
|
37
|
+
"sha256": "b895c2602be95b45fd9013f64b3ea6a4877b87d18924eb7291a821afe0a273e1",
|
|
38
|
+
"nodeSha256": "b3422581d06a0511b77c7cd8ec8e9f719f9b5f95827ba476841bea59122d016a"
|
|
39
39
|
},
|
|
40
40
|
"win32-x64-msvc": {
|
|
41
|
-
"file": "webslm-node-0.
|
|
42
|
-
"size":
|
|
43
|
-
"sha256": "
|
|
44
|
-
"nodeSha256": "
|
|
41
|
+
"file": "webslm-node-0.10.0-win32-x64-msvc.node.gz",
|
|
42
|
+
"size": 6582581,
|
|
43
|
+
"sha256": "e25818bbc876742f833dae75deb947dcdac3e24c4ebcc290afee582f39b35be3",
|
|
44
|
+
"nodeSha256": "d55270b77bbe9d8ccfc928b4d469f0527734e5efb292fe71b6a0b726c948d2ff"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webslm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Run small language models in the browser and in Node, straight from their original Hugging Face checkpoints: a Rust engine compiled to WebAssembly, in a worker, with an offline cache.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Maxime Golfier",
|
|
@@ -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;
|
|
@@ -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: 368, 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: 296, 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: 300, 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: 300, 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: 296, 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: 296, 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;
|