@nodetool-ai/transformers-js-nodes 0.7.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache-scan.d.ts +26 -0
- package/dist/cache-scan.d.ts.map +1 -0
- package/dist/cache-scan.js +112 -0
- package/dist/cache-scan.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/audio-classification.d.ts +22 -0
- package/dist/nodes/audio-classification.d.ts.map +1 -0
- package/dist/nodes/audio-classification.js +102 -0
- package/dist/nodes/audio-classification.js.map +1 -0
- package/dist/nodes/automatic-speech-recognition.d.ts +22 -0
- package/dist/nodes/automatic-speech-recognition.d.ts.map +1 -0
- package/dist/nodes/automatic-speech-recognition.js +129 -0
- package/dist/nodes/automatic-speech-recognition.js.map +1 -0
- package/dist/nodes/feature-extraction.d.ts +20 -0
- package/dist/nodes/feature-extraction.d.ts.map +1 -0
- package/dist/nodes/feature-extraction.js +153 -0
- package/dist/nodes/feature-extraction.js.map +1 -0
- package/dist/nodes/fill-mask.d.ts +19 -0
- package/dist/nodes/fill-mask.d.ts.map +1 -0
- package/dist/nodes/fill-mask.js +87 -0
- package/dist/nodes/fill-mask.js.map +1 -0
- package/dist/nodes/image-classification.d.ts +21 -0
- package/dist/nodes/image-classification.d.ts.map +1 -0
- package/dist/nodes/image-classification.js +90 -0
- package/dist/nodes/image-classification.js.map +1 -0
- package/dist/nodes/image-to-text.d.ts +19 -0
- package/dist/nodes/image-to-text.d.ts.map +1 -0
- package/dist/nodes/image-to-text.js +81 -0
- package/dist/nodes/image-to-text.js.map +1 -0
- package/dist/nodes/object-detection.d.ts +20 -0
- package/dist/nodes/object-detection.d.ts.map +1 -0
- package/dist/nodes/object-detection.js +93 -0
- package/dist/nodes/object-detection.js.map +1 -0
- package/dist/nodes/question-answering.d.ts +23 -0
- package/dist/nodes/question-answering.d.ts.map +1 -0
- package/dist/nodes/question-answering.js +108 -0
- package/dist/nodes/question-answering.js.map +1 -0
- package/dist/nodes/summarization.d.ts +20 -0
- package/dist/nodes/summarization.d.ts.map +1 -0
- package/dist/nodes/summarization.js +103 -0
- package/dist/nodes/summarization.js.map +1 -0
- package/dist/nodes/text-classification.d.ts +20 -0
- package/dist/nodes/text-classification.d.ts.map +1 -0
- package/dist/nodes/text-classification.js +93 -0
- package/dist/nodes/text-classification.js.map +1 -0
- package/dist/nodes/text-generation.d.ts +23 -0
- package/dist/nodes/text-generation.d.ts.map +1 -0
- package/dist/nodes/text-generation.js +150 -0
- package/dist/nodes/text-generation.js.map +1 -0
- package/dist/nodes/text-to-speech.d.ts +20 -0
- package/dist/nodes/text-to-speech.d.ts.map +1 -0
- package/dist/nodes/text-to-speech.js +122 -0
- package/dist/nodes/text-to-speech.js.map +1 -0
- package/dist/nodes/token-classification.d.ts +18 -0
- package/dist/nodes/token-classification.d.ts.map +1 -0
- package/dist/nodes/token-classification.js +88 -0
- package/dist/nodes/token-classification.js.map +1 -0
- package/dist/nodes/translation.d.ts +20 -0
- package/dist/nodes/translation.d.ts.map +1 -0
- package/dist/nodes/translation.js +106 -0
- package/dist/nodes/translation.js.map +1 -0
- package/dist/nodes/zero-shot-classification.d.ts +23 -0
- package/dist/nodes/zero-shot-classification.d.ts.map +1 -0
- package/dist/nodes/zero-shot-classification.js +128 -0
- package/dist/nodes/zero-shot-classification.js.map +1 -0
- package/dist/nodes/zero-shot-image-classification.d.ts +21 -0
- package/dist/nodes/zero-shot-image-classification.d.ts.map +1 -0
- package/dist/nodes/zero-shot-image-classification.js +101 -0
- package/dist/nodes/zero-shot-image-classification.js.map +1 -0
- package/dist/recommended-models.d.ts +32 -0
- package/dist/recommended-models.d.ts.map +1 -0
- package/dist/recommended-models.js +140 -0
- package/dist/recommended-models.js.map +1 -0
- package/dist/tjs-downloader.d.ts +44 -0
- package/dist/tjs-downloader.d.ts.map +1 -0
- package/dist/tjs-downloader.js +84 -0
- package/dist/tjs-downloader.js.map +1 -0
- package/dist/transformers-base.d.ts +156 -0
- package/dist/transformers-base.d.ts.map +1 -0
- package/dist/transformers-base.js +435 -0
- package/dist/transformers-base.js.map +1 -0
- package/dist/tts-shared.d.ts +16 -0
- package/dist/tts-shared.d.ts.map +1 -0
- package/dist/tts-shared.js +51 -0
- package/dist/tts-shared.js.map +1 -0
- package/dist/wav.d.ts +23 -0
- package/dist/wav.d.ts.map +1 -0
- package/dist/wav.js +115 -0
- package/dist/wav.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scan the Transformers.js cache directory for downloaded models.
|
|
3
|
+
*
|
|
4
|
+
* Transformers.js stores files under a flat `{cacheDir}/{org}/{repo}/...`
|
|
5
|
+
* layout (the same path it uses to fetch from `huggingface.co/{org}/{repo}/resolve/main/...`).
|
|
6
|
+
* We treat any second-level directory containing at least one file as a
|
|
7
|
+
* "downloaded model" — without parsing model metadata, this is the most
|
|
8
|
+
* reliable signal.
|
|
9
|
+
*/
|
|
10
|
+
export interface CachedTjsModel {
|
|
11
|
+
repo_id: string;
|
|
12
|
+
/** Absolute path to the model directory on disk. */
|
|
13
|
+
dir: string;
|
|
14
|
+
/** Total size of the cache directory in bytes. */
|
|
15
|
+
size_bytes: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Scan `cacheDir` and return one entry per cached model repo.
|
|
19
|
+
*
|
|
20
|
+
* Returns an empty list if `cacheDir` does not exist (first-run case).
|
|
21
|
+
* Never throws — IO errors collapse to "not cached".
|
|
22
|
+
*/
|
|
23
|
+
export declare function scanTransformersJsCache(cacheDir: string): Promise<CachedTjsModel[]>;
|
|
24
|
+
/** Check whether a single repo is present in the cache (cheap, no recursion). */
|
|
25
|
+
export declare function isRepoCached(cacheDir: string, repoId: string): Promise<boolean>;
|
|
26
|
+
//# sourceMappingURL=cache-scan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-scan.d.ts","sourceRoot":"","sources":["../src/cache-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;CACpB;AAmDD;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,EAAE,CAAC,CAiC3B;AAED,iFAAiF;AACjF,wBAAsB,YAAY,CAChC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAElB"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scan the Transformers.js cache directory for downloaded models.
|
|
3
|
+
*
|
|
4
|
+
* Transformers.js stores files under a flat `{cacheDir}/{org}/{repo}/...`
|
|
5
|
+
* layout (the same path it uses to fetch from `huggingface.co/{org}/{repo}/resolve/main/...`).
|
|
6
|
+
* We treat any second-level directory containing at least one file as a
|
|
7
|
+
* "downloaded model" — without parsing model metadata, this is the most
|
|
8
|
+
* reliable signal.
|
|
9
|
+
*/
|
|
10
|
+
import { promises as fs } from "node:fs";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
async function dirExists(p) {
|
|
13
|
+
try {
|
|
14
|
+
const stat = await fs.stat(p);
|
|
15
|
+
return stat.isDirectory();
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async function dirSize(p) {
|
|
22
|
+
let total = 0;
|
|
23
|
+
let entries;
|
|
24
|
+
try {
|
|
25
|
+
entries = await fs.readdir(p, { withFileTypes: true });
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
for (const entry of entries) {
|
|
31
|
+
const child = join(p, entry.name);
|
|
32
|
+
if (entry.isDirectory()) {
|
|
33
|
+
total += await dirSize(child);
|
|
34
|
+
}
|
|
35
|
+
else if (entry.isFile()) {
|
|
36
|
+
try {
|
|
37
|
+
const s = await fs.stat(child);
|
|
38
|
+
total += s.size;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
// ignore
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return total;
|
|
46
|
+
}
|
|
47
|
+
async function dirHasAnyFile(p) {
|
|
48
|
+
let entries;
|
|
49
|
+
try {
|
|
50
|
+
entries = await fs.readdir(p, { withFileTypes: true });
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
for (const entry of entries) {
|
|
56
|
+
if (entry.isFile())
|
|
57
|
+
return true;
|
|
58
|
+
if (entry.isDirectory()) {
|
|
59
|
+
if (await dirHasAnyFile(join(p, entry.name)))
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Scan `cacheDir` and return one entry per cached model repo.
|
|
67
|
+
*
|
|
68
|
+
* Returns an empty list if `cacheDir` does not exist (first-run case).
|
|
69
|
+
* Never throws — IO errors collapse to "not cached".
|
|
70
|
+
*/
|
|
71
|
+
export async function scanTransformersJsCache(cacheDir) {
|
|
72
|
+
if (!(await dirExists(cacheDir)))
|
|
73
|
+
return [];
|
|
74
|
+
const results = [];
|
|
75
|
+
let orgs;
|
|
76
|
+
try {
|
|
77
|
+
orgs = await fs.readdir(cacheDir, { withFileTypes: true });
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return [];
|
|
81
|
+
}
|
|
82
|
+
for (const orgEntry of orgs) {
|
|
83
|
+
if (!orgEntry.isDirectory())
|
|
84
|
+
continue;
|
|
85
|
+
const orgPath = join(cacheDir, orgEntry.name);
|
|
86
|
+
let repos;
|
|
87
|
+
try {
|
|
88
|
+
repos = await fs.readdir(orgPath, { withFileTypes: true });
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
for (const repoEntry of repos) {
|
|
94
|
+
if (!repoEntry.isDirectory())
|
|
95
|
+
continue;
|
|
96
|
+
const repoPath = join(orgPath, repoEntry.name);
|
|
97
|
+
if (!(await dirHasAnyFile(repoPath)))
|
|
98
|
+
continue;
|
|
99
|
+
results.push({
|
|
100
|
+
repo_id: `${orgEntry.name}/${repoEntry.name}`,
|
|
101
|
+
dir: repoPath,
|
|
102
|
+
size_bytes: await dirSize(repoPath)
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return results;
|
|
107
|
+
}
|
|
108
|
+
/** Check whether a single repo is present in the cache (cheap, no recursion). */
|
|
109
|
+
export async function isRepoCached(cacheDir, repoId) {
|
|
110
|
+
return dirHasAnyFile(join(cacheDir, repoId));
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=cache-scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-scan.js","sourceRoot":"","sources":["../src/cache-scan.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,KAAK,UAAU,SAAS,CAAC,CAAS;IAChC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,OAAO,CAAC,CAAS;IAC9B,IAAI,KA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AC,IAAI,EAAE;gBAC7C,GAAG,EAAE,QAAQ;gBACb,UAAU,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC;aACpC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,QAAgB,EAChB,MAAc;IAEd,OAAO,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { NodeClass } from "@nodetool-ai/node-sdk";
|
|
2
|
+
export { TextClassificationNode } from "./nodes/text-classification.js";
|
|
3
|
+
export { TokenClassificationNode } from "./nodes/token-classification.js";
|
|
4
|
+
export { QuestionAnsweringNode } from "./nodes/question-answering.js";
|
|
5
|
+
export { SummarizationNode } from "./nodes/summarization.js";
|
|
6
|
+
export { TranslationNode } from "./nodes/translation.js";
|
|
7
|
+
export { TextGenerationNode } from "./nodes/text-generation.js";
|
|
8
|
+
export { FillMaskNode } from "./nodes/fill-mask.js";
|
|
9
|
+
export { FeatureExtractionNode } from "./nodes/feature-extraction.js";
|
|
10
|
+
export { ZeroShotClassificationNode } from "./nodes/zero-shot-classification.js";
|
|
11
|
+
export { ImageClassificationNode } from "./nodes/image-classification.js";
|
|
12
|
+
export { ObjectDetectionNode } from "./nodes/object-detection.js";
|
|
13
|
+
export { ImageToTextNode } from "./nodes/image-to-text.js";
|
|
14
|
+
export { ZeroShotImageClassificationNode } from "./nodes/zero-shot-image-classification.js";
|
|
15
|
+
export { AutomaticSpeechRecognitionNode } from "./nodes/automatic-speech-recognition.js";
|
|
16
|
+
export { AudioClassificationNode } from "./nodes/audio-classification.js";
|
|
17
|
+
export { TextToSpeechNode } from "./nodes/text-to-speech.js";
|
|
18
|
+
export { clearPipelineCache, extractRepoId, getPipeline, getTransformersJsCacheDir, loadTransformers, setTransformersJsCacheDir, tjsModelDefault, type HfModelRef } from "./transformers-base.js";
|
|
19
|
+
export { TJS_MODEL_TYPES, defaultRepoFor, recommendedFor, type TjsModelRef } from "./recommended-models.js";
|
|
20
|
+
export { isRepoCached, scanTransformersJsCache, type CachedTjsModel } from "./cache-scan.js";
|
|
21
|
+
export { KOKORO_VOICES, clearKokoroCache, getKokoro, isKokoroRepo, isSpeechT5Repo, type KokoroVoice } from "./tts-shared.js";
|
|
22
|
+
export { decodeWav, encodeWav, resampleLinear, type DecodedWav } from "./wav.js";
|
|
23
|
+
export { downloadTransformersJsModel, tjsTypeToPipelineTask, type TjsDownloadOptions, type TjsDownloadProgress } from "./tjs-downloader.js";
|
|
24
|
+
export declare const TRANSFORMERS_JS_NODES: readonly NodeClass[];
|
|
25
|
+
export declare function registerTransformersJsNodes(registry: {
|
|
26
|
+
register: (nodeClass: NodeClass) => void;
|
|
27
|
+
}): void;
|
|
28
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAmBvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAA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0 +1,62 @@
|
|
|
1
|
+
import { TEXT_CLASSIFICATION_NODES } from "./nodes/text-classification.js";
|
|
2
|
+
import { TOKEN_CLASSIFICATION_NODES } from "./nodes/token-classification.js";
|
|
3
|
+
import { QUESTION_ANSWERING_NODES } from "./nodes/question-answering.js";
|
|
4
|
+
import { SUMMARIZATION_NODES } from "./nodes/summarization.js";
|
|
5
|
+
import { TRANSLATION_NODES } from "./nodes/translation.js";
|
|
6
|
+
import { TEXT_GENERATION_NODES } from "./nodes/text-generation.js";
|
|
7
|
+
import { FILL_MASK_NODES } from "./nodes/fill-mask.js";
|
|
8
|
+
import { FEATURE_EXTRACTION_NODES } from "./nodes/feature-extraction.js";
|
|
9
|
+
import { ZERO_SHOT_CLASSIFICATION_NODES } from "./nodes/zero-shot-classification.js";
|
|
10
|
+
import { IMAGE_CLASSIFICATION_NODES } from "./nodes/image-classification.js";
|
|
11
|
+
import { OBJECT_DETECTION_NODES } from "./nodes/object-detection.js";
|
|
12
|
+
import { IMAGE_TO_TEXT_NODES } from "./nodes/image-to-text.js";
|
|
13
|
+
import { ZERO_SHOT_IMAGE_CLASSIFICATION_NODES } from "./nodes/zero-shot-image-classification.js";
|
|
14
|
+
import { AUTOMATIC_SPEECH_RECOGNITION_NODES } from "./nodes/automatic-speech-recognition.js";
|
|
15
|
+
import { AUDIO_CLASSIFICATION_NODES } from "./nodes/audio-classification.js";
|
|
16
|
+
import { TEXT_TO_SPEECH_NODES } from "./nodes/text-to-speech.js";
|
|
17
|
+
export { TextClassificationNode } from "./nodes/text-classification.js";
|
|
18
|
+
export { TokenClassificationNode } from "./nodes/token-classification.js";
|
|
19
|
+
export { QuestionAnsweringNode } from "./nodes/question-answering.js";
|
|
20
|
+
export { SummarizationNode } from "./nodes/summarization.js";
|
|
21
|
+
export { TranslationNode } from "./nodes/translation.js";
|
|
22
|
+
export { TextGenerationNode } from "./nodes/text-generation.js";
|
|
23
|
+
export { FillMaskNode } from "./nodes/fill-mask.js";
|
|
24
|
+
export { FeatureExtractionNode } from "./nodes/feature-extraction.js";
|
|
25
|
+
export { ZeroShotClassificationNode } from "./nodes/zero-shot-classification.js";
|
|
26
|
+
export { ImageClassificationNode } from "./nodes/image-classification.js";
|
|
27
|
+
export { ObjectDetectionNode } from "./nodes/object-detection.js";
|
|
28
|
+
export { ImageToTextNode } from "./nodes/image-to-text.js";
|
|
29
|
+
export { ZeroShotImageClassificationNode } from "./nodes/zero-shot-image-classification.js";
|
|
30
|
+
export { AutomaticSpeechRecognitionNode } from "./nodes/automatic-speech-recognition.js";
|
|
31
|
+
export { AudioClassificationNode } from "./nodes/audio-classification.js";
|
|
32
|
+
export { TextToSpeechNode } from "./nodes/text-to-speech.js";
|
|
33
|
+
export { clearPipelineCache, extractRepoId, getPipeline, getTransformersJsCacheDir, loadTransformers, setTransformersJsCacheDir, tjsModelDefault } from "./transformers-base.js";
|
|
34
|
+
export { TJS_MODEL_TYPES, defaultRepoFor, recommendedFor } from "./recommended-models.js";
|
|
35
|
+
export { isRepoCached, scanTransformersJsCache } from "./cache-scan.js";
|
|
36
|
+
export { KOKORO_VOICES, clearKokoroCache, getKokoro, isKokoroRepo, isSpeechT5Repo } from "./tts-shared.js";
|
|
37
|
+
export { decodeWav, encodeWav, resampleLinear } from "./wav.js";
|
|
38
|
+
export { downloadTransformersJsModel, tjsTypeToPipelineTask } from "./tjs-downloader.js";
|
|
39
|
+
export const TRANSFORMERS_JS_NODES = [
|
|
40
|
+
...TEXT_CLASSIFICATION_NODES,
|
|
41
|
+
...TOKEN_CLASSIFICATION_NODES,
|
|
42
|
+
...QUESTION_ANSWERING_NODES,
|
|
43
|
+
...SUMMARIZATION_NODES,
|
|
44
|
+
...TRANSLATION_NODES,
|
|
45
|
+
...TEXT_GENERATION_NODES,
|
|
46
|
+
...FILL_MASK_NODES,
|
|
47
|
+
...FEATURE_EXTRACTION_NODES,
|
|
48
|
+
...ZERO_SHOT_CLASSIFICATION_NODES,
|
|
49
|
+
...IMAGE_CLASSIFICATION_NODES,
|
|
50
|
+
...OBJECT_DETECTION_NODES,
|
|
51
|
+
...IMAGE_TO_TEXT_NODES,
|
|
52
|
+
...ZERO_SHOT_IMAGE_CLASSIFICATION_NODES,
|
|
53
|
+
...AUTOMATIC_SPEECH_RECOGNITION_NODES,
|
|
54
|
+
...AUDIO_CLASSIFICATION_NODES,
|
|
55
|
+
...TEXT_TO_SPEECH_NODES
|
|
56
|
+
];
|
|
57
|
+
export function registerTransformersJsNodes(registry) {
|
|
58
|
+
for (const nodeClass of TRANSFORMERS_JS_NODES) {
|
|
59
|
+
registry.register(nodeClass);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,oCAAoC,EAAE,MAAM,2CAA2C,CAAC;AACjG,OAAO,EAAE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B,EAExB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,SAAS,EACT,SAAS,EACT,cAAc,EAEf,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EAGtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,qBAAqB,GAAyB;IACzD,GAAG,yBAAyB;IAC5B,GAAG,0BAA0B;IAC7B,GAAG,wBAAwB;IAC3B,GAAG,mBAAmB;IACtB,GAAG,iBAAiB;IACpB,GAAG,qBAAqB;IACxB,GAAG,eAAe;IAClB,GAAG,wBAAwB;IAC3B,GAAG,8BAA8B;IACjC,GAAG,0BAA0B;IAC7B,GAAG,sBAAsB;IACzB,GAAG,mBAAmB;IACtB,GAAG,oCAAoC;IACvC,GAAG,kCAAkC;IACrC,GAAG,0BAA0B;IAC7B,GAAG,oBAAoB;CACxB,CAAC;AAEF,MAAM,UAAU,2BAA2B,CAAC,QAE3C;IACC,KAAK,MAAM,SAAS,IAAI,qBAAqB,EAAE,CAAC;QAC9C,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseNode } from "@nodetool-ai/node-sdk";
|
|
2
|
+
import type { NodeClass } from "@nodetool-ai/node-sdk";
|
|
3
|
+
import type { ProcessingContext } from "@nodetool-ai/runtime";
|
|
4
|
+
export declare class AudioClassificationNode extends BaseNode {
|
|
5
|
+
static readonly nodeType = "transformers.AudioClassification";
|
|
6
|
+
static readonly title = "Audio Classification";
|
|
7
|
+
static readonly description: string;
|
|
8
|
+
static readonly metadataOutputTypes: {
|
|
9
|
+
label: string;
|
|
10
|
+
score: string;
|
|
11
|
+
results: string;
|
|
12
|
+
};
|
|
13
|
+
audio: any;
|
|
14
|
+
model: any;
|
|
15
|
+
top_k: any;
|
|
16
|
+
sampling_rate: any;
|
|
17
|
+
dtype: any;
|
|
18
|
+
device: any;
|
|
19
|
+
process(context?: ProcessingContext): Promise<Record<string, unknown>>;
|
|
20
|
+
}
|
|
21
|
+
export declare const AUDIO_CLASSIFICATION_NODES: readonly NodeClass[];
|
|
22
|
+
//# sourceMappingURL=audio-classification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-classification.d.ts","sourceRoot":"","sources":["../../src/nodes/audio-classification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAqB9D,qBAAa,uBAAwB,SAAQ,QAAQ;IACnD,MAAM,CAAC,QAAQ,CAAC,QAAQ,sCAAsC;IAC9D,MAAM,CAAC,QAAQ,CAAC,KAAK,0BAA0B;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,SAMI;IAC/B,MAAM,CAAC,QAAQ,CAAC,mBAAmB;;;;MAIjC;IAQM,KAAK,EAAE,GAAG,CAAC;IAQX,KAAK,EAAE,GAAG,CAAC;IAUX,KAAK,EAAE,GAAG,CAAC;IAUX,aAAa,EAAE,GAAG,CAAC;IASnB,KAAK,EAAE,GAAG,CAAC;IASX,MAAM,EAAE,GAAG,CAAC;IAEd,OAAO,CACX,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAwBpC;AAED,eAAO,MAAM,0BAA0B,EAAE,SAAS,SAAS,EAE1D,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BaseNode, prop } from "@nodetool-ai/node-sdk";
|
|
8
|
+
import { DEVICE_VALUES, DTYPE_VALUES, asNumber, ensureArray, extractRepoId, getPipeline, tjsModelDefault, loadAudioSamples, normalizeOption } from "../transformers-base.js";
|
|
9
|
+
import { defaultRepoFor } from "../recommended-models.js";
|
|
10
|
+
const TJS_TYPE = "tjs.audio_classification";
|
|
11
|
+
const DEFAULT_SAMPLING_RATE = 16000;
|
|
12
|
+
export class AudioClassificationNode extends BaseNode {
|
|
13
|
+
static nodeType = "transformers.AudioClassification";
|
|
14
|
+
static title = "Audio Classification";
|
|
15
|
+
static description = "Classify an audio clip using a Transformers.js audio-classification pipeline.\n" +
|
|
16
|
+
"audio, classification, transformers, huggingface\n\n" +
|
|
17
|
+
"Use cases:\n" +
|
|
18
|
+
"- Detect spoken language\n" +
|
|
19
|
+
"- Identify speakers or emotions\n" +
|
|
20
|
+
"- Tag environmental sounds";
|
|
21
|
+
static metadataOutputTypes = {
|
|
22
|
+
label: "str",
|
|
23
|
+
score: "float",
|
|
24
|
+
results: "list"
|
|
25
|
+
};
|
|
26
|
+
async process(context) {
|
|
27
|
+
const samplingRate = asNumber(this.sampling_rate, DEFAULT_SAMPLING_RATE);
|
|
28
|
+
const samples = await loadAudioSamples(this.audio, samplingRate, context);
|
|
29
|
+
const pipeline = (await getPipeline({
|
|
30
|
+
task: "audio-classification",
|
|
31
|
+
model: extractRepoId(this.model) || undefined,
|
|
32
|
+
dtype: normalizeOption(this.dtype),
|
|
33
|
+
device: normalizeOption(this.device)
|
|
34
|
+
}));
|
|
35
|
+
const raw = await pipeline(samples, { top_k: asNumber(this.top_k, 5) });
|
|
36
|
+
const results = ensureArray(raw);
|
|
37
|
+
const top = results[0] ?? { label: "", score: 0 };
|
|
38
|
+
return {
|
|
39
|
+
label: top.label,
|
|
40
|
+
score: top.score,
|
|
41
|
+
results
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
__decorate([
|
|
46
|
+
prop({
|
|
47
|
+
type: "audio",
|
|
48
|
+
default: { type: "audio" },
|
|
49
|
+
title: "Audio",
|
|
50
|
+
description: "Audio clip to classify."
|
|
51
|
+
})
|
|
52
|
+
], AudioClassificationNode.prototype, "audio", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
prop({
|
|
55
|
+
type: TJS_TYPE,
|
|
56
|
+
default: tjsModelDefault(TJS_TYPE, defaultRepoFor(TJS_TYPE)),
|
|
57
|
+
title: "Model",
|
|
58
|
+
description: "Transformers.js model (ONNX-compatible)."
|
|
59
|
+
})
|
|
60
|
+
], AudioClassificationNode.prototype, "model", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
prop({
|
|
63
|
+
type: "int",
|
|
64
|
+
default: 5,
|
|
65
|
+
title: "Top K",
|
|
66
|
+
description: "Number of top labels to return.",
|
|
67
|
+
min: 1,
|
|
68
|
+
max: 100
|
|
69
|
+
})
|
|
70
|
+
], AudioClassificationNode.prototype, "top_k", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
prop({
|
|
73
|
+
type: "int",
|
|
74
|
+
default: DEFAULT_SAMPLING_RATE,
|
|
75
|
+
title: "Sampling Rate",
|
|
76
|
+
description: "Sampling rate (Hz) used when decoding the audio.",
|
|
77
|
+
min: 8000,
|
|
78
|
+
max: 48000
|
|
79
|
+
})
|
|
80
|
+
], AudioClassificationNode.prototype, "sampling_rate", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
prop({
|
|
83
|
+
type: "enum",
|
|
84
|
+
default: "auto",
|
|
85
|
+
title: "Quantization",
|
|
86
|
+
description: "Model dtype / quantization level.",
|
|
87
|
+
values: DTYPE_VALUES
|
|
88
|
+
})
|
|
89
|
+
], AudioClassificationNode.prototype, "dtype", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
prop({
|
|
92
|
+
type: "enum",
|
|
93
|
+
default: "auto",
|
|
94
|
+
title: "Device",
|
|
95
|
+
description: "Inference device.",
|
|
96
|
+
values: DEVICE_VALUES
|
|
97
|
+
})
|
|
98
|
+
], AudioClassificationNode.prototype, "device", void 0);
|
|
99
|
+
export const AUDIO_CLASSIFICATION_NODES = [
|
|
100
|
+
AudioClassificationNode
|
|
101
|
+
];
|
|
102
|
+
//# sourceMappingURL=audio-classification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-classification.js","sourceRoot":"","sources":["../../src/nodes/audio-classification.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EAER,WAAW,EACX,aAAa,EACb,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAI5C,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,MAAM,OAAO,uBAAwB,SAAQ,QAAQ;IACnD,MAAM,CAAU,QAAQ,GAAG,kCAAkC,CAAC;IAC9D,MAAM,CAAU,KAAK,GAAG,sBAAsB,CAAC;IAC/C,MAAM,CAAU,WAAW,GACzB,iFAAiF;QACjF,sDAAsD;QACtD,cAAc;QACd,4BAA4B;QAC5B,mCAAmC;QACnC,4BAA4B,CAAC;IAC/B,MAAM,CAAU,mBAAmB,GAAG;QACpC,KAAK,EAAE,KAAK;QACZ,KAAK,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cAAc,CAAC,QAAQ,CAAC,CAAC;QAC5D,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,0CAA0C;KACxD,CAAC;sDACiB;AAUX;IARP,IAAI,CAAC;QACJ,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,iCAAiC;QAC9C,GAAG,EAAE,CAAC;QACN,GAAG,EAAE,GAAG;KACT,CAAC;sDACiB;AAUX;IARP,IAAI,CAAC;QACJ,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,qBAAqB;QAC9B,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,kDAAkD;QAC/D,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,KAAK;KACX,CAAC;8DACyB;AASnB;IAPP,IAAI,CAAC;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,mCAAmC;QAChD,MAAM,EAAE,YAAY;KACrB,CAAC;sDACiB;AASX;IAPP,IAAI,CAAC;QACJ,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,mBAAmB;QAChC,MAAM,EAAE,aAAa;KACtB,CAAC;uDACkB;AA8BtB,MAAM,CAAC,MAAM,0BAA0B,GAAyB;IAC9D,uBAAuB;CACxB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseNode } from "@nodetool-ai/node-sdk";
|
|
2
|
+
import type { NodeClass } from "@nodetool-ai/node-sdk";
|
|
3
|
+
import type { ProcessingContext } from "@nodetool-ai/runtime";
|
|
4
|
+
export declare class AutomaticSpeechRecognitionNode extends BaseNode {
|
|
5
|
+
static readonly nodeType = "transformers.AutomaticSpeechRecognition";
|
|
6
|
+
static readonly title = "Automatic Speech Recognition";
|
|
7
|
+
static readonly description: string;
|
|
8
|
+
static readonly metadataOutputTypes: {
|
|
9
|
+
text: string;
|
|
10
|
+
chunks: string;
|
|
11
|
+
};
|
|
12
|
+
audio: any;
|
|
13
|
+
model: any;
|
|
14
|
+
language: any;
|
|
15
|
+
task: any;
|
|
16
|
+
return_timestamps: any;
|
|
17
|
+
dtype: any;
|
|
18
|
+
device: any;
|
|
19
|
+
process(context?: ProcessingContext): Promise<Record<string, unknown>>;
|
|
20
|
+
}
|
|
21
|
+
export declare const AUTOMATIC_SPEECH_RECOGNITION_NODES: readonly NodeClass[];
|
|
22
|
+
//# sourceMappingURL=automatic-speech-recognition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automatic-speech-recognition.d.ts","sourceRoot":"","sources":["../../src/nodes/automatic-speech-recognition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAsB9D,qBAAa,8BAA+B,SAAQ,QAAQ;IAC1D,MAAM,CAAC,QAAQ,CAAC,QAAQ,6CAA6C;IACrE,MAAM,CAAC,QAAQ,CAAC,KAAK,kCAAkC;IACvD,MAAM,CAAC,QAAQ,CAAC,WAAW,SAMU;IACrC,MAAM,CAAC,QAAQ,CAAC,mBAAmB;;;MAGjC;IAQM,KAAK,EAAE,GAAG,CAAC;IAQX,KAAK,EAAE,GAAG,CAAC;IASX,QAAQ,EAAE,GAAG,CAAC;IASd,IAAI,EAAE,GAAG,CAAC;IAQV,iBAAiB,EAAE,GAAG,CAAC;IASvB,KAAK,EAAE,GAAG,CAAC;IASX,MAAM,EAAE,GAAG,CAAC;IAEd,OAAO,CACX,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAoCpC;AAeD,eAAO,MAAM,kCAAkC,EAAE,SAAS,SAAS,EAElE,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BaseNode, prop } from "@nodetool-ai/node-sdk";
|
|
8
|
+
import { DEVICE_VALUES, DTYPE_VALUES, asString, extractRepoId, getPipeline, tjsModelDefault, loadAudioSamples, normalizeOption } from "../transformers-base.js";
|
|
9
|
+
import { defaultRepoFor } from "../recommended-models.js";
|
|
10
|
+
const TJS_TYPE = "tjs.automatic_speech_recognition";
|
|
11
|
+
const WHISPER_SAMPLING_RATE = 16000;
|
|
12
|
+
export class AutomaticSpeechRecognitionNode extends BaseNode {
|
|
13
|
+
static nodeType = "transformers.AutomaticSpeechRecognition";
|
|
14
|
+
static title = "Automatic Speech Recognition";
|
|
15
|
+
static description = "Transcribe audio into text using a Transformers.js automatic-speech-recognition pipeline (e.g. Whisper).\n" +
|
|
16
|
+
"audio, asr, transcription, whisper, transformers, huggingface\n\n" +
|
|
17
|
+
"Use cases:\n" +
|
|
18
|
+
"- Generate transcripts for meetings or podcasts\n" +
|
|
19
|
+
"- Subtitle videos\n" +
|
|
20
|
+
"- Build offline voice assistants";
|
|
21
|
+
static metadataOutputTypes = {
|
|
22
|
+
text: "str",
|
|
23
|
+
chunks: "list"
|
|
24
|
+
};
|
|
25
|
+
async process(context) {
|
|
26
|
+
const samples = await loadAudioSamples(this.audio, WHISPER_SAMPLING_RATE, context);
|
|
27
|
+
const repoId = extractRepoId(this.model);
|
|
28
|
+
const pipeline = (await getPipeline({
|
|
29
|
+
task: "automatic-speech-recognition",
|
|
30
|
+
model: repoId || undefined,
|
|
31
|
+
dtype: normalizeOption(this.dtype),
|
|
32
|
+
device: normalizeOption(this.device)
|
|
33
|
+
}));
|
|
34
|
+
const opts = {
|
|
35
|
+
return_timestamps: Boolean(this.return_timestamps)
|
|
36
|
+
};
|
|
37
|
+
if (!isEnglishOnlyWhisper(repoId)) {
|
|
38
|
+
const language = asString(this.language);
|
|
39
|
+
if (language)
|
|
40
|
+
opts.language = language;
|
|
41
|
+
// `transcribe` is the model default — passing it explicitly is
|
|
42
|
+
// redundant, and the only meaningful alternative is `translate`.
|
|
43
|
+
const task = asString(this.task, "transcribe");
|
|
44
|
+
if (task && task !== "transcribe")
|
|
45
|
+
opts.task = task;
|
|
46
|
+
}
|
|
47
|
+
const raw = await pipeline(samples, opts);
|
|
48
|
+
return {
|
|
49
|
+
text: raw?.text ?? "",
|
|
50
|
+
chunks: raw?.chunks ?? []
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
__decorate([
|
|
55
|
+
prop({
|
|
56
|
+
type: "audio",
|
|
57
|
+
default: { type: "audio" },
|
|
58
|
+
title: "Audio",
|
|
59
|
+
description: "Audio clip to transcribe."
|
|
60
|
+
})
|
|
61
|
+
], AutomaticSpeechRecognitionNode.prototype, "audio", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
prop({
|
|
64
|
+
type: TJS_TYPE,
|
|
65
|
+
default: tjsModelDefault(TJS_TYPE, defaultRepoFor(TJS_TYPE)),
|
|
66
|
+
title: "Model",
|
|
67
|
+
description: "Transformers.js model (ONNX-compatible)."
|
|
68
|
+
})
|
|
69
|
+
], AutomaticSpeechRecognitionNode.prototype, "model", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
prop({
|
|
72
|
+
type: "str",
|
|
73
|
+
default: "",
|
|
74
|
+
title: "Language",
|
|
75
|
+
description: "Optional language hint for multilingual models (e.g. 'english')."
|
|
76
|
+
})
|
|
77
|
+
], AutomaticSpeechRecognitionNode.prototype, "language", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
prop({
|
|
80
|
+
type: "enum",
|
|
81
|
+
default: "transcribe",
|
|
82
|
+
title: "Task",
|
|
83
|
+
description: "Whether to transcribe in source language or translate to English.",
|
|
84
|
+
values: ["transcribe", "translate"]
|
|
85
|
+
})
|
|
86
|
+
], AutomaticSpeechRecognitionNode.prototype, "task", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
prop({
|
|
89
|
+
type: "bool",
|
|
90
|
+
default: false,
|
|
91
|
+
title: "Return Timestamps",
|
|
92
|
+
description: "Return per-chunk timestamps alongside the transcript."
|
|
93
|
+
})
|
|
94
|
+
], AutomaticSpeechRecognitionNode.prototype, "return_timestamps", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
prop({
|
|
97
|
+
type: "enum",
|
|
98
|
+
default: "auto",
|
|
99
|
+
title: "Quantization",
|
|
100
|
+
description: "Model dtype / quantization level.",
|
|
101
|
+
values: DTYPE_VALUES
|
|
102
|
+
})
|
|
103
|
+
], AutomaticSpeechRecognitionNode.prototype, "dtype", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
prop({
|
|
106
|
+
type: "enum",
|
|
107
|
+
default: "auto",
|
|
108
|
+
title: "Device",
|
|
109
|
+
description: "Inference device.",
|
|
110
|
+
values: DEVICE_VALUES
|
|
111
|
+
})
|
|
112
|
+
], AutomaticSpeechRecognitionNode.prototype, "device", void 0);
|
|
113
|
+
/**
|
|
114
|
+
* English-only Whisper checkpoints (`*.en`) reject `task` and `language`
|
|
115
|
+
* generation params and surface a confusing "If the model is intended to
|
|
116
|
+
* be multilingual, pass is_multilingual=true" error when either is set.
|
|
117
|
+
* The repo-id suffix is the canonical signal — every English-only Whisper
|
|
118
|
+
* variant in the official repos uses the `.en` suffix.
|
|
119
|
+
*/
|
|
120
|
+
function isEnglishOnlyWhisper(repoId) {
|
|
121
|
+
if (!repoId)
|
|
122
|
+
return false;
|
|
123
|
+
const name = repoId.split("/").pop() ?? "";
|
|
124
|
+
return /\.en$/i.test(name);
|
|
125
|
+
}
|
|
126
|
+
export const AUTOMATIC_SPEECH_RECOGNITION_NODES = [
|
|
127
|
+
AutomaticSpeechRecognitionNode
|
|
128
|
+
];
|
|
129
|
+
//# sourceMappingURL=automatic-speech-recognition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"automatic-speech-recognition.js","sourceRoot":"","sources":["../../src/nodes/automatic-speech-recognition.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AAOpD,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAEpC,MAAM,OAAO,8BAA+B,SAAQ,QAAQ;IAC1D,MAAM,CAAU,QAAQ,GAAG,yCAAyC,CAAC;IACrE,MAAM,CAAU,KAAK,GAAG,8BAA8B,CAAC;IACvD,MAAM,CAAU,WAAW,GACzB,4GAA4G;QAC5G,mEAAmE;QACnE,cAAc;QACd,mDAAmD;QACnD,qBAAqB;QACrB,kCAAkC,CAAC;IACrC,MAAM,CAAU,mBAAmB,GAAG;QACpC,IAAI,EAAE,KAAK;QACX,MAAM,EAAE,MAAM;KACf,CAAC;IA8DF,KAAK,CAAC,OAAO,CACX,OAA2B;QAE3B,MAAM,OAAO,GAAG,MAAM,gBAAgB,CACpC,IAAI,CAAC,KAAK,EACV,qBAAqB,EACrB,OAAO,CACR,CAAC;QAEF,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,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
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseNode } from "@nodetool-ai/node-sdk";
|
|
2
|
+
import type { NodeClass } from "@nodetool-ai/node-sdk";
|
|
3
|
+
export declare class FeatureExtractionNode extends BaseNode {
|
|
4
|
+
static readonly nodeType = "transformers.FeatureExtraction";
|
|
5
|
+
static readonly title = "Feature Extraction (Embeddings)";
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly metadataOutputTypes: {
|
|
8
|
+
embedding: string;
|
|
9
|
+
dim: string;
|
|
10
|
+
};
|
|
11
|
+
text: any;
|
|
12
|
+
model: any;
|
|
13
|
+
pooling: any;
|
|
14
|
+
normalize: any;
|
|
15
|
+
dtype: any;
|
|
16
|
+
device: any;
|
|
17
|
+
process(): Promise<Record<string, unknown>>;
|
|
18
|
+
}
|
|
19
|
+
export declare const FEATURE_EXTRACTION_NODES: readonly NodeClass[];
|
|
20
|
+
//# sourceMappingURL=feature-extraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-extraction.d.ts","sourceRoot":"","sources":["../../src/nodes/feature-extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AA2EvD,qBAAa,qBAAsB,SAAQ,QAAQ;IACjD,MAAM,CAAC,QAAQ,CAAC,QAAQ,oCAAoC;IAC5D,MAAM,CAAC,QAAQ,CAAC,KAAK,qCAAqC;IAC1D,MAAM,CAAC,QAAQ,CAAC,WAAW,SAMO;IAClC,MAAM,CAAC,QAAQ,CAAC,mBAAmB;;;MAGjC;IAQM,IAAI,EAAE,GAAG,CAAC;IAQV,KAAK,EAAE,GAAG,CAAC;IASX,OAAO,EAAE,GAAG,CAAC;IAQb,SAAS,EAAE,GAAG,CAAC;IASf,KAAK,EAAE,GAAG,CAAC;IASX,MAAM,EAAE,GAAG,CAAC;IAEd,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAwBlD;AAED,eAAO,MAAM,wBAAwB,EAAE,SAAS,SAAS,EAExD,CAAC"}
|