@min-pack/tfjs-node 2.17.2 → 3.8.1-patch.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 +4 -2
- package/addon-node_modules/onnxruntime-node/bin/{napi-v3/linux/x64/libonnxruntime.so.1.14.0 → napi-v6/linux/arm64/libonnxruntime.so.1} +0 -0
- package/addon-node_modules/onnxruntime-node/bin/napi-v6/linux/arm64/onnxruntime_binding.node +0 -0
- package/addon-node_modules/onnxruntime-node/bin/napi-v6/linux/x64/libonnxruntime.so.1 +0 -0
- package/addon-node_modules/onnxruntime-node/bin/napi-v6/linux/x64/onnxruntime_binding.node +0 -0
- package/index.d.ts +2 -0
- package/index.js +7102 -3371
- package/package.json +1 -10
- package/tfjs-types/backends/onnx.d.ts +37 -0
- package/tfjs-types/base/feature_extraction_utils.d.ts +41 -0
- package/tfjs-types/base/image_processors_utils.d.ts +332 -0
- package/tfjs-types/base/processing_utils.d.ts +89 -0
- package/tfjs-types/configs.d.ts +93 -0
- package/tfjs-types/env.d.ts +112 -0
- package/tfjs-types/generation/configuration_utils.d.ts +326 -0
- package/tfjs-types/generation/logits_process.d.ts +364 -0
- package/tfjs-types/generation/logits_sampler.d.ts +51 -0
- package/tfjs-types/generation/parameters.d.ts +47 -0
- package/tfjs-types/generation/stopping_criteria.d.ts +81 -0
- package/tfjs-types/generation/streamers.d.ts +88 -0
- package/tfjs-types/models/audio_spectrogram_transformer/feature_extraction_audio_spectrogram_transformer.d.ts +25 -0
- package/tfjs-types/models/auto/feature_extraction_auto.d.ts +5 -0
- package/tfjs-types/models/auto/image_processing_auto.d.ts +5 -0
- package/tfjs-types/models/auto/processing_auto.d.ts +39 -0
- package/tfjs-types/models/beit/image_processing_beit.d.ts +4 -0
- package/tfjs-types/models/bit/image_processing_bit.d.ts +4 -0
- package/tfjs-types/models/chinese_clip/image_processing_chinese_clip.d.ts +4 -0
- package/tfjs-types/models/clap/feature_extraction_clap.d.ts +57 -0
- package/tfjs-types/models/clip/image_processing_clip.d.ts +6 -0
- package/tfjs-types/models/convnext/image_processing_convnext.d.ts +12 -0
- package/tfjs-types/models/dac/feature_extraction_dac.d.ts +4 -0
- package/tfjs-types/models/deit/image_processing_deit.d.ts +6 -0
- package/tfjs-types/models/detr/image_processing_detr.d.ts +42 -0
- package/tfjs-types/models/dinov3_vit/image_processing_dinov3_vit.d.ts +4 -0
- package/tfjs-types/models/donut/image_processing_donut.d.ts +7 -0
- package/tfjs-types/models/dpt/image_processing_dpt.d.ts +6 -0
- package/tfjs-types/models/efficientnet/image_processing_efficientnet.d.ts +6 -0
- package/tfjs-types/models/encodec/feature_extraction_encodec.d.ts +13 -0
- package/tfjs-types/models/feature_extractors.d.ts +16 -0
- package/tfjs-types/models/florence2/processing_florence2.d.ts +39 -0
- package/tfjs-types/models/gemma3n/feature_extraction_gemma3n.d.ts +35 -0
- package/tfjs-types/models/gemma3n/processing_gemma3n.d.ts +31 -0
- package/tfjs-types/models/glpn/image_processing_glpn.d.ts +4 -0
- package/tfjs-types/models/grounding_dino/image_processing_grounding_dino.d.ts +20 -0
- package/tfjs-types/models/grounding_dino/processing_grounding_dino.d.ts +27 -0
- package/tfjs-types/models/idefics3/image_processing_idefics3.d.ts +40 -0
- package/tfjs-types/models/idefics3/processing_idefics3.d.ts +19 -0
- package/tfjs-types/models/image_processors.d.ts +44 -0
- package/tfjs-types/models/janus/image_processing_janus.d.ts +7 -0
- package/tfjs-types/models/janus/processing_janus.d.ts +77 -0
- package/tfjs-types/models/jina_clip/image_processing_jina_clip.d.ts +5 -0
- package/tfjs-types/models/jina_clip/processing_jina_clip.d.ts +9 -0
- package/tfjs-types/models/llava/processing_llava.d.ts +12 -0
- package/tfjs-types/models/llava_onevision/image_processing_llava_onevision.d.ts +4 -0
- package/tfjs-types/models/mask2former/image_processing_mask2former.d.ts +4 -0
- package/tfjs-types/models/maskformer/image_processing_maskformer.d.ts +22 -0
- package/tfjs-types/models/mgp_str/processing_mgp_str.d.ts +64 -0
- package/tfjs-types/models/mobilenet_v1/image_processing_mobilenet_v1.d.ts +6 -0
- package/tfjs-types/models/mobilenet_v2/image_processing_mobilenet_v2.d.ts +6 -0
- package/tfjs-types/models/mobilenet_v3/image_processing_mobilenet_v3.d.ts +6 -0
- package/tfjs-types/models/mobilenet_v4/image_processing_mobilenet_v4.d.ts +6 -0
- package/tfjs-types/models/mobilevit/image_processing_mobilevit.d.ts +6 -0
- package/tfjs-types/models/moonshine/feature_extraction_moonshine.d.ts +13 -0
- package/tfjs-types/models/moonshine/processing_moonshine.d.ts +17 -0
- package/tfjs-types/models/nougat/image_processing_nougat.d.ts +4 -0
- package/tfjs-types/models/owlv2/image_processing_owlv2.d.ts +4 -0
- package/tfjs-types/models/owlvit/image_processing_owlvit.d.ts +10 -0
- package/tfjs-types/models/owlvit/processing_owlvit.d.ts +8 -0
- package/tfjs-types/models/paligemma/processing_paligemma.d.ts +12 -0
- package/tfjs-types/models/parakeet/feature_extraction_parakeet.d.ts +22 -0
- package/tfjs-types/models/phi3_v/image_processing_phi3_v.d.ts +17 -0
- package/tfjs-types/models/phi3_v/processing_phi3_v.d.ts +21 -0
- package/tfjs-types/models/pixtral/image_processing_pixtral.d.ts +4 -0
- package/tfjs-types/models/pixtral/processing_pixtral.d.ts +12 -0
- package/tfjs-types/models/processors.d.ts +25 -0
- package/tfjs-types/models/pvt/image_processing_pvt.d.ts +4 -0
- package/tfjs-types/models/pyannote/feature_extraction_pyannote.d.ts +31 -0
- package/tfjs-types/models/pyannote/processing_pyannote.d.ts +19 -0
- package/tfjs-types/models/qwen2_vl/image_processing_qwen2_vl.d.ts +11 -0
- package/tfjs-types/models/qwen2_vl/processing_qwen2_vl.d.ts +17 -0
- package/tfjs-types/models/rt_detr/image_processing_rt_detr.d.ts +8 -0
- package/tfjs-types/models/sam/image_processing_sam.d.ts +103 -0
- package/tfjs-types/models/sam/processing_sam.d.ts +9 -0
- package/tfjs-types/models/sam2/image_processing_sam2.d.ts +2 -0
- package/tfjs-types/models/sam2/processing_sam2.d.ts +6 -0
- package/tfjs-types/models/sam3/image_processing_sam3.d.ts +2 -0
- package/tfjs-types/models/sapiens/image_processing_sapiens.d.ts +10 -0
- package/tfjs-types/models/seamless_m4t/feature_extraction_seamless_m4t.d.ts +34 -0
- package/tfjs-types/models/segformer/image_processing_segformer.d.ts +10 -0
- package/tfjs-types/models/siglip/image_processing_siglip.d.ts +4 -0
- package/tfjs-types/models/smolvlm/image_processing_smolvlm.d.ts +2 -0
- package/tfjs-types/models/smolvlm/processing_smolvlm.d.ts +2 -0
- package/tfjs-types/models/snac/feature_extraction_snac.d.ts +4 -0
- package/tfjs-types/models/speecht5/feature_extraction_speecht5.d.ts +4 -0
- package/tfjs-types/models/speecht5/processing_speecht5.d.ts +14 -0
- package/tfjs-types/models/swin2sr/image_processing_swin2sr.d.ts +5 -0
- package/tfjs-types/models/ultravox/processing_ultravox.d.ts +16 -0
- package/tfjs-types/models/vit/image_processing_vit.d.ts +6 -0
- package/tfjs-types/models/vitmatte/image_processing_vitmatte.d.ts +12 -0
- package/tfjs-types/models/vitpose/image_processing_vitpose.d.ts +26 -0
- package/tfjs-types/models/voxtral/processing_voxtral.d.ts +16 -0
- package/tfjs-types/models/wav2vec2/feature_extraction_wav2vec2.d.ts +19 -0
- package/tfjs-types/models/wav2vec2/processing_wav2vec2.d.ts +14 -0
- package/tfjs-types/models/wav2vec2_with_lm/processing_wav2vec2_with_lm.d.ts +14 -0
- package/tfjs-types/models/wespeaker/feature_extraction_wespeaker.d.ts +23 -0
- package/tfjs-types/models/whisper/common_whisper.d.ts +8 -0
- package/tfjs-types/models/whisper/feature_extraction_whisper.d.ts +23 -0
- package/tfjs-types/models/whisper/generation_whisper.d.ts +76 -0
- package/tfjs-types/models/whisper/processing_whisper.d.ts +17 -0
- package/tfjs-types/models/yolos/image_processing_yolos.d.ts +10 -0
- package/tfjs-types/models.d.ts +4396 -0
- package/tfjs-types/ops/registry.d.ts +13 -0
- package/tfjs-types/pipelines.d.ts +2433 -0
- package/tfjs-types/tokenizers.d.ts +1002 -0
- package/tfjs-types/transformers.d.ts +27 -0
- package/tfjs-types/utils/audio.d.ts +160 -0
- package/tfjs-types/utils/constants.d.ts +8 -0
- package/tfjs-types/utils/core.d.ts +231 -0
- package/tfjs-types/utils/data-structures.d.ts +294 -0
- package/tfjs-types/utils/devices.d.ts +18 -0
- package/tfjs-types/utils/dtypes.d.ts +20 -0
- package/tfjs-types/utils/generic.d.ts +11 -0
- package/tfjs-types/utils/hub.d.ts +175 -0
- package/tfjs-types/utils/image.d.ts +141 -0
- package/tfjs-types/utils/maths.d.ts +282 -0
- package/tfjs-types/utils/tensor.d.ts +490 -0
- package/tfjs-types/utils/video.d.ts +37 -0
- package/addon-node_modules/onnxruntime-node/bin/napi-v3/linux/arm64/libonnxruntime.so.1.14.0 +0 -0
- package/addon-node_modules/onnxruntime-node/bin/napi-v3/linux/arm64/onnxruntime_binding.node +0 -0
- package/addon-node_modules/onnxruntime-node/bin/napi-v3/linux/x64/onnxruntime_binding.node +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class LlavaProcessor extends Processor {
|
|
2
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
3
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import('../../utils/image.js').RawImage} RawImage
|
|
6
|
+
*/
|
|
7
|
+
_call(images: import("../../utils/image.js").RawImage | import("../../utils/image.js").RawImage[], text?: any, kwargs?: {}): Promise<any>;
|
|
8
|
+
}
|
|
9
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
10
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
11
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
12
|
+
//# sourceMappingURL=processing_llava.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export class MaskFormerImageProcessor extends ImageProcessor {
|
|
2
|
+
post_process_panoptic_segmentation(outputs: any, threshold?: number, mask_threshold?: number, overlap_mask_area_threshold?: number, label_ids_to_fuse?: Set<number>, target_sizes?: [number, number][]): Array<{
|
|
3
|
+
segmentation: import("../../transformers.js").Tensor;
|
|
4
|
+
segments_info: Array<{
|
|
5
|
+
id: number;
|
|
6
|
+
label_id: number;
|
|
7
|
+
score: number;
|
|
8
|
+
}>;
|
|
9
|
+
}>;
|
|
10
|
+
post_process_instance_segmentation(outputs: any, threshold?: number, target_sizes?: [number, number][]): Array<{
|
|
11
|
+
segmentation: import("../../transformers.js").Tensor;
|
|
12
|
+
segments_info: Array<{
|
|
13
|
+
id: number;
|
|
14
|
+
label_id: number;
|
|
15
|
+
score: number;
|
|
16
|
+
}>;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export class MaskFormerFeatureExtractor extends MaskFormerImageProcessor {
|
|
20
|
+
}
|
|
21
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
22
|
+
//# sourceMappingURL=image_processing_maskformer.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export class MgpstrProcessor extends Processor {
|
|
2
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
3
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
4
|
+
/**
|
|
5
|
+
* @returns {import('../../tokenizers.js').MgpstrTokenizer} The character tokenizer.
|
|
6
|
+
*/
|
|
7
|
+
get char_tokenizer(): import("../../tokenizers.js").MgpstrTokenizer;
|
|
8
|
+
/**
|
|
9
|
+
* @returns {import('../../tokenizers.js').GPT2Tokenizer} The BPE tokenizer.
|
|
10
|
+
*/
|
|
11
|
+
get bpe_tokenizer(): import("../../tokenizers.js").GPT2Tokenizer;
|
|
12
|
+
/**
|
|
13
|
+
* @returns {import('../../tokenizers.js').BertTokenizer} The WordPiece tokenizer.
|
|
14
|
+
*/
|
|
15
|
+
get wp_tokenizer(): import("../../tokenizers.js").BertTokenizer;
|
|
16
|
+
/**
|
|
17
|
+
* Helper function to decode the model prediction logits.
|
|
18
|
+
* @param {import('../../utils/tensor.js').Tensor} pred_logits Model prediction logits.
|
|
19
|
+
* @param {string} format Type of model prediction. Must be one of ['char', 'bpe', 'wp'].
|
|
20
|
+
* @returns {[string[], number[]]} The decoded sentences and their confidence scores.
|
|
21
|
+
*/
|
|
22
|
+
_decode_helper(pred_logits: import("../../utils/tensor.js").Tensor, format: string): [string[], number[]];
|
|
23
|
+
/**
|
|
24
|
+
* Convert a list of lists of char token ids into a list of strings by calling char tokenizer.
|
|
25
|
+
* @param {number[][]} sequences List of tokenized input ids.
|
|
26
|
+
* @returns {string[]} The list of char decoded sentences.
|
|
27
|
+
*/
|
|
28
|
+
char_decode(sequences: number[][]): string[];
|
|
29
|
+
/**
|
|
30
|
+
* Convert a list of lists of BPE token ids into a list of strings by calling BPE tokenizer.
|
|
31
|
+
* @param {number[][]} sequences List of tokenized input ids.
|
|
32
|
+
* @returns {string[]} The list of BPE decoded sentences.
|
|
33
|
+
*/
|
|
34
|
+
bpe_decode(sequences: number[][]): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Convert a list of lists of word piece token ids into a list of strings by calling word piece tokenizer.
|
|
37
|
+
* @param {number[][]} sequences List of tokenized input ids.
|
|
38
|
+
* @returns {string[]} The list of wp decoded sentences.
|
|
39
|
+
*/
|
|
40
|
+
wp_decode(sequences: number[][]): string[];
|
|
41
|
+
/**
|
|
42
|
+
* Convert a list of lists of token ids into a list of strings by calling decode.
|
|
43
|
+
* @param {[import('../../utils/tensor.js').Tensor, import('../../utils/tensor.js').Tensor, import('../../utils/tensor.js').Tensor]} sequences List of tokenized input ids.
|
|
44
|
+
* @returns {{generated_text: string[], scores: number[], char_preds: string[], bpe_preds: string[], wp_preds: string[]}}
|
|
45
|
+
* Dictionary of all the outputs of the decoded results.
|
|
46
|
+
* - generated_text: The final results after fusion of char, bpe, and wp.
|
|
47
|
+
* - scores: The final scores after fusion of char, bpe, and wp.
|
|
48
|
+
* - char_preds: The list of character decoded sentences.
|
|
49
|
+
* - bpe_preds: The list of BPE decoded sentences.
|
|
50
|
+
* - wp_preds: The list of wp decoded sentences.
|
|
51
|
+
*/
|
|
52
|
+
batch_decode([char_logits, bpe_logits, wp_logits]: [import("../../utils/tensor.js").Tensor, import("../../utils/tensor.js").Tensor, import("../../utils/tensor.js").Tensor]): {
|
|
53
|
+
generated_text: string[];
|
|
54
|
+
scores: number[];
|
|
55
|
+
char_preds: string[];
|
|
56
|
+
bpe_preds: string[];
|
|
57
|
+
wp_preds: string[];
|
|
58
|
+
};
|
|
59
|
+
_call(images: any, text?: any): Promise<any>;
|
|
60
|
+
}
|
|
61
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
62
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
63
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
64
|
+
//# sourceMappingURL=processing_mgp_str.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class MobileNetV1ImageProcessor extends ImageProcessor {
|
|
2
|
+
}
|
|
3
|
+
export class MobileNetV1FeatureExtractor extends MobileNetV1ImageProcessor {
|
|
4
|
+
}
|
|
5
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
6
|
+
//# sourceMappingURL=image_processing_mobilenet_v1.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class MobileNetV2ImageProcessor extends ImageProcessor {
|
|
2
|
+
}
|
|
3
|
+
export class MobileNetV2FeatureExtractor extends MobileNetV2ImageProcessor {
|
|
4
|
+
}
|
|
5
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
6
|
+
//# sourceMappingURL=image_processing_mobilenet_v2.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class MobileNetV3ImageProcessor extends ImageProcessor {
|
|
2
|
+
}
|
|
3
|
+
export class MobileNetV3FeatureExtractor extends MobileNetV3ImageProcessor {
|
|
4
|
+
}
|
|
5
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
6
|
+
//# sourceMappingURL=image_processing_mobilenet_v3.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class MobileNetV4ImageProcessor extends ImageProcessor {
|
|
2
|
+
}
|
|
3
|
+
export class MobileNetV4FeatureExtractor extends MobileNetV4ImageProcessor {
|
|
4
|
+
}
|
|
5
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
6
|
+
//# sourceMappingURL=image_processing_mobilenet_v4.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export class MobileViTImageProcessor extends ImageProcessor {
|
|
2
|
+
}
|
|
3
|
+
export class MobileViTFeatureExtractor extends MobileViTImageProcessor {
|
|
4
|
+
}
|
|
5
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
6
|
+
//# sourceMappingURL=image_processing_mobilevit.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class MoonshineFeatureExtractor extends FeatureExtractor {
|
|
2
|
+
/**
|
|
3
|
+
* Asynchronously extracts input values from a given audio using the provided configuration.
|
|
4
|
+
* @param {Float32Array|Float64Array} audio The audio data as a Float32Array/Float64Array.
|
|
5
|
+
* @returns {Promise<{ input_values: Tensor; }>} The extracted input values.
|
|
6
|
+
*/
|
|
7
|
+
_call(audio: Float32Array | Float64Array): Promise<{
|
|
8
|
+
input_values: Tensor;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
import { FeatureExtractor } from '../../base/feature_extraction_utils.js';
|
|
12
|
+
import { Tensor } from '../../utils/tensor.js';
|
|
13
|
+
//# sourceMappingURL=feature_extraction_moonshine.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a MoonshineProcessor that extracts features from an audio input.
|
|
3
|
+
*/
|
|
4
|
+
export class MoonshineProcessor extends Processor {
|
|
5
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
6
|
+
static feature_extractor_class: typeof AutoFeatureExtractor;
|
|
7
|
+
/**
|
|
8
|
+
* Calls the feature_extractor function with the given audio input.
|
|
9
|
+
* @param {any} audio The audio input to extract features from.
|
|
10
|
+
* @returns {Promise<any>} A Promise that resolves with the extracted features.
|
|
11
|
+
*/
|
|
12
|
+
_call(audio: any): Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
15
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
16
|
+
import { AutoFeatureExtractor } from "../auto/feature_extraction_auto.js";
|
|
17
|
+
//# sourceMappingURL=processing_moonshine.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class OwlViTImageProcessor extends ImageProcessor {
|
|
2
|
+
post_process_object_detection(outputs: {
|
|
3
|
+
logits: import("../../transformers.js").Tensor;
|
|
4
|
+
pred_boxes: import("../../transformers.js").Tensor;
|
|
5
|
+
}, threshold?: number, target_sizes?: [number, number][], is_zero_shot?: boolean): any[];
|
|
6
|
+
}
|
|
7
|
+
export class OwlViTFeatureExtractor extends OwlViTImageProcessor {
|
|
8
|
+
}
|
|
9
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
10
|
+
//# sourceMappingURL=image_processing_owlvit.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export class OwlViTProcessor extends Processor {
|
|
2
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
3
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
4
|
+
}
|
|
5
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
6
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
7
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
8
|
+
//# sourceMappingURL=processing_owlvit.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class PaliGemmaProcessor extends Processor {
|
|
2
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
3
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import('../../utils/image.js').RawImage} RawImage
|
|
6
|
+
*/
|
|
7
|
+
_call(images: import("../../utils/image.js").RawImage | import("../../utils/image.js").RawImage[], text?: any, kwargs?: {}): Promise<any>;
|
|
8
|
+
}
|
|
9
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
10
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
11
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
12
|
+
//# sourceMappingURL=processing_paligemma.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export class ParakeetFeatureExtractor extends FeatureExtractor {
|
|
2
|
+
constructor(config: any);
|
|
3
|
+
window: Float64Array<any>;
|
|
4
|
+
/**
|
|
5
|
+
* Computes the log-Mel spectrogram of the provided audio waveform.
|
|
6
|
+
* @param {Float32Array|Float64Array} waveform The audio waveform to process.
|
|
7
|
+
* @returns {Promise<Tensor>} An object containing the log-Mel spectrogram data as a Float32Array and its dimensions as an array of numbers.
|
|
8
|
+
*/
|
|
9
|
+
_extract_fbank_features(waveform: Float32Array | Float64Array): Promise<Tensor>;
|
|
10
|
+
/**
|
|
11
|
+
* Asynchronously extracts features from a given audio using the provided configuration.
|
|
12
|
+
* @param {Float32Array|Float64Array} audio The audio data as a Float32Array/Float64Array.
|
|
13
|
+
* @returns {Promise<{ input_features: Tensor; attention_mask: Tensor; }>} A Promise resolving to an object containing the extracted input features as a Tensor.
|
|
14
|
+
*/
|
|
15
|
+
_call(audio: Float32Array | Float64Array): Promise<{
|
|
16
|
+
input_features: Tensor;
|
|
17
|
+
attention_mask: Tensor;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
import { FeatureExtractor } from '../../base/feature_extraction_utils.js';
|
|
21
|
+
import { Tensor } from '../../utils/tensor.js';
|
|
22
|
+
//# sourceMappingURL=feature_extraction_parakeet.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class Phi3VImageProcessor extends ImageProcessor {
|
|
2
|
+
constructor(config: any);
|
|
3
|
+
_num_crops: any;
|
|
4
|
+
calc_num_image_tokens_from_image_size(width: any, height: any): number;
|
|
5
|
+
_call(images: any, { num_crops, }?: {
|
|
6
|
+
num_crops?: any;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
pixel_values: Tensor;
|
|
9
|
+
original_sizes: any[];
|
|
10
|
+
reshaped_input_sizes: any[];
|
|
11
|
+
image_sizes: Tensor;
|
|
12
|
+
num_img_tokens: number[];
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
16
|
+
import { Tensor } from "../../utils/tensor.js";
|
|
17
|
+
//# sourceMappingURL=image_processing_phi3_v.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class Phi3VProcessor extends Processor {
|
|
2
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
3
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param {string|string[]} text
|
|
7
|
+
* @param {RawImage|RawImage[]} images
|
|
8
|
+
* @param { { padding?: boolean, truncation?: boolean, num_crops?: number } | undefined } options
|
|
9
|
+
* @returns {Promise<any>}
|
|
10
|
+
*/
|
|
11
|
+
_call(text: string | string[], images?: RawImage | RawImage[], { padding, truncation, num_crops, }?: {
|
|
12
|
+
padding?: boolean;
|
|
13
|
+
truncation?: boolean;
|
|
14
|
+
num_crops?: number;
|
|
15
|
+
} | undefined): Promise<any>;
|
|
16
|
+
}
|
|
17
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
18
|
+
import { RawImage } from "../../utils/image.js";
|
|
19
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
20
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
21
|
+
//# sourceMappingURL=processing_phi3_v.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class PixtralProcessor extends Processor {
|
|
2
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
3
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import('../../utils/image.js').RawImage} RawImage
|
|
6
|
+
*/
|
|
7
|
+
_call(images: import("../../utils/image.js").RawImage | import("../../utils/image.js").RawImage[], text?: any, kwargs?: {}): Promise<any>;
|
|
8
|
+
}
|
|
9
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
10
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
11
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
12
|
+
//# sourceMappingURL=processing_pixtral.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from "./florence2/processing_florence2.js";
|
|
2
|
+
export * from "./gemma3n/processing_gemma3n.js";
|
|
3
|
+
export * from "./grounding_dino/processing_grounding_dino.js";
|
|
4
|
+
export * from "./idefics3/processing_idefics3.js";
|
|
5
|
+
export * from "./janus/processing_janus.js";
|
|
6
|
+
export * from "./jina_clip/processing_jina_clip.js";
|
|
7
|
+
export * from "./llava/processing_llava.js";
|
|
8
|
+
export * from "./mgp_str/processing_mgp_str.js";
|
|
9
|
+
export * from "./moonshine/processing_moonshine.js";
|
|
10
|
+
export * from "./owlvit/processing_owlvit.js";
|
|
11
|
+
export * from "./paligemma/processing_paligemma.js";
|
|
12
|
+
export * from "./phi3_v/processing_phi3_v.js";
|
|
13
|
+
export * from "./pixtral/processing_pixtral.js";
|
|
14
|
+
export * from "./pyannote/processing_pyannote.js";
|
|
15
|
+
export * from "./qwen2_vl/processing_qwen2_vl.js";
|
|
16
|
+
export * from "./sam/processing_sam.js";
|
|
17
|
+
export * from "./sam2/processing_sam2.js";
|
|
18
|
+
export * from "./smolvlm/processing_smolvlm.js";
|
|
19
|
+
export * from "./speecht5/processing_speecht5.js";
|
|
20
|
+
export * from "./ultravox/processing_ultravox.js";
|
|
21
|
+
export * from "./voxtral/processing_voxtral.js";
|
|
22
|
+
export * from "./wav2vec2/processing_wav2vec2.js";
|
|
23
|
+
export * from "./wav2vec2_with_lm/processing_wav2vec2_with_lm.js";
|
|
24
|
+
export * from "./whisper/processing_whisper.js";
|
|
25
|
+
//# sourceMappingURL=processors.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export class PyAnnoteFeatureExtractor extends FeatureExtractor {
|
|
2
|
+
/**
|
|
3
|
+
* Asynchronously extracts features from a given audio using the provided configuration.
|
|
4
|
+
* @param {Float32Array|Float64Array} audio The audio data as a Float32Array/Float64Array.
|
|
5
|
+
* @returns {Promise<{ input_values: Tensor; }>} The extracted input features.
|
|
6
|
+
*/
|
|
7
|
+
_call(audio: Float32Array | Float64Array): Promise<{
|
|
8
|
+
input_values: Tensor;
|
|
9
|
+
}>;
|
|
10
|
+
/**
|
|
11
|
+
* NOTE: Can return fractional values. `Math.ceil` will ensure correct value.
|
|
12
|
+
* @param {number} samples The number of frames in the audio.
|
|
13
|
+
* @returns {number} The number of frames in the audio.
|
|
14
|
+
*/
|
|
15
|
+
samples_to_frames(samples: number): number;
|
|
16
|
+
/**
|
|
17
|
+
* Post-processes the speaker diarization logits output by the model.
|
|
18
|
+
* @param {import('../../utils/tensor.js').Tensor} logits The speaker diarization logits output by the model.
|
|
19
|
+
* @param {number} num_samples Number of samples in the input audio.
|
|
20
|
+
* @returns {Array<Array<{ id: number, start: number, end: number, confidence: number }>>} The post-processed speaker diarization results.
|
|
21
|
+
*/
|
|
22
|
+
post_process_speaker_diarization(logits: import("../../utils/tensor.js").Tensor, num_samples: number): Array<Array<{
|
|
23
|
+
id: number;
|
|
24
|
+
start: number;
|
|
25
|
+
end: number;
|
|
26
|
+
confidence: number;
|
|
27
|
+
}>>;
|
|
28
|
+
}
|
|
29
|
+
import { FeatureExtractor } from '../../base/feature_extraction_utils.js';
|
|
30
|
+
import { Tensor } from '../../utils/tensor.js';
|
|
31
|
+
//# sourceMappingURL=feature_extraction_pyannote.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class PyAnnoteProcessor extends Processor {
|
|
2
|
+
static feature_extractor_class: typeof PyAnnoteFeatureExtractor;
|
|
3
|
+
/**
|
|
4
|
+
* Calls the feature_extractor function with the given audio input.
|
|
5
|
+
* @param {any} audio The audio input to extract features from.
|
|
6
|
+
* @returns {Promise<any>} A Promise that resolves with the extracted features.
|
|
7
|
+
*/
|
|
8
|
+
_call(audio: any): Promise<any>;
|
|
9
|
+
post_process_speaker_diarization(logits: import("../../transformers.js").Tensor, num_samples: number): Array<Array<{
|
|
10
|
+
id: number;
|
|
11
|
+
start: number;
|
|
12
|
+
end: number;
|
|
13
|
+
confidence: number;
|
|
14
|
+
}>>;
|
|
15
|
+
get sampling_rate(): any;
|
|
16
|
+
}
|
|
17
|
+
import { Processor } from '../../base/processing_utils.js';
|
|
18
|
+
import { PyAnnoteFeatureExtractor } from './feature_extraction_pyannote.js';
|
|
19
|
+
//# sourceMappingURL=processing_pyannote.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class Qwen2VLImageProcessor extends ImageProcessor {
|
|
2
|
+
_call(images: any, ...args: any[]): Promise<{
|
|
3
|
+
pixel_values: Tensor;
|
|
4
|
+
image_grid_thw: Tensor;
|
|
5
|
+
original_sizes: import("../../base/image_processors_utils.js").HeightWidth[];
|
|
6
|
+
reshaped_input_sizes: import("../../base/image_processors_utils.js").HeightWidth[];
|
|
7
|
+
}>;
|
|
8
|
+
}
|
|
9
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
10
|
+
import { Tensor } from "../../utils/tensor.js";
|
|
11
|
+
//# sourceMappingURL=image_processing_qwen2_vl.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class Qwen2VLProcessor extends Processor {
|
|
2
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
3
|
+
static tokenizer_class: typeof AutoTokenizer;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param {string|string[]} text
|
|
7
|
+
* @param {RawImage|RawImage[]} images
|
|
8
|
+
* @param {...any} args
|
|
9
|
+
* @returns {Promise<any>}
|
|
10
|
+
*/
|
|
11
|
+
_call(text: string | string[], images?: RawImage | RawImage[], ...args: any[]): Promise<any>;
|
|
12
|
+
}
|
|
13
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
14
|
+
import { RawImage } from "../../utils/image.js";
|
|
15
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
16
|
+
import { AutoTokenizer } from "../../tokenizers.js";
|
|
17
|
+
//# sourceMappingURL=processing_qwen2_vl.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export class RTDetrImageProcessor extends ImageProcessor {
|
|
2
|
+
post_process_object_detection(outputs: {
|
|
3
|
+
logits: import("../../transformers.js").Tensor;
|
|
4
|
+
pred_boxes: import("../../transformers.js").Tensor;
|
|
5
|
+
}, threshold?: number, target_sizes?: [number, number][], is_zero_shot?: boolean): any[];
|
|
6
|
+
}
|
|
7
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
8
|
+
//# sourceMappingURL=image_processing_rt_detr.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {object} SamImageProcessorResult
|
|
3
|
+
* @property {Tensor} pixel_values
|
|
4
|
+
* @property {import("../../base/image_processors_utils.js").HeightWidth[]} original_sizes
|
|
5
|
+
* @property {import("../../base/image_processors_utils.js").HeightWidth[]} reshaped_input_sizes
|
|
6
|
+
* @property {Tensor} [input_points]
|
|
7
|
+
* @property {Tensor} [input_labels]
|
|
8
|
+
* @property {Tensor} [input_boxes]
|
|
9
|
+
*/
|
|
10
|
+
export class SamImageProcessor extends ImageProcessor {
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param {any} input_points
|
|
14
|
+
* @param {import("../../base/image_processors_utils.js").HeightWidth[]} original_sizes
|
|
15
|
+
* @param {import("../../base/image_processors_utils.js").HeightWidth[]} reshaped_input_sizes
|
|
16
|
+
* @returns {Tensor}
|
|
17
|
+
*/
|
|
18
|
+
reshape_input_points(input_points: any, original_sizes: import("../../base/image_processors_utils.js").HeightWidth[], reshaped_input_sizes: import("../../base/image_processors_utils.js").HeightWidth[], is_bounding_box?: boolean): Tensor;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @param {any} input_labels
|
|
22
|
+
* @param {Tensor} input_points
|
|
23
|
+
* @returns {Tensor}
|
|
24
|
+
*/
|
|
25
|
+
add_input_labels(input_labels: any, input_points: Tensor): Tensor;
|
|
26
|
+
/**
|
|
27
|
+
* @param {any[]} images The URL(s) of the image(s) to extract features from.
|
|
28
|
+
* @param {Object} [options] Additional options for the processor.
|
|
29
|
+
* @param {any} [options.input_points=null] A 3D or 4D array, representing the input points provided by the user.
|
|
30
|
+
* - 3D: `[point_batch_size, nb_points_per_image, 2]`. In this case, `batch_size` is assumed to be 1.
|
|
31
|
+
* - 4D: `[batch_size, point_batch_size, nb_points_per_image, 2]`.
|
|
32
|
+
* @param {any} [options.input_labels=null] A 2D or 3D array, representing the input labels for the points, used by the prompt encoder to encode the prompt.
|
|
33
|
+
* - 2D: `[point_batch_size, nb_points_per_image]`. In this case, `batch_size` is assumed to be 1.
|
|
34
|
+
* - 3D: `[batch_size, point_batch_size, nb_points_per_image]`.
|
|
35
|
+
* @param {number[][][]} [options.input_boxes=null] A 3D array of shape `(batch_size, num_boxes, 4)`, representing the input boxes provided by the user.
|
|
36
|
+
* This is used by the prompt encoder to encode the prompt. Generally yields to much better generated masks.
|
|
37
|
+
* The processor will generate a tensor, with each dimension corresponding respectively to the image batch size,
|
|
38
|
+
* the number of boxes per image and the coordinates of the top left and botton right point of the box.
|
|
39
|
+
* In the order (`x1`, `y1`, `x2`, `y2`):
|
|
40
|
+
* - `x1`: the x coordinate of the top left point of the input box
|
|
41
|
+
* - `y1`: the y coordinate of the top left point of the input box
|
|
42
|
+
* - `x2`: the x coordinate of the bottom right point of the input box
|
|
43
|
+
* - `y2`: the y coordinate of the bottom right point of the input box
|
|
44
|
+
* @returns {Promise<SamImageProcessorResult>}
|
|
45
|
+
*/
|
|
46
|
+
_call(images: any[], { input_points, input_labels, input_boxes }?: {
|
|
47
|
+
input_points?: any;
|
|
48
|
+
input_labels?: any;
|
|
49
|
+
input_boxes?: number[][][];
|
|
50
|
+
}): Promise<SamImageProcessorResult>;
|
|
51
|
+
/**
|
|
52
|
+
* Remove padding and upscale masks to the original image size.
|
|
53
|
+
* @param {Tensor} masks Batched masks from the mask_decoder in (batch_size, num_channels, height, width) format.
|
|
54
|
+
* @param {[number, number][]} original_sizes The original sizes of each image before it was resized to the model's expected input shape, in (height, width) format.
|
|
55
|
+
* @param {[number, number][]} reshaped_input_sizes The size of each image as it is fed to the model, in (height, width) format. Used to remove padding.
|
|
56
|
+
* @param {Object} options Optional parameters for post-processing.
|
|
57
|
+
* @param {number} [options.mask_threshold] The threshold to use for binarizing the masks.
|
|
58
|
+
* @param {boolean} [options.binarize] Whether to binarize the masks.
|
|
59
|
+
* @param {Object} [options.pad_size] The target size the images were padded to before being passed to the model. If `null`, the target size is assumed to be the processor's `pad_size`.
|
|
60
|
+
* @param {number} [options.pad_size.height] The height the images were padded to.
|
|
61
|
+
* @param {number} [options.pad_size.width] The width the images were padded to.
|
|
62
|
+
* @returns {Promise<Tensor[]>} Batched masks in batch_size, num_channels, height, width) format, where (height, width) is given by original_size.
|
|
63
|
+
*/
|
|
64
|
+
post_process_masks(masks: Tensor, original_sizes: [number, number][], reshaped_input_sizes: [number, number][], { mask_threshold, binarize, pad_size, }?: {
|
|
65
|
+
mask_threshold?: number;
|
|
66
|
+
binarize?: boolean;
|
|
67
|
+
pad_size?: {
|
|
68
|
+
height?: number;
|
|
69
|
+
width?: number;
|
|
70
|
+
};
|
|
71
|
+
}): Promise<Tensor[]>;
|
|
72
|
+
/**
|
|
73
|
+
* Generates a list of crop boxes of different sizes. Each layer has (2**i)**2 boxes for the ith layer.
|
|
74
|
+
* @param {import("../../utils/image.js").RawImage} image Input original image
|
|
75
|
+
* @param {number} target_size Target size of the resized image
|
|
76
|
+
* @param {Object} options Options for generating crop boxes
|
|
77
|
+
* @param {number} [options.crop_n_layers] If >0, mask prediction will be run again on crops of the image.
|
|
78
|
+
* Sets the number of layers to run, where each layer has 2**i_layer number of image crops.
|
|
79
|
+
* @param {number} [options.overlap_ratio] Sets the degree to which crops overlap. In the first crop layer,
|
|
80
|
+
* crops will overlap by this fraction of the image length. Later layers with more crops scale down this overlap.
|
|
81
|
+
* @param {number} [options.points_per_crop] Number of points to sample from each crop.
|
|
82
|
+
* @param {number} [options.crop_n_points_downscale_factor] The number of points-per-side sampled in layer n is
|
|
83
|
+
* scaled down by crop_n_points_downscale_factor**n.
|
|
84
|
+
* @returns {Object} An object containing the crop boxes, number of points per crop, cropped images, and input labels.
|
|
85
|
+
*/
|
|
86
|
+
generate_crop_boxes(image: import("../../utils/image.js").RawImage, target_size: number, { crop_n_layers, overlap_ratio, points_per_crop, crop_n_points_downscale_factor, }?: {
|
|
87
|
+
crop_n_layers?: number;
|
|
88
|
+
overlap_ratio?: number;
|
|
89
|
+
points_per_crop?: number;
|
|
90
|
+
crop_n_points_downscale_factor?: number;
|
|
91
|
+
}): any;
|
|
92
|
+
}
|
|
93
|
+
export type SamImageProcessorResult = {
|
|
94
|
+
pixel_values: Tensor;
|
|
95
|
+
original_sizes: import("../../base/image_processors_utils.js").HeightWidth[];
|
|
96
|
+
reshaped_input_sizes: import("../../base/image_processors_utils.js").HeightWidth[];
|
|
97
|
+
input_points?: Tensor;
|
|
98
|
+
input_labels?: Tensor;
|
|
99
|
+
input_boxes?: Tensor;
|
|
100
|
+
};
|
|
101
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
102
|
+
import { Tensor } from "../../utils/tensor.js";
|
|
103
|
+
//# sourceMappingURL=image_processing_sam.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export class SamProcessor extends Processor {
|
|
2
|
+
static image_processor_class: typeof AutoImageProcessor;
|
|
3
|
+
_call(...args: any[]): Promise<any>;
|
|
4
|
+
post_process_masks(...args: any[]): any;
|
|
5
|
+
reshape_input_points(...args: any[]): any;
|
|
6
|
+
}
|
|
7
|
+
import { Processor } from "../../base/processing_utils.js";
|
|
8
|
+
import { AutoImageProcessor } from "../auto/image_processing_auto.js";
|
|
9
|
+
//# sourceMappingURL=processing_sam.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class SapiensImageProcessor extends ImageProcessor {
|
|
2
|
+
post_process_semantic_segmentation(outputs: any, target_sizes?: [number, number][]): {
|
|
3
|
+
segmentation: import("../../transformers.js").Tensor;
|
|
4
|
+
labels: number[];
|
|
5
|
+
}[];
|
|
6
|
+
}
|
|
7
|
+
export class SapiensFeatureExtractor extends SapiensImageProcessor {
|
|
8
|
+
}
|
|
9
|
+
import { ImageProcessor } from "../../base/image_processors_utils.js";
|
|
10
|
+
//# sourceMappingURL=image_processing_sapiens.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class SeamlessM4TFeatureExtractor extends FeatureExtractor {
|
|
2
|
+
constructor(config: any);
|
|
3
|
+
mel_filters: number[][];
|
|
4
|
+
window: Float64Array<ArrayBufferLike>;
|
|
5
|
+
/**
|
|
6
|
+
* Computes the log-Mel spectrogram of the provided audio waveform.
|
|
7
|
+
* @param {Float32Array|Float64Array} waveform The audio waveform to process.
|
|
8
|
+
* @param {number} max_length The maximum number of frames to return.
|
|
9
|
+
* @returns {Promise<Tensor>} An object containing the log-Mel spectrogram data as a Float32Array and its dimensions as an array of numbers.
|
|
10
|
+
*/
|
|
11
|
+
_extract_fbank_features(waveform: Float32Array | Float64Array, max_length: number): Promise<Tensor>;
|
|
12
|
+
/**
|
|
13
|
+
* Asynchronously extracts features from a given audio using the provided configuration.
|
|
14
|
+
* @param {Float32Array|Float64Array} audio The audio data as a Float32Array/Float64Array.
|
|
15
|
+
* @param {Object} options Optional parameters for feature extraction.
|
|
16
|
+
* @param {boolean} [options.padding=true] Whether to pad the sequence to a multiple of `pad_to_multiple_of`.
|
|
17
|
+
* @param {number} [options.pad_to_multiple_of=2] The number to pad the sequence to a multiple of.
|
|
18
|
+
* @param {boolean} [options.do_normalize_per_mel_bins=true] Whether or not to zero-mean unit-variance normalize the input per mel-channel.
|
|
19
|
+
* @param {boolean} [options.return_attention_mask=true] Whether to return the attention mask.
|
|
20
|
+
* @returns {Promise<{ input_features: Tensor, attention_mask?: Tensor }>} A Promise resolving to an object containing the extracted input features and attention masks as Tensors.
|
|
21
|
+
*/
|
|
22
|
+
_call(audio: Float32Array | Float64Array, { padding, pad_to_multiple_of, do_normalize_per_mel_bins, return_attention_mask, }?: {
|
|
23
|
+
padding?: boolean;
|
|
24
|
+
pad_to_multiple_of?: number;
|
|
25
|
+
do_normalize_per_mel_bins?: boolean;
|
|
26
|
+
return_attention_mask?: boolean;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
input_features: Tensor;
|
|
29
|
+
attention_mask?: Tensor;
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
import { FeatureExtractor } from '../../base/feature_extraction_utils.js';
|
|
33
|
+
import { Tensor } from '../../utils/tensor.js';
|
|
34
|
+
//# sourceMappingURL=feature_extraction_seamless_m4t.d.ts.map
|