@storyteller-platform/ghost-story 0.1.1 → 0.1.3
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/{AudioFormat-DDo0cjUB.d.ts → AudioFormat--LEggByS.d.ts} +3 -2
- package/dist/{AudioFormat-BoGeaCbt.d.cts → AudioFormat-Cq6sRKDj.d.cts} +3 -2
- package/dist/api/APIOptions.d.cts +1 -1
- package/dist/api/APIOptions.d.ts +1 -1
- package/dist/api/Recognition.d.cts +1 -1
- package/dist/api/Recognition.d.ts +1 -1
- package/dist/audio/AudioConverter.d.cts +1 -1
- package/dist/audio/AudioConverter.d.ts +1 -1
- package/dist/audio/AudioFormat.d.cts +1 -1
- package/dist/audio/AudioFormat.d.ts +1 -1
- package/dist/audio/AudioSource.d.cts +1 -1
- package/dist/audio/AudioSource.d.ts +1 -1
- package/dist/audio/index.d.cts +1 -1
- package/dist/audio/index.d.ts +1 -1
- package/dist/cli/config.cjs +37 -4
- package/dist/cli/config.d.cts +6 -5
- package/dist/cli/config.d.ts +6 -5
- package/dist/cli/config.js +36 -4
- package/dist/convert.d.cts +1 -1
- package/dist/convert.d.ts +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -0
- package/dist/recognition/AmazonTranscribeSTT.d.cts +1 -1
- package/dist/recognition/AmazonTranscribeSTT.d.ts +1 -1
- package/dist/recognition/AzureCognitiveServicesSTT.d.cts +1 -1
- package/dist/recognition/AzureCognitiveServicesSTT.d.ts +1 -1
- package/dist/recognition/DeepgramSTT.d.cts +1 -1
- package/dist/recognition/DeepgramSTT.d.ts +1 -1
- package/dist/recognition/GoogleCloudSTT.d.cts +1 -1
- package/dist/recognition/GoogleCloudSTT.d.ts +1 -1
- package/dist/recognition/OpenAICloudSTT.d.cts +1 -1
- package/dist/recognition/OpenAICloudSTT.d.ts +1 -1
- package/dist/recognition/WhisperCppSTT.cjs +103 -0
- package/dist/recognition/WhisperCppSTT.d.cts +1 -1
- package/dist/recognition/WhisperCppSTT.d.ts +1 -1
- package/dist/recognition/WhisperCppSTT.js +102 -0
- package/dist/recognition/WhisperServerSTT.d.cts +1 -1
- package/dist/recognition/WhisperServerSTT.d.ts +1 -1
- package/dist/vad/ActiveGateOg.cjs +1 -1
- package/dist/vad/ActiveGateOg.js +1 -1
- package/package.json +5 -5
|
@@ -56,7 +56,8 @@ declare function recognize$3(input: RawAudioInput | AudioSource, languageCode: s
|
|
|
56
56
|
|
|
57
57
|
type InputPreference$1 = "file";
|
|
58
58
|
declare const inputPreference$1: InputPreference$1;
|
|
59
|
-
|
|
59
|
+
declare const Languages: readonly ["af", "am", "ar", "as", "az", "ba", "be", "bg", "bn", "bo", "br", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fo", "fr", "gl", "gu", "ha", "haw", "he", "hi", "hr", "ht", "hu", "hy", "id", "is", "it", "ja", "jw", "ka", "kk", "km", "kn", "ko", "la", "lb", "ln", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "ne", "nl", "nn", "no", "oc", "pa", "pl", "ps", "pt", "ro", "ru", "sa", "sd", "si", "sk", "sl", "sn", "so", "sq", "sr", "su", "sv", "sw", "ta", "te", "tg", "th", "tk", "tl", "tr", "tt", "uk", "ur", "uz", "vi", "yi", "yo", "zh"];
|
|
60
|
+
type Language = (typeof Languages)[number];
|
|
60
61
|
|
|
61
62
|
interface WhisperCppOptions {
|
|
62
63
|
model: WhisperModel;
|
|
@@ -252,4 +253,4 @@ declare const serviceCapabilities: {
|
|
|
252
253
|
declare function needsConversion(inputFormat: AudioFormat, service: RecognitionEngine): boolean;
|
|
253
254
|
declare function getTargetFormat(inputFormat: AudioFormat, service: RecognitionEngine): AudioFormat;
|
|
254
255
|
|
|
255
|
-
export { type AudioInput as A, type RecognitionResult$3 as B, inputPreference$2 as C, recognize$3 as D, type RecognitionResult$2 as
|
|
256
|
+
export { type AudioInput as A, type RecognitionResult$3 as B, inputPreference$2 as C, recognize$3 as D, Languages as E, type RecognitionResult$2 as F, type WhisperCppOptions as G, inputPreference$1 as H, recognize$2 as I, type RecognitionResult$1 as J, type WhisperServerOptions as K, type Language as L, inputPreference as M, recognize$1 as N, type OpenAICloudSTTOptions as O, type AudioEncoding as P, type InputPreference$2 as Q, type RecognitionEngine as R, type ServiceCapabilities as S, type InputPreference$1 as T, ensureWhisperCppInstalled as U, ensureModelDownloaded as V, type WhisperCppModelId as W, type InputPreference as X, type Audio as Y, type RecognitionOptions as a, type RecognitionResult as b, recognize as c, type AudioFormat as d, type AudioFormatInfo as e, type AudioSource as f, type AudioSourceFromBuffer as g, type AudioSourceFromFile as h, type AudioSourceFromStream as i, type RawAudioInput as j, audioSourceFromBuffer as k, audioSourceFromFile as l, audioSourceFromStream as m, formatFromExtension as n, formatToExtension as o, getFormat as p, getFormatInfo as q, recognitionEngines as r, getTargetFormat as s, isAudioSource as t, needsConversion as u, normalizeToAudioSource as v, serviceCapabilities as w, toBuffer as x, toFilePath as y, toReadStream as z };
|
|
@@ -56,7 +56,8 @@ declare function recognize$3(input: RawAudioInput | AudioSource, languageCode: s
|
|
|
56
56
|
|
|
57
57
|
type InputPreference$1 = "file";
|
|
58
58
|
declare const inputPreference$1: InputPreference$1;
|
|
59
|
-
|
|
59
|
+
declare const Languages: readonly ["af", "am", "ar", "as", "az", "ba", "be", "bg", "bn", "bo", "br", "bs", "ca", "cs", "cy", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fo", "fr", "gl", "gu", "ha", "haw", "he", "hi", "hr", "ht", "hu", "hy", "id", "is", "it", "ja", "jw", "ka", "kk", "km", "kn", "ko", "la", "lb", "ln", "lo", "lt", "lv", "mg", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "ne", "nl", "nn", "no", "oc", "pa", "pl", "ps", "pt", "ro", "ru", "sa", "sd", "si", "sk", "sl", "sn", "so", "sq", "sr", "su", "sv", "sw", "ta", "te", "tg", "th", "tk", "tl", "tr", "tt", "uk", "ur", "uz", "vi", "yi", "yo", "zh"];
|
|
60
|
+
type Language = (typeof Languages)[number];
|
|
60
61
|
|
|
61
62
|
interface WhisperCppOptions {
|
|
62
63
|
model: WhisperModel;
|
|
@@ -252,4 +253,4 @@ declare const serviceCapabilities: {
|
|
|
252
253
|
declare function needsConversion(inputFormat: AudioFormat, service: RecognitionEngine): boolean;
|
|
253
254
|
declare function getTargetFormat(inputFormat: AudioFormat, service: RecognitionEngine): AudioFormat;
|
|
254
255
|
|
|
255
|
-
export { type AudioInput as A, type RecognitionResult$3 as B, inputPreference$2 as C, recognize$3 as D, type RecognitionResult$2 as
|
|
256
|
+
export { type AudioInput as A, type RecognitionResult$3 as B, inputPreference$2 as C, recognize$3 as D, Languages as E, type RecognitionResult$2 as F, type WhisperCppOptions as G, inputPreference$1 as H, recognize$2 as I, type RecognitionResult$1 as J, type WhisperServerOptions as K, type Language as L, inputPreference as M, recognize$1 as N, type OpenAICloudSTTOptions as O, type AudioEncoding as P, type InputPreference$2 as Q, type RecognitionEngine as R, type ServiceCapabilities as S, type InputPreference$1 as T, ensureWhisperCppInstalled as U, ensureModelDownloaded as V, type WhisperCppModelId as W, type InputPreference as X, type Audio as Y, type RecognitionOptions as a, type RecognitionResult as b, recognize as c, type AudioFormat as d, type AudioFormatInfo as e, type AudioSource as f, type AudioSourceFromBuffer as g, type AudioSourceFromFile as h, type AudioSourceFromStream as i, type RawAudioInput as j, audioSourceFromBuffer as k, audioSourceFromFile as l, audioSourceFromStream as m, formatFromExtension as n, formatToExtension as o, getFormat as p, getFormatInfo as q, recognitionEngines as r, getTargetFormat as s, isAudioSource as t, needsConversion as u, normalizeToAudioSource as v, serviceCapabilities as w, toBuffer as x, toFilePath as y, toReadStream as z };
|
package/dist/api/APIOptions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
2
|
import 'node:stream';
|
|
3
|
-
export {
|
|
3
|
+
export { Y as Audio, A as AudioInput, R as RecognitionEngine, a as RecognitionOptions, b as RecognitionResult, r as recognitionEngines, c as recognize } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
4
4
|
import '../config.cjs';
|
|
5
5
|
import '../utilities/Timeline.cjs';
|
|
6
6
|
import '../utilities/Timing.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
2
|
import 'node:stream';
|
|
3
|
-
export {
|
|
3
|
+
export { Y as Audio, A as AudioInput, R as RecognitionEngine, a as RecognitionOptions, b as RecognitionResult, r as recognitionEngines, c as recognize } from '../AudioFormat--LEggByS.js';
|
|
4
4
|
import '../config.js';
|
|
5
5
|
import '../utilities/Timeline.js';
|
|
6
6
|
import '../utilities/Timing.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AudioFormat, f as AudioSource, R as RecognitionEngine } from '../AudioFormat-
|
|
1
|
+
import { d as AudioFormat, f as AudioSource, R as RecognitionEngine } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import { Readable } from 'node:stream';
|
|
3
3
|
import { ConversionMode } from '../config.cjs';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AudioFormat, f as AudioSource, R as RecognitionEngine } from '../AudioFormat
|
|
1
|
+
import { d as AudioFormat, f as AudioSource, R as RecognitionEngine } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import { Readable } from 'node:stream';
|
|
3
3
|
import { ConversionMode } from '../config.js';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { P as AudioEncoding, d as AudioFormat, e as AudioFormatInfo, S as ServiceCapabilities, n as formatFromExtension, o as formatToExtension, s as getTargetFormat, u as needsConversion, w as serviceCapabilities } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:stream';
|
|
4
4
|
import '../config.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { P as AudioEncoding, d as AudioFormat, e as AudioFormatInfo, S as ServiceCapabilities, n as formatFromExtension, o as formatToExtension, s as getTargetFormat, u as needsConversion, w as serviceCapabilities } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:stream';
|
|
4
4
|
import '../config.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
2
|
import 'node:stream';
|
|
3
|
-
export { f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, j as RawAudioInput, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, p as getFormat, q as getFormatInfo, t as isAudioSource, v as normalizeToAudioSource, x as toBuffer, y as toFilePath, z as toReadStream } from '../AudioFormat-
|
|
3
|
+
export { f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, j as RawAudioInput, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, p as getFormat, q as getFormatInfo, t as isAudioSource, v as normalizeToAudioSource, x as toBuffer, y as toFilePath, z as toReadStream } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
4
4
|
import '../config.cjs';
|
|
5
5
|
import '../utilities/Timeline.cjs';
|
|
6
6
|
import '../utilities/Timing.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
2
|
import 'node:stream';
|
|
3
|
-
export { f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, j as RawAudioInput, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, p as getFormat, q as getFormatInfo, t as isAudioSource, v as normalizeToAudioSource, x as toBuffer, y as toFilePath, z as toReadStream } from '../AudioFormat
|
|
3
|
+
export { f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, j as RawAudioInput, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, p as getFormat, q as getFormatInfo, t as isAudioSource, v as normalizeToAudioSource, x as toBuffer, y as toFilePath, z as toReadStream } from '../AudioFormat--LEggByS.js';
|
|
4
4
|
import '../config.js';
|
|
5
5
|
import '../utilities/Timeline.js';
|
|
6
6
|
import '../utilities/Timing.js';
|
package/dist/audio/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { P as AudioEncoding, d as AudioFormat, e as AudioFormatInfo, f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, j as RawAudioInput, S as ServiceCapabilities, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, n as formatFromExtension, o as formatToExtension, p as getFormat, q as getFormatInfo, s as getTargetFormat, t as isAudioSource, u as needsConversion, v as normalizeToAudioSource, w as serviceCapabilities, x as toBuffer, y as toFilePath, z as toReadStream } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
export { ConversionOptions, PrepareForServiceOptions, PreparedAudio, StreamForUploadOptions, StreamForUploadResult, convertToBuffer, convertToFile, convertToStream, createStreamForUpload, createStreamingConversion, getAudioDuration, prepareForService, prepareWavForService } from './AudioConverter.cjs';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:stream';
|
package/dist/audio/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { P as AudioEncoding, d as AudioFormat, e as AudioFormatInfo, f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, j as RawAudioInput, S as ServiceCapabilities, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, n as formatFromExtension, o as formatToExtension, p as getFormat, q as getFormatInfo, s as getTargetFormat, t as isAudioSource, u as needsConversion, v as normalizeToAudioSource, w as serviceCapabilities, x as toBuffer, y as toFilePath, z as toReadStream } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
export { ConversionOptions, PrepareForServiceOptions, PreparedAudio, StreamForUploadOptions, StreamForUploadResult, convertToBuffer, convertToFile, convertToStream, createStreamForUpload, createStreamingConversion, getAudioDuration, prepareForService, prepareWavForService } from './AudioConverter.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:stream';
|
package/dist/cli/config.cjs
CHANGED
|
@@ -38,6 +38,7 @@ __export(config_exports, {
|
|
|
38
38
|
WHISPER_CPP_VERSION: () => WHISPER_CPP_VERSION,
|
|
39
39
|
WHISPER_MODELS: () => WHISPER_MODELS,
|
|
40
40
|
WHISPER_MODEL_VERSION: () => WHISPER_MODEL_VERSION,
|
|
41
|
+
applyLegacyCpuFallback: () => applyLegacyCpuFallback,
|
|
41
42
|
cliConfigSchema: () => cliConfigSchema,
|
|
42
43
|
detectPlatform: () => detectPlatform,
|
|
43
44
|
getBinaryDownloadUrl: () => getBinaryDownloadUrl,
|
|
@@ -89,6 +90,7 @@ const BUILD_VARIANTS = [
|
|
|
89
90
|
"linux-x64-rocm",
|
|
90
91
|
"linux-x64-blas",
|
|
91
92
|
"linux-x64-cpu",
|
|
93
|
+
"linux-x64-cpu-legacy",
|
|
92
94
|
"linux-arm64-cpu",
|
|
93
95
|
"windows-x64-cpu",
|
|
94
96
|
"windows-x64-cuda-13.1.0",
|
|
@@ -313,6 +315,36 @@ function hasSycl() {
|
|
|
313
315
|
return false;
|
|
314
316
|
}
|
|
315
317
|
}
|
|
318
|
+
let cpuCapabilitiesCache = null;
|
|
319
|
+
function getLinuxCpuCapabilities() {
|
|
320
|
+
if (cpuCapabilitiesCache) return cpuCapabilitiesCache;
|
|
321
|
+
try {
|
|
322
|
+
const cpuinfo = (0, import_node_fs.readFileSync)("/proc/cpuinfo", "utf-8");
|
|
323
|
+
const flagsMatch = cpuinfo.match(/^flags\s*:\s*(.+)$/m);
|
|
324
|
+
if (!(flagsMatch == null ? void 0 : flagsMatch[1])) {
|
|
325
|
+
cpuCapabilitiesCache = { avx2: false, fma: false };
|
|
326
|
+
return cpuCapabilitiesCache;
|
|
327
|
+
}
|
|
328
|
+
const flags = flagsMatch[1].split(/\s+/);
|
|
329
|
+
cpuCapabilitiesCache = {
|
|
330
|
+
avx2: flags.includes("avx2"),
|
|
331
|
+
fma: flags.includes("fma")
|
|
332
|
+
};
|
|
333
|
+
} catch {
|
|
334
|
+
cpuCapabilitiesCache = { avx2: true, fma: true };
|
|
335
|
+
}
|
|
336
|
+
return cpuCapabilitiesCache;
|
|
337
|
+
}
|
|
338
|
+
function applyLegacyCpuFallback(variant) {
|
|
339
|
+
if (process.platform !== "linux") return variant;
|
|
340
|
+
if (variant !== "linux-x64-cpu") return variant;
|
|
341
|
+
const caps = getLinuxCpuCapabilities();
|
|
342
|
+
if (caps.avx2 && caps.fma) return variant;
|
|
343
|
+
console.warn(
|
|
344
|
+
`CPU lacks ${[!caps.avx2 && "AVX2", !caps.fma && "FMA"].filter(Boolean).join(" and ")} support. Falling back to linux-x64-cpu-legacy variant.`
|
|
345
|
+
);
|
|
346
|
+
return "linux-x64-cpu-legacy";
|
|
347
|
+
}
|
|
316
348
|
function getConfiguredVariant() {
|
|
317
349
|
const envVariant = process.env["STORYTELLER_WHISPER_VARIANT"];
|
|
318
350
|
if (!envVariant || envVariant === "") {
|
|
@@ -366,20 +398,20 @@ function detectPlatform() {
|
|
|
366
398
|
}
|
|
367
399
|
function resolveVariant(requestedVariant) {
|
|
368
400
|
if (requestedVariant) {
|
|
369
|
-
return requestedVariant;
|
|
401
|
+
return applyLegacyCpuFallback(requestedVariant);
|
|
370
402
|
}
|
|
371
403
|
const configured = getConfiguredVariant();
|
|
372
404
|
if (configured) {
|
|
373
|
-
return configured;
|
|
405
|
+
return applyLegacyCpuFallback(configured);
|
|
374
406
|
}
|
|
375
407
|
const installed = getInstalledVariant();
|
|
376
408
|
if (installed) {
|
|
377
|
-
return installed;
|
|
409
|
+
return applyLegacyCpuFallback(installed);
|
|
378
410
|
}
|
|
379
411
|
console.warn(
|
|
380
412
|
"No variant configured or installed. Falling back to platform detection."
|
|
381
413
|
);
|
|
382
|
-
return detectPlatform();
|
|
414
|
+
return applyLegacyCpuFallback(detectPlatform());
|
|
383
415
|
}
|
|
384
416
|
function isValidModel(model) {
|
|
385
417
|
return WHISPER_MODELS.includes(model);
|
|
@@ -442,6 +474,7 @@ function writeConfig(config) {
|
|
|
442
474
|
WHISPER_CPP_VERSION,
|
|
443
475
|
WHISPER_MODELS,
|
|
444
476
|
WHISPER_MODEL_VERSION,
|
|
477
|
+
applyLegacyCpuFallback,
|
|
445
478
|
cliConfigSchema,
|
|
446
479
|
detectPlatform,
|
|
447
480
|
getBinaryDownloadUrl,
|
package/dist/cli/config.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ declare const SILERO_VAD_VERSION = "6.2.0";
|
|
|
6
6
|
declare const GITLAB_PROJECT_PATH = "storyteller-platform/storyteller";
|
|
7
7
|
declare const GITLAB_PROJECT_ID = "67994333";
|
|
8
8
|
declare const GITLAB_WHIPSER_ML_ID = "2007349";
|
|
9
|
-
declare const BUILD_VARIANTS: readonly ["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"];
|
|
9
|
+
declare const BUILD_VARIANTS: readonly ["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-x64-cpu-legacy", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"];
|
|
10
10
|
type BuildVariant = (typeof BUILD_VARIANTS)[number];
|
|
11
11
|
declare function isVariantCompatibleWithCurrentPlatform(variant: BuildVariant): boolean;
|
|
12
12
|
declare function getCompatibleVariants(): BuildVariant[];
|
|
@@ -32,6 +32,7 @@ declare function getModelPath(model: WhisperModel, modelDir?: string): string;
|
|
|
32
32
|
declare function getCoremlModelPath(model: WhisperModel, modelDir?: string): string;
|
|
33
33
|
declare function needsCoremlModel(variant?: BuildVariant): boolean;
|
|
34
34
|
declare function getVadModelPath(modelDir?: string): string;
|
|
35
|
+
declare function applyLegacyCpuFallback(variant: BuildVariant): BuildVariant;
|
|
35
36
|
/**
|
|
36
37
|
* neturns the variant configured via STORYTELLER_WHISPER_VARIANT env var.
|
|
37
38
|
* set by the Docker build process and should be the primary source
|
|
@@ -56,13 +57,13 @@ declare function isValidModel(model: string): model is WhisperModel;
|
|
|
56
57
|
declare function isValidVariant(variant: string): variant is BuildVariant;
|
|
57
58
|
declare const cliConfigSchema: z.ZodObject<{
|
|
58
59
|
lastUsedModel: z.ZodNullable<z.ZodEnum<["tiny", "tiny.en", "tiny-q5_1", "tiny.en-q5_1", "tiny-q8_0", "base", "base.en", "base-q5_1", "base.en-q5_1", "base-q8_0", "small", "small.en", "small-q5_1", "small.en-q5_1", "small-q8_0", "medium", "medium.en", "medium-q5_0", "medium.en-q5_0", "medium-q8_0", "large-v1", "large-v2", "large-v2-q5_0", "large-v2-q8_0", "large-v3", "large-v3-q5_0", "large-v3-turbo", "large-v3-turbo-q5_0", "large-v3-turbo-q8_0"]>>;
|
|
59
|
-
installedVariant: z.ZodNullable<z.ZodEnum<["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"]>>;
|
|
60
|
+
installedVariant: z.ZodNullable<z.ZodEnum<["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-x64-cpu-legacy", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"]>>;
|
|
60
61
|
}, "strip", z.ZodTypeAny, {
|
|
61
62
|
lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
|
|
62
|
-
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
63
|
+
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
63
64
|
}, {
|
|
64
65
|
lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
|
|
65
|
-
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
66
|
+
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
66
67
|
}>;
|
|
67
68
|
/**
|
|
68
69
|
* Only to be used by the CLI, not the API/programmatic use.
|
|
@@ -72,4 +73,4 @@ type CLIConfig = z.infer<typeof cliConfigSchema>;
|
|
|
72
73
|
declare function readConfig(): CLIConfig;
|
|
73
74
|
declare function writeConfig(config: Partial<CLIConfig>): void;
|
|
74
75
|
|
|
75
|
-
export { BUILD_VARIANTS, type BuildVariant, type CLIConfig, GITLAB_PROJECT_ID, GITLAB_PROJECT_PATH, GITLAB_WHIPSER_ML_ID, MODEL_SIZES, RECOGNITION_ENGINES, SILERO_VAD_VERSION, WHISPER_CPP_VERSION, WHISPER_MODELS, WHISPER_MODEL_VERSION, type WhisperModel, cliConfigSchema, detectPlatform, getBinaryDownloadUrl, getCompatibleVariants, getConfiguredVariant, getCoremlModelDownloadUrl, getCoremlModelPath, getInstallDir, getInstalledVariant, getModelDir, getModelDownloadUrl, getModelPath, getVadExecutablePath, getVadModelDownloadUrl, getVadModelPath, getWhisperBaseDir, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, isValidVariant, isVariantCompatibleWithCurrentPlatform, needsCoremlModel, readConfig, resolveVariant, writeConfig };
|
|
76
|
+
export { BUILD_VARIANTS, type BuildVariant, type CLIConfig, GITLAB_PROJECT_ID, GITLAB_PROJECT_PATH, GITLAB_WHIPSER_ML_ID, MODEL_SIZES, RECOGNITION_ENGINES, SILERO_VAD_VERSION, WHISPER_CPP_VERSION, WHISPER_MODELS, WHISPER_MODEL_VERSION, type WhisperModel, applyLegacyCpuFallback, cliConfigSchema, detectPlatform, getBinaryDownloadUrl, getCompatibleVariants, getConfiguredVariant, getCoremlModelDownloadUrl, getCoremlModelPath, getInstallDir, getInstalledVariant, getModelDir, getModelDownloadUrl, getModelPath, getVadExecutablePath, getVadModelDownloadUrl, getVadModelPath, getWhisperBaseDir, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, isValidVariant, isVariantCompatibleWithCurrentPlatform, needsCoremlModel, readConfig, resolveVariant, writeConfig };
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const SILERO_VAD_VERSION = "6.2.0";
|
|
|
6
6
|
declare const GITLAB_PROJECT_PATH = "storyteller-platform/storyteller";
|
|
7
7
|
declare const GITLAB_PROJECT_ID = "67994333";
|
|
8
8
|
declare const GITLAB_WHIPSER_ML_ID = "2007349";
|
|
9
|
-
declare const BUILD_VARIANTS: readonly ["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"];
|
|
9
|
+
declare const BUILD_VARIANTS: readonly ["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-x64-cpu-legacy", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"];
|
|
10
10
|
type BuildVariant = (typeof BUILD_VARIANTS)[number];
|
|
11
11
|
declare function isVariantCompatibleWithCurrentPlatform(variant: BuildVariant): boolean;
|
|
12
12
|
declare function getCompatibleVariants(): BuildVariant[];
|
|
@@ -32,6 +32,7 @@ declare function getModelPath(model: WhisperModel, modelDir?: string): string;
|
|
|
32
32
|
declare function getCoremlModelPath(model: WhisperModel, modelDir?: string): string;
|
|
33
33
|
declare function needsCoremlModel(variant?: BuildVariant): boolean;
|
|
34
34
|
declare function getVadModelPath(modelDir?: string): string;
|
|
35
|
+
declare function applyLegacyCpuFallback(variant: BuildVariant): BuildVariant;
|
|
35
36
|
/**
|
|
36
37
|
* neturns the variant configured via STORYTELLER_WHISPER_VARIANT env var.
|
|
37
38
|
* set by the Docker build process and should be the primary source
|
|
@@ -56,13 +57,13 @@ declare function isValidModel(model: string): model is WhisperModel;
|
|
|
56
57
|
declare function isValidVariant(variant: string): variant is BuildVariant;
|
|
57
58
|
declare const cliConfigSchema: z.ZodObject<{
|
|
58
59
|
lastUsedModel: z.ZodNullable<z.ZodEnum<["tiny", "tiny.en", "tiny-q5_1", "tiny.en-q5_1", "tiny-q8_0", "base", "base.en", "base-q5_1", "base.en-q5_1", "base-q8_0", "small", "small.en", "small-q5_1", "small.en-q5_1", "small-q8_0", "medium", "medium.en", "medium-q5_0", "medium.en-q5_0", "medium-q8_0", "large-v1", "large-v2", "large-v2-q5_0", "large-v2-q8_0", "large-v3", "large-v3-q5_0", "large-v3-turbo", "large-v3-turbo-q5_0", "large-v3-turbo-q8_0"]>>;
|
|
59
|
-
installedVariant: z.ZodNullable<z.ZodEnum<["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"]>>;
|
|
60
|
+
installedVariant: z.ZodNullable<z.ZodEnum<["darwin-arm64-coreml", "darwin-arm64-cpu", "darwin-x64-cpu", "linux-x64-cuda-13.1.0", "linux-x64-cuda-12.9.0", "linux-x64-cuda-11.8.0", "linux-x64-sycl", "linux-x64-vulkan", "linux-x64-rocm", "linux-x64-blas", "linux-x64-cpu", "linux-x64-cpu-legacy", "linux-arm64-cpu", "windows-x64-cpu", "windows-x64-cuda-13.1.0", "windows-x64-cuda-12.9.0", "windows-x64-cuda-11.8.0", "windows-x64-vulkan"]>>;
|
|
60
61
|
}, "strip", z.ZodTypeAny, {
|
|
61
62
|
lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
|
|
62
|
-
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
63
|
+
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
63
64
|
}, {
|
|
64
65
|
lastUsedModel: "tiny" | "tiny.en" | "tiny-q5_1" | "tiny.en-q5_1" | "tiny-q8_0" | "base" | "base.en" | "base-q5_1" | "base.en-q5_1" | "base-q8_0" | "small" | "small.en" | "small-q5_1" | "small.en-q5_1" | "small-q8_0" | "medium" | "medium.en" | "medium-q5_0" | "medium.en-q5_0" | "medium-q8_0" | "large-v1" | "large-v2" | "large-v2-q5_0" | "large-v2-q8_0" | "large-v3" | "large-v3-q5_0" | "large-v3-turbo" | "large-v3-turbo-q5_0" | "large-v3-turbo-q8_0" | null;
|
|
65
|
-
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
66
|
+
installedVariant: "darwin-arm64-coreml" | "darwin-arm64-cpu" | "darwin-x64-cpu" | "linux-x64-cuda-13.1.0" | "linux-x64-cuda-12.9.0" | "linux-x64-cuda-11.8.0" | "linux-x64-sycl" | "linux-x64-vulkan" | "linux-x64-rocm" | "linux-x64-blas" | "linux-x64-cpu" | "linux-x64-cpu-legacy" | "linux-arm64-cpu" | "windows-x64-cpu" | "windows-x64-cuda-13.1.0" | "windows-x64-cuda-12.9.0" | "windows-x64-cuda-11.8.0" | "windows-x64-vulkan" | null;
|
|
66
67
|
}>;
|
|
67
68
|
/**
|
|
68
69
|
* Only to be used by the CLI, not the API/programmatic use.
|
|
@@ -72,4 +73,4 @@ type CLIConfig = z.infer<typeof cliConfigSchema>;
|
|
|
72
73
|
declare function readConfig(): CLIConfig;
|
|
73
74
|
declare function writeConfig(config: Partial<CLIConfig>): void;
|
|
74
75
|
|
|
75
|
-
export { BUILD_VARIANTS, type BuildVariant, type CLIConfig, GITLAB_PROJECT_ID, GITLAB_PROJECT_PATH, GITLAB_WHIPSER_ML_ID, MODEL_SIZES, RECOGNITION_ENGINES, SILERO_VAD_VERSION, WHISPER_CPP_VERSION, WHISPER_MODELS, WHISPER_MODEL_VERSION, type WhisperModel, cliConfigSchema, detectPlatform, getBinaryDownloadUrl, getCompatibleVariants, getConfiguredVariant, getCoremlModelDownloadUrl, getCoremlModelPath, getInstallDir, getInstalledVariant, getModelDir, getModelDownloadUrl, getModelPath, getVadExecutablePath, getVadModelDownloadUrl, getVadModelPath, getWhisperBaseDir, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, isValidVariant, isVariantCompatibleWithCurrentPlatform, needsCoremlModel, readConfig, resolveVariant, writeConfig };
|
|
76
|
+
export { BUILD_VARIANTS, type BuildVariant, type CLIConfig, GITLAB_PROJECT_ID, GITLAB_PROJECT_PATH, GITLAB_WHIPSER_ML_ID, MODEL_SIZES, RECOGNITION_ENGINES, SILERO_VAD_VERSION, WHISPER_CPP_VERSION, WHISPER_MODELS, WHISPER_MODEL_VERSION, type WhisperModel, applyLegacyCpuFallback, cliConfigSchema, detectPlatform, getBinaryDownloadUrl, getCompatibleVariants, getConfiguredVariant, getCoremlModelDownloadUrl, getCoremlModelPath, getInstallDir, getInstalledVariant, getModelDir, getModelDownloadUrl, getModelPath, getVadExecutablePath, getVadModelDownloadUrl, getVadModelPath, getWhisperBaseDir, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, isValidVariant, isVariantCompatibleWithCurrentPlatform, needsCoremlModel, readConfig, resolveVariant, writeConfig };
|
package/dist/cli/config.js
CHANGED
|
@@ -22,6 +22,7 @@ const BUILD_VARIANTS = [
|
|
|
22
22
|
"linux-x64-rocm",
|
|
23
23
|
"linux-x64-blas",
|
|
24
24
|
"linux-x64-cpu",
|
|
25
|
+
"linux-x64-cpu-legacy",
|
|
25
26
|
"linux-arm64-cpu",
|
|
26
27
|
"windows-x64-cpu",
|
|
27
28
|
"windows-x64-cuda-13.1.0",
|
|
@@ -246,6 +247,36 @@ function hasSycl() {
|
|
|
246
247
|
return false;
|
|
247
248
|
}
|
|
248
249
|
}
|
|
250
|
+
let cpuCapabilitiesCache = null;
|
|
251
|
+
function getLinuxCpuCapabilities() {
|
|
252
|
+
if (cpuCapabilitiesCache) return cpuCapabilitiesCache;
|
|
253
|
+
try {
|
|
254
|
+
const cpuinfo = readFileSync("/proc/cpuinfo", "utf-8");
|
|
255
|
+
const flagsMatch = cpuinfo.match(/^flags\s*:\s*(.+)$/m);
|
|
256
|
+
if (!(flagsMatch == null ? void 0 : flagsMatch[1])) {
|
|
257
|
+
cpuCapabilitiesCache = { avx2: false, fma: false };
|
|
258
|
+
return cpuCapabilitiesCache;
|
|
259
|
+
}
|
|
260
|
+
const flags = flagsMatch[1].split(/\s+/);
|
|
261
|
+
cpuCapabilitiesCache = {
|
|
262
|
+
avx2: flags.includes("avx2"),
|
|
263
|
+
fma: flags.includes("fma")
|
|
264
|
+
};
|
|
265
|
+
} catch {
|
|
266
|
+
cpuCapabilitiesCache = { avx2: true, fma: true };
|
|
267
|
+
}
|
|
268
|
+
return cpuCapabilitiesCache;
|
|
269
|
+
}
|
|
270
|
+
function applyLegacyCpuFallback(variant) {
|
|
271
|
+
if (process.platform !== "linux") return variant;
|
|
272
|
+
if (variant !== "linux-x64-cpu") return variant;
|
|
273
|
+
const caps = getLinuxCpuCapabilities();
|
|
274
|
+
if (caps.avx2 && caps.fma) return variant;
|
|
275
|
+
console.warn(
|
|
276
|
+
`CPU lacks ${[!caps.avx2 && "AVX2", !caps.fma && "FMA"].filter(Boolean).join(" and ")} support. Falling back to linux-x64-cpu-legacy variant.`
|
|
277
|
+
);
|
|
278
|
+
return "linux-x64-cpu-legacy";
|
|
279
|
+
}
|
|
249
280
|
function getConfiguredVariant() {
|
|
250
281
|
const envVariant = process.env["STORYTELLER_WHISPER_VARIANT"];
|
|
251
282
|
if (!envVariant || envVariant === "") {
|
|
@@ -299,20 +330,20 @@ function detectPlatform() {
|
|
|
299
330
|
}
|
|
300
331
|
function resolveVariant(requestedVariant) {
|
|
301
332
|
if (requestedVariant) {
|
|
302
|
-
return requestedVariant;
|
|
333
|
+
return applyLegacyCpuFallback(requestedVariant);
|
|
303
334
|
}
|
|
304
335
|
const configured = getConfiguredVariant();
|
|
305
336
|
if (configured) {
|
|
306
|
-
return configured;
|
|
337
|
+
return applyLegacyCpuFallback(configured);
|
|
307
338
|
}
|
|
308
339
|
const installed = getInstalledVariant();
|
|
309
340
|
if (installed) {
|
|
310
|
-
return installed;
|
|
341
|
+
return applyLegacyCpuFallback(installed);
|
|
311
342
|
}
|
|
312
343
|
console.warn(
|
|
313
344
|
"No variant configured or installed. Falling back to platform detection."
|
|
314
345
|
);
|
|
315
|
-
return detectPlatform();
|
|
346
|
+
return applyLegacyCpuFallback(detectPlatform());
|
|
316
347
|
}
|
|
317
348
|
function isValidModel(model) {
|
|
318
349
|
return WHISPER_MODELS.includes(model);
|
|
@@ -374,6 +405,7 @@ export {
|
|
|
374
405
|
WHISPER_CPP_VERSION,
|
|
375
406
|
WHISPER_MODELS,
|
|
376
407
|
WHISPER_MODEL_VERSION,
|
|
408
|
+
applyLegacyCpuFallback,
|
|
377
409
|
cliConfigSchema,
|
|
378
410
|
detectPlatform,
|
|
379
411
|
getBinaryDownloadUrl,
|
package/dist/convert.d.cts
CHANGED
package/dist/convert.d.ts
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -19,10 +19,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var index_exports = {};
|
|
20
20
|
__export(index_exports, {
|
|
21
21
|
BUILD_VARIANTS: () => import_config.BUILD_VARIANTS,
|
|
22
|
+
Languages: () => import_WhisperCppSTT.Languages,
|
|
23
|
+
RECOGNITION_ENGINES: () => import_config3.RECOGNITION_ENGINES,
|
|
22
24
|
Timing: () => import_Timing.Timing,
|
|
23
25
|
TimingAggregator: () => import_Timing.TimingAggregator,
|
|
24
26
|
WHISPER_CPP_VERSION: () => import_config.WHISPER_CPP_VERSION,
|
|
25
27
|
WHISPER_MODELS: () => import_config.WHISPER_MODELS,
|
|
28
|
+
applyLegacyCpuFallback: () => import_config.applyLegacyCpuFallback,
|
|
26
29
|
audioSourceFromBuffer: () => import_audio.audioSourceFromBuffer,
|
|
27
30
|
audioSourceFromFile: () => import_audio.audioSourceFromFile,
|
|
28
31
|
audioSourceFromStream: () => import_audio.audioSourceFromStream,
|
|
@@ -91,13 +94,17 @@ var import_WhisperCppSTT = require("./recognition/WhisperCppSTT.cjs");
|
|
|
91
94
|
var import_WhisperServerSTT = require("./recognition/WhisperServerSTT.cjs");
|
|
92
95
|
var import_Timing = require("./utilities/Timing.cjs");
|
|
93
96
|
var import_Silero = require("./vad/Silero.cjs");
|
|
97
|
+
var import_config3 = require("./cli/config.cjs");
|
|
94
98
|
// Annotate the CommonJS export names for ESM import in node:
|
|
95
99
|
0 && (module.exports = {
|
|
96
100
|
BUILD_VARIANTS,
|
|
101
|
+
Languages,
|
|
102
|
+
RECOGNITION_ENGINES,
|
|
97
103
|
Timing,
|
|
98
104
|
TimingAggregator,
|
|
99
105
|
WHISPER_CPP_VERSION,
|
|
100
106
|
WHISPER_MODELS,
|
|
107
|
+
applyLegacyCpuFallback,
|
|
101
108
|
audioSourceFromBuffer,
|
|
102
109
|
audioSourceFromFile,
|
|
103
110
|
audioSourceFromStream,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { d as AudioFormat, e as AudioFormatInfo, A as AudioInput, f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, L as Language, O as OpenAICloudSTTOptions, B as OpenAIResult, j as RawAudioInput, R as RecognitionEngine, a as RecognitionOptions, b as RecognitionResult, S as ServiceCapabilities, W as WhisperCppModelId,
|
|
1
|
+
export { d as AudioFormat, e as AudioFormatInfo, A as AudioInput, f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, L as Language, E as Languages, O as OpenAICloudSTTOptions, B as OpenAIResult, j as RawAudioInput, R as RecognitionEngine, a as RecognitionOptions, b as RecognitionResult, S as ServiceCapabilities, W as WhisperCppModelId, G as WhisperCppOptions, F as WhisperCppResult, K as WhisperServerOptions, J as WhisperServerResult, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, n as formatFromExtension, o as formatToExtension, p as getFormat, q as getFormatInfo, s as getTargetFormat, t as isAudioSource, u as needsConversion, v as normalizeToAudioSource, C as openaiInputPreference, r as recognitionEngines, c as recognize, D as recognizeOpenAI, I as recognizeWhisperCpp, N as recognizeWhisperServer, w as serviceCapabilities, x as toBuffer, y as toFilePath, z as toReadStream, H as whisperCppInputPreference, M as whisperServerInputPreference } from './AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
export { ConversionOptions, PreparedAudio, convertToBuffer, convertToFile, createStreamingConversion, prepareForService, prepareWavForService } from './audio/AudioConverter.cjs';
|
|
3
|
-
export { BUILD_VARIANTS, BuildVariant, WHISPER_CPP_VERSION, WHISPER_MODELS, WhisperModel, detectPlatform, getConfiguredVariant, getInstallDir, getModelDir, getModelPath, getVadModelPath, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, resolveVariant } from './cli/config.cjs';
|
|
3
|
+
export { BUILD_VARIANTS, BuildVariant, RECOGNITION_ENGINES, WHISPER_CPP_VERSION, WHISPER_MODELS, WhisperModel, applyLegacyCpuFallback, detectPlatform, getConfiguredVariant, getInstallDir, getModelDir, getModelPath, getVadModelPath, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, resolveVariant } from './cli/config.cjs';
|
|
4
4
|
export { InstallBinaryOptions, InstallModelOptions, InstallVadModelOptions, ensureWhisperInstalled, installBinary, installModel, installVadModel } from './cli/install.cjs';
|
|
5
5
|
export { ConversionMode, getConfig, getConversionMode, isTimingEnabled, setConversionMode, setTimingEnabled } from './config.cjs';
|
|
6
6
|
export { Timeline, TimelineEntry, TimelineEntryType } from './utilities/Timeline.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { d as AudioFormat, e as AudioFormatInfo, A as AudioInput, f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, L as Language, O as OpenAICloudSTTOptions, B as OpenAIResult, j as RawAudioInput, R as RecognitionEngine, a as RecognitionOptions, b as RecognitionResult, S as ServiceCapabilities, W as WhisperCppModelId,
|
|
1
|
+
export { d as AudioFormat, e as AudioFormatInfo, A as AudioInput, f as AudioSource, g as AudioSourceFromBuffer, h as AudioSourceFromFile, i as AudioSourceFromStream, L as Language, E as Languages, O as OpenAICloudSTTOptions, B as OpenAIResult, j as RawAudioInput, R as RecognitionEngine, a as RecognitionOptions, b as RecognitionResult, S as ServiceCapabilities, W as WhisperCppModelId, G as WhisperCppOptions, F as WhisperCppResult, K as WhisperServerOptions, J as WhisperServerResult, k as audioSourceFromBuffer, l as audioSourceFromFile, m as audioSourceFromStream, n as formatFromExtension, o as formatToExtension, p as getFormat, q as getFormatInfo, s as getTargetFormat, t as isAudioSource, u as needsConversion, v as normalizeToAudioSource, C as openaiInputPreference, r as recognitionEngines, c as recognize, D as recognizeOpenAI, I as recognizeWhisperCpp, N as recognizeWhisperServer, w as serviceCapabilities, x as toBuffer, y as toFilePath, z as toReadStream, H as whisperCppInputPreference, M as whisperServerInputPreference } from './AudioFormat--LEggByS.js';
|
|
2
2
|
export { ConversionOptions, PreparedAudio, convertToBuffer, convertToFile, createStreamingConversion, prepareForService, prepareWavForService } from './audio/AudioConverter.js';
|
|
3
|
-
export { BUILD_VARIANTS, BuildVariant, WHISPER_CPP_VERSION, WHISPER_MODELS, WhisperModel, detectPlatform, getConfiguredVariant, getInstallDir, getModelDir, getModelPath, getVadModelPath, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, resolveVariant } from './cli/config.js';
|
|
3
|
+
export { BUILD_VARIANTS, BuildVariant, RECOGNITION_ENGINES, WHISPER_CPP_VERSION, WHISPER_MODELS, WhisperModel, applyLegacyCpuFallback, detectPlatform, getConfiguredVariant, getInstallDir, getModelDir, getModelPath, getVadModelPath, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel, resolveVariant } from './cli/config.js';
|
|
4
4
|
export { InstallBinaryOptions, InstallModelOptions, InstallVadModelOptions, ensureWhisperInstalled, installBinary, installModel, installVadModel } from './cli/install.js';
|
|
5
5
|
export { ConversionMode, getConfig, getConversionMode, isTimingEnabled, setConversionMode, setTimingEnabled } from './config.js';
|
|
6
6
|
export { Timeline, TimelineEntry, TimelineEntryType } from './utilities/Timeline.js';
|
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
BUILD_VARIANTS,
|
|
29
29
|
WHISPER_CPP_VERSION,
|
|
30
30
|
WHISPER_MODELS,
|
|
31
|
+
applyLegacyCpuFallback,
|
|
31
32
|
detectPlatform,
|
|
32
33
|
getConfiguredVariant,
|
|
33
34
|
getInstallDir,
|
|
@@ -57,6 +58,7 @@ import {
|
|
|
57
58
|
recognize as recognize2
|
|
58
59
|
} from "./recognition/OpenAICloudSTT.js";
|
|
59
60
|
import {
|
|
61
|
+
Languages,
|
|
60
62
|
inputPreference as inputPreference2,
|
|
61
63
|
recognize as recognize3
|
|
62
64
|
} from "./recognition/WhisperCppSTT.js";
|
|
@@ -79,12 +81,16 @@ import {
|
|
|
79
81
|
ensureVadInstalled,
|
|
80
82
|
segmentsToTimeline
|
|
81
83
|
} from "./vad/Silero.js";
|
|
84
|
+
import { RECOGNITION_ENGINES } from "./cli/config.js";
|
|
82
85
|
export {
|
|
83
86
|
BUILD_VARIANTS,
|
|
87
|
+
Languages,
|
|
88
|
+
RECOGNITION_ENGINES,
|
|
84
89
|
Timing,
|
|
85
90
|
TimingAggregator,
|
|
86
91
|
WHISPER_CPP_VERSION,
|
|
87
92
|
WHISPER_MODELS,
|
|
93
|
+
applyLegacyCpuFallback,
|
|
88
94
|
audioSourceFromBuffer,
|
|
89
95
|
audioSourceFromFile,
|
|
90
96
|
audioSourceFromStream,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat-
|
|
1
|
+
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import { Timeline } from '../utilities/Timeline.cjs';
|
|
3
3
|
import { Timing } from '../utilities/Timing.cjs';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat
|
|
1
|
+
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import { Timeline } from '../utilities/Timeline.js';
|
|
3
3
|
import { Timing } from '../utilities/Timing.js';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as SpeechSDK from 'microsoft-cognitiveservices-speech-sdk';
|
|
2
|
-
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat-
|
|
2
|
+
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
3
3
|
import { Timeline } from '../utilities/Timeline.cjs';
|
|
4
4
|
import { Timing } from '../utilities/Timing.cjs';
|
|
5
5
|
import 'node:fs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as SpeechSDK from 'microsoft-cognitiveservices-speech-sdk';
|
|
2
|
-
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat
|
|
2
|
+
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat--LEggByS.js';
|
|
3
3
|
import { Timeline } from '../utilities/Timeline.js';
|
|
4
4
|
import { Timing } from '../utilities/Timing.js';
|
|
5
5
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as RawAudioInput, f as AudioSource, d as AudioFormat } from '../AudioFormat-
|
|
1
|
+
import { j as RawAudioInput, f as AudioSource, d as AudioFormat } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import { ConversionMode } from '../config.cjs';
|
|
3
3
|
import { TimelineEntry } from '../utilities/Timeline.cjs';
|
|
4
4
|
import { Timing } from '../utilities/Timing.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as RawAudioInput, f as AudioSource, d as AudioFormat } from '../AudioFormat
|
|
1
|
+
import { j as RawAudioInput, f as AudioSource, d as AudioFormat } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import { ConversionMode } from '../config.js';
|
|
3
3
|
import { TimelineEntry } from '../utilities/Timeline.js';
|
|
4
4
|
import { Timing } from '../utilities/Timing.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat-
|
|
1
|
+
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import { Timeline } from '../utilities/Timeline.cjs';
|
|
3
3
|
import { Timing } from '../utilities/Timing.cjs';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat
|
|
1
|
+
import { d as AudioFormat, j as RawAudioInput, f as AudioSource } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import { Timeline } from '../utilities/Timeline.js';
|
|
3
3
|
import { Timing } from '../utilities/Timing.js';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Q as InputPreference, O as OpenAICloudSTTOptions, B as RecognitionResult, C as inputPreference, D as recognize } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import '../utilities/Timeline.cjs';
|
|
3
3
|
import '../utilities/Timing.cjs';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Q as InputPreference, O as OpenAICloudSTTOptions, B as RecognitionResult, C as inputPreference, D as recognize } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import '../utilities/Timeline.js';
|
|
3
3
|
import '../utilities/Timing.js';
|
|
4
4
|
import 'node:fs';
|
|
@@ -28,6 +28,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var WhisperCppSTT_exports = {};
|
|
30
30
|
__export(WhisperCppSTT_exports, {
|
|
31
|
+
Languages: () => Languages,
|
|
31
32
|
ensureModelDownloaded: () => ensureModelDownloaded,
|
|
32
33
|
ensureWhisperCppInstalled: () => ensureWhisperCppInstalled,
|
|
33
34
|
inputPreference: () => inputPreference,
|
|
@@ -44,6 +45,107 @@ var import_config = require("../cli/config.cjs");
|
|
|
44
45
|
var import_install = require("../cli/install.cjs");
|
|
45
46
|
var import_WhisperTimeline = require("../utilities/WhisperTimeline.cjs");
|
|
46
47
|
const inputPreference = "file";
|
|
48
|
+
const Languages = [
|
|
49
|
+
"af",
|
|
50
|
+
"am",
|
|
51
|
+
"ar",
|
|
52
|
+
"as",
|
|
53
|
+
"az",
|
|
54
|
+
"ba",
|
|
55
|
+
"be",
|
|
56
|
+
"bg",
|
|
57
|
+
"bn",
|
|
58
|
+
"bo",
|
|
59
|
+
"br",
|
|
60
|
+
"bs",
|
|
61
|
+
"ca",
|
|
62
|
+
"cs",
|
|
63
|
+
"cy",
|
|
64
|
+
"da",
|
|
65
|
+
"de",
|
|
66
|
+
"el",
|
|
67
|
+
"en",
|
|
68
|
+
"es",
|
|
69
|
+
"et",
|
|
70
|
+
"eu",
|
|
71
|
+
"fa",
|
|
72
|
+
"fi",
|
|
73
|
+
"fo",
|
|
74
|
+
"fr",
|
|
75
|
+
"gl",
|
|
76
|
+
"gu",
|
|
77
|
+
"ha",
|
|
78
|
+
"haw",
|
|
79
|
+
"he",
|
|
80
|
+
"hi",
|
|
81
|
+
"hr",
|
|
82
|
+
"ht",
|
|
83
|
+
"hu",
|
|
84
|
+
"hy",
|
|
85
|
+
"id",
|
|
86
|
+
"is",
|
|
87
|
+
"it",
|
|
88
|
+
"ja",
|
|
89
|
+
"jw",
|
|
90
|
+
"ka",
|
|
91
|
+
"kk",
|
|
92
|
+
"km",
|
|
93
|
+
"kn",
|
|
94
|
+
"ko",
|
|
95
|
+
"la",
|
|
96
|
+
"lb",
|
|
97
|
+
"ln",
|
|
98
|
+
"lo",
|
|
99
|
+
"lt",
|
|
100
|
+
"lv",
|
|
101
|
+
"mg",
|
|
102
|
+
"mi",
|
|
103
|
+
"mk",
|
|
104
|
+
"ml",
|
|
105
|
+
"mn",
|
|
106
|
+
"mr",
|
|
107
|
+
"ms",
|
|
108
|
+
"mt",
|
|
109
|
+
"my",
|
|
110
|
+
"ne",
|
|
111
|
+
"nl",
|
|
112
|
+
"nn",
|
|
113
|
+
"no",
|
|
114
|
+
"oc",
|
|
115
|
+
"pa",
|
|
116
|
+
"pl",
|
|
117
|
+
"ps",
|
|
118
|
+
"pt",
|
|
119
|
+
"ro",
|
|
120
|
+
"ru",
|
|
121
|
+
"sa",
|
|
122
|
+
"sd",
|
|
123
|
+
"si",
|
|
124
|
+
"sk",
|
|
125
|
+
"sl",
|
|
126
|
+
"sn",
|
|
127
|
+
"so",
|
|
128
|
+
"sq",
|
|
129
|
+
"sr",
|
|
130
|
+
"su",
|
|
131
|
+
"sv",
|
|
132
|
+
"sw",
|
|
133
|
+
"ta",
|
|
134
|
+
"te",
|
|
135
|
+
"tg",
|
|
136
|
+
"th",
|
|
137
|
+
"tk",
|
|
138
|
+
"tl",
|
|
139
|
+
"tr",
|
|
140
|
+
"tt",
|
|
141
|
+
"uk",
|
|
142
|
+
"ur",
|
|
143
|
+
"uz",
|
|
144
|
+
"vi",
|
|
145
|
+
"yi",
|
|
146
|
+
"yo",
|
|
147
|
+
"zh"
|
|
148
|
+
];
|
|
47
149
|
const defaultOptions = {
|
|
48
150
|
processors: 1,
|
|
49
151
|
threads: 4,
|
|
@@ -288,6 +390,7 @@ function runWhisperProcess(options) {
|
|
|
288
390
|
}
|
|
289
391
|
// Annotate the CommonJS export names for ESM import in node:
|
|
290
392
|
0 && (module.exports = {
|
|
393
|
+
Languages,
|
|
291
394
|
ensureModelDownloaded,
|
|
292
395
|
ensureWhisperCppInstalled,
|
|
293
396
|
inputPreference,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { T as InputPreference, L as Language, E as Languages, F as RecognitionResult, W as WhisperCppModelId, G as WhisperCppOptions, V as ensureModelDownloaded, U as ensureWhisperCppInstalled, H as inputPreference, I as recognize } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import '../utilities/Timeline.cjs';
|
|
3
3
|
import '../utilities/Timing.cjs';
|
|
4
4
|
export { WhisperModel } from '../cli/config.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { T as InputPreference, L as Language, E as Languages, F as RecognitionResult, W as WhisperCppModelId, G as WhisperCppOptions, V as ensureModelDownloaded, U as ensureWhisperCppInstalled, H as inputPreference, I as recognize } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import '../utilities/Timeline.js';
|
|
3
3
|
import '../utilities/Timing.js';
|
|
4
4
|
export { WhisperModel } from '../cli/config.js';
|
|
@@ -24,6 +24,107 @@ import {
|
|
|
24
24
|
parseWhisperCppOutput
|
|
25
25
|
} from "../utilities/WhisperTimeline.js";
|
|
26
26
|
const inputPreference = "file";
|
|
27
|
+
const Languages = [
|
|
28
|
+
"af",
|
|
29
|
+
"am",
|
|
30
|
+
"ar",
|
|
31
|
+
"as",
|
|
32
|
+
"az",
|
|
33
|
+
"ba",
|
|
34
|
+
"be",
|
|
35
|
+
"bg",
|
|
36
|
+
"bn",
|
|
37
|
+
"bo",
|
|
38
|
+
"br",
|
|
39
|
+
"bs",
|
|
40
|
+
"ca",
|
|
41
|
+
"cs",
|
|
42
|
+
"cy",
|
|
43
|
+
"da",
|
|
44
|
+
"de",
|
|
45
|
+
"el",
|
|
46
|
+
"en",
|
|
47
|
+
"es",
|
|
48
|
+
"et",
|
|
49
|
+
"eu",
|
|
50
|
+
"fa",
|
|
51
|
+
"fi",
|
|
52
|
+
"fo",
|
|
53
|
+
"fr",
|
|
54
|
+
"gl",
|
|
55
|
+
"gu",
|
|
56
|
+
"ha",
|
|
57
|
+
"haw",
|
|
58
|
+
"he",
|
|
59
|
+
"hi",
|
|
60
|
+
"hr",
|
|
61
|
+
"ht",
|
|
62
|
+
"hu",
|
|
63
|
+
"hy",
|
|
64
|
+
"id",
|
|
65
|
+
"is",
|
|
66
|
+
"it",
|
|
67
|
+
"ja",
|
|
68
|
+
"jw",
|
|
69
|
+
"ka",
|
|
70
|
+
"kk",
|
|
71
|
+
"km",
|
|
72
|
+
"kn",
|
|
73
|
+
"ko",
|
|
74
|
+
"la",
|
|
75
|
+
"lb",
|
|
76
|
+
"ln",
|
|
77
|
+
"lo",
|
|
78
|
+
"lt",
|
|
79
|
+
"lv",
|
|
80
|
+
"mg",
|
|
81
|
+
"mi",
|
|
82
|
+
"mk",
|
|
83
|
+
"ml",
|
|
84
|
+
"mn",
|
|
85
|
+
"mr",
|
|
86
|
+
"ms",
|
|
87
|
+
"mt",
|
|
88
|
+
"my",
|
|
89
|
+
"ne",
|
|
90
|
+
"nl",
|
|
91
|
+
"nn",
|
|
92
|
+
"no",
|
|
93
|
+
"oc",
|
|
94
|
+
"pa",
|
|
95
|
+
"pl",
|
|
96
|
+
"ps",
|
|
97
|
+
"pt",
|
|
98
|
+
"ro",
|
|
99
|
+
"ru",
|
|
100
|
+
"sa",
|
|
101
|
+
"sd",
|
|
102
|
+
"si",
|
|
103
|
+
"sk",
|
|
104
|
+
"sl",
|
|
105
|
+
"sn",
|
|
106
|
+
"so",
|
|
107
|
+
"sq",
|
|
108
|
+
"sr",
|
|
109
|
+
"su",
|
|
110
|
+
"sv",
|
|
111
|
+
"sw",
|
|
112
|
+
"ta",
|
|
113
|
+
"te",
|
|
114
|
+
"tg",
|
|
115
|
+
"th",
|
|
116
|
+
"tk",
|
|
117
|
+
"tl",
|
|
118
|
+
"tr",
|
|
119
|
+
"tt",
|
|
120
|
+
"uk",
|
|
121
|
+
"ur",
|
|
122
|
+
"uz",
|
|
123
|
+
"vi",
|
|
124
|
+
"yi",
|
|
125
|
+
"yo",
|
|
126
|
+
"zh"
|
|
127
|
+
];
|
|
27
128
|
const defaultOptions = {
|
|
28
129
|
processors: 1,
|
|
29
130
|
threads: 4,
|
|
@@ -267,6 +368,7 @@ function runWhisperProcess(options) {
|
|
|
267
368
|
});
|
|
268
369
|
}
|
|
269
370
|
export {
|
|
371
|
+
Languages,
|
|
270
372
|
ensureModelDownloaded,
|
|
271
373
|
ensureWhisperCppInstalled,
|
|
272
374
|
inputPreference,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { X as InputPreference, J as RecognitionResult, K as WhisperServerOptions, M as inputPreference, N as recognize } from '../AudioFormat-Cq6sRKDj.cjs';
|
|
2
2
|
import '../utilities/Timeline.cjs';
|
|
3
3
|
import '../utilities/Timing.cjs';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { X as InputPreference, J as RecognitionResult, K as WhisperServerOptions, M as inputPreference, N as recognize } from '../AudioFormat--LEggByS.js';
|
|
2
2
|
import '../utilities/Timeline.js';
|
|
3
3
|
import '../utilities/Timing.js';
|
|
4
4
|
import 'node:fs';
|
|
@@ -22,7 +22,7 @@ __export(ActiveGateOg_exports, {
|
|
|
22
22
|
detectVoiceActivity: () => detectVoiceActivity
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(ActiveGateOg_exports);
|
|
25
|
-
var import_promises = require("fs/promises");
|
|
25
|
+
var import_promises = require("node:fs/promises");
|
|
26
26
|
var import_convert = require("../convert.cjs");
|
|
27
27
|
var import_Ascii = require("../encodings/Ascii.cjs");
|
|
28
28
|
var import_ObjectUtilities = require("../utilities/ObjectUtilities.cjs");
|
package/dist/vad/ActiveGateOg.js
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyteller-platform/ghost-story",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "An easy-to-use speech toolset. Fork of the original echogarden project.",
|
|
5
|
-
"author": "",
|
|
5
|
+
"author": "Thomas F. K. Jorna",
|
|
6
6
|
"license": "GPL-3.0",
|
|
7
7
|
"keywords": [
|
|
8
|
-
"
|
|
8
|
+
"speech-to-text"
|
|
9
9
|
],
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://
|
|
12
|
+
"url": "https://gitlab.com/storyteller-platform/storyteller"
|
|
13
13
|
},
|
|
14
14
|
"bugs": {
|
|
15
|
-
"url": "https://
|
|
15
|
+
"url": "https://gitlab.com/storyteller-platform/storyteller/issues"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=20"
|