@storyteller-platform/ghost-story 0.1.4 → 0.1.5
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--LEggByS.d.ts → AudioFormat-BJuNZJlT.d.ts} +4 -0
- package/dist/{AudioFormat-Cq6sRKDj.d.cts → AudioFormat-CKxAQAj2.d.cts} +4 -0
- 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/convert.d.cts +1 -1
- package/dist/convert.d.ts +1 -1
- package/dist/fetch.cjs +35 -0
- package/dist/fetch.d.cts +9 -0
- package/dist/fetch.d.ts +9 -0
- package/dist/fetch.js +11 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- 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.cjs +8 -2
- package/dist/recognition/DeepgramSTT.d.cts +10 -2
- package/dist/recognition/DeepgramSTT.d.ts +10 -2
- package/dist/recognition/DeepgramSTT.js +8 -2
- 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.d.cts +1 -1
- package/dist/recognition/WhisperCppSTT.d.ts +1 -1
- package/dist/recognition/WhisperServerSTT.cjs +14 -3
- package/dist/recognition/WhisperServerSTT.d.cts +1 -1
- package/dist/recognition/WhisperServerSTT.d.ts +1 -1
- package/dist/recognition/WhisperServerSTT.js +14 -3
- package/package.json +2 -1
|
@@ -93,6 +93,10 @@ interface WhisperServerOptions {
|
|
|
93
93
|
temperature?: number;
|
|
94
94
|
apiKey?: string;
|
|
95
95
|
inputFormat?: AudioFormat;
|
|
96
|
+
/**
|
|
97
|
+
* timeout in milliseconds waiting for a response from the whisper server
|
|
98
|
+
*/
|
|
99
|
+
timeout?: number;
|
|
96
100
|
}
|
|
97
101
|
interface RecognitionResult$1 {
|
|
98
102
|
transcript: string;
|
|
@@ -93,6 +93,10 @@ interface WhisperServerOptions {
|
|
|
93
93
|
temperature?: number;
|
|
94
94
|
apiKey?: string;
|
|
95
95
|
inputFormat?: AudioFormat;
|
|
96
|
+
/**
|
|
97
|
+
* timeout in milliseconds waiting for a response from the whisper server
|
|
98
|
+
*/
|
|
99
|
+
timeout?: number;
|
|
96
100
|
}
|
|
97
101
|
interface RecognitionResult$1 {
|
|
98
102
|
transcript: string;
|
package/dist/api/APIOptions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'node:fs';
|
|
2
2
|
import 'node:stream';
|
|
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-
|
|
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-CKxAQAj2.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 { Y as Audio, A as AudioInput, R as RecognitionEngine, a as RecognitionOptions, b as RecognitionResult, r as recognitionEngines, c as recognize } from '../AudioFormat
|
|
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-BJuNZJlT.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-CKxAQAj2.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-BJuNZJlT.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 { 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-
|
|
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-CKxAQAj2.cjs';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:stream';
|
|
4
4
|
import '../config.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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-BJuNZJlT.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-CKxAQAj2.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-BJuNZJlT.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 { 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-
|
|
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-CKxAQAj2.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 { 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
|
|
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-BJuNZJlT.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/convert.d.cts
CHANGED
package/dist/convert.d.ts
CHANGED
package/dist/fetch.cjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var fetch_exports = {};
|
|
20
|
+
__export(fetch_exports, {
|
|
21
|
+
createTimeoutAgent: () => createTimeoutAgent
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(fetch_exports);
|
|
24
|
+
var import_undici = require("undici");
|
|
25
|
+
const createTimeoutAgent = (timeout) => new import_undici.Agent({
|
|
26
|
+
// 1 hour timeout lmao
|
|
27
|
+
headersTimeout: timeout,
|
|
28
|
+
bodyTimeout: timeout,
|
|
29
|
+
// connection shouldnt be that long
|
|
30
|
+
connectTimeout: 3e4
|
|
31
|
+
});
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
createTimeoutAgent
|
|
35
|
+
});
|
package/dist/fetch.d.cts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Agent } from 'undici';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* necessary bc there's a default timeout of 300 seconds for all `fetch` requests, which is
|
|
5
|
+
* often shorter than the time it takes for the whisper server to respond
|
|
6
|
+
*/
|
|
7
|
+
declare const createTimeoutAgent: (timeout: number) => Agent;
|
|
8
|
+
|
|
9
|
+
export { createTimeoutAgent };
|
package/dist/fetch.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Agent } from 'undici';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* necessary bc there's a default timeout of 300 seconds for all `fetch` requests, which is
|
|
5
|
+
* often shorter than the time it takes for the whisper server to respond
|
|
6
|
+
*/
|
|
7
|
+
declare const createTimeoutAgent: (timeout: number) => Agent;
|
|
8
|
+
|
|
9
|
+
export { createTimeoutAgent };
|
package/dist/fetch.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Agent } from "undici";
|
|
2
|
+
const createTimeoutAgent = (timeout) => new Agent({
|
|
3
|
+
// 1 hour timeout lmao
|
|
4
|
+
headersTimeout: timeout,
|
|
5
|
+
bodyTimeout: timeout,
|
|
6
|
+
// connection shouldnt be that long
|
|
7
|
+
connectTimeout: 3e4
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
createTimeoutAgent
|
|
11
|
+
};
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-CKxAQAj2.cjs';
|
|
2
2
|
export { ConversionOptions, PreparedAudio, convertToBuffer, convertToFile, createStreamingConversion, prepareForService, prepareWavForService } from './audio/AudioConverter.cjs';
|
|
3
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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-BJuNZJlT.js';
|
|
2
2
|
export { ConversionOptions, PreparedAudio, convertToBuffer, convertToFile, createStreamingConversion, prepareForService, prepareWavForService } from './audio/AudioConverter.js';
|
|
3
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';
|
|
@@ -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-CKxAQAj2.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-BJuNZJlT.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-CKxAQAj2.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-BJuNZJlT.js';
|
|
3
3
|
import { Timeline } from '../utilities/Timeline.js';
|
|
4
4
|
import { Timing } from '../utilities/Timing.js';
|
|
5
5
|
import 'node:fs';
|
|
@@ -24,6 +24,7 @@ __export(DeepgramSTT_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(DeepgramSTT_exports);
|
|
25
25
|
var import_audio = require("../audio/index.cjs");
|
|
26
26
|
var import_config = require("../config.cjs");
|
|
27
|
+
var import_fetch = require("../fetch.cjs");
|
|
27
28
|
var import_ObjectUtilities = require("../utilities/ObjectUtilities.cjs");
|
|
28
29
|
const SERVICE_ID = "deepgram";
|
|
29
30
|
function formatToContentType(format) {
|
|
@@ -93,7 +94,8 @@ async function recognize(input, languageCode, timing, options, signal) {
|
|
|
93
94
|
// necessary because otherwise there's some excruciating type error when running `yarn check`
|
|
94
95
|
// from the root
|
|
95
96
|
body: uploadResult.stream,
|
|
96
|
-
signal: signal ?? null
|
|
97
|
+
signal: signal ?? null,
|
|
98
|
+
dispatcher: (0, import_fetch.createTimeoutAgent)(opts.timeout)
|
|
97
99
|
});
|
|
98
100
|
const conversionPromise = (_a2 = uploadResult.start) == null ? void 0 : _a2.call(uploadResult);
|
|
99
101
|
const resp = await fetchPromise;
|
|
@@ -187,7 +189,11 @@ function applyPunctuationToTimeline(timeline, transcript) {
|
|
|
187
189
|
const defaultDeepgramSTTOptions = {
|
|
188
190
|
apiKey: "",
|
|
189
191
|
model: "nova-3",
|
|
190
|
-
punctuate: true
|
|
192
|
+
punctuate: true,
|
|
193
|
+
timeout: 30 * 60 * 1e3,
|
|
194
|
+
// 30 minutes
|
|
195
|
+
inputFormat: void 0,
|
|
196
|
+
conversionMode: void 0
|
|
191
197
|
};
|
|
192
198
|
// Annotate the CommonJS export names for ESM import in node:
|
|
193
199
|
0 && (module.exports = {
|
|
@@ -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-CKxAQAj2.cjs';
|
|
2
2
|
import { ConversionMode } from '../config.cjs';
|
|
3
3
|
import { TimelineEntry } from '../utilities/Timeline.cjs';
|
|
4
4
|
import { Timing } from '../utilities/Timing.cjs';
|
|
@@ -17,7 +17,15 @@ interface DeepgramSTTOptions {
|
|
|
17
17
|
punctuate: boolean;
|
|
18
18
|
inputFormat?: AudioFormat | undefined;
|
|
19
19
|
conversionMode?: ConversionMode | undefined;
|
|
20
|
+
timeout?: number;
|
|
20
21
|
}
|
|
21
|
-
declare const defaultDeepgramSTTOptions:
|
|
22
|
+
declare const defaultDeepgramSTTOptions: {
|
|
23
|
+
apiKey: string;
|
|
24
|
+
model: string;
|
|
25
|
+
punctuate: boolean;
|
|
26
|
+
timeout: number;
|
|
27
|
+
inputFormat: AudioFormat | undefined;
|
|
28
|
+
conversionMode: ConversionMode | undefined;
|
|
29
|
+
};
|
|
22
30
|
|
|
23
31
|
export { type DeepgramSTTOptions, defaultDeepgramSTTOptions, recognize };
|
|
@@ -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-BJuNZJlT.js';
|
|
2
2
|
import { ConversionMode } from '../config.js';
|
|
3
3
|
import { TimelineEntry } from '../utilities/Timeline.js';
|
|
4
4
|
import { Timing } from '../utilities/Timing.js';
|
|
@@ -17,7 +17,15 @@ interface DeepgramSTTOptions {
|
|
|
17
17
|
punctuate: boolean;
|
|
18
18
|
inputFormat?: AudioFormat | undefined;
|
|
19
19
|
conversionMode?: ConversionMode | undefined;
|
|
20
|
+
timeout?: number;
|
|
20
21
|
}
|
|
21
|
-
declare const defaultDeepgramSTTOptions:
|
|
22
|
+
declare const defaultDeepgramSTTOptions: {
|
|
23
|
+
apiKey: string;
|
|
24
|
+
model: string;
|
|
25
|
+
punctuate: boolean;
|
|
26
|
+
timeout: number;
|
|
27
|
+
inputFormat: AudioFormat | undefined;
|
|
28
|
+
conversionMode: ConversionMode | undefined;
|
|
29
|
+
};
|
|
22
30
|
|
|
23
31
|
export { type DeepgramSTTOptions, defaultDeepgramSTTOptions, recognize };
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
serviceCapabilities
|
|
7
7
|
} from "../audio/index.js";
|
|
8
8
|
import { getConversionMode } from "../config.js";
|
|
9
|
+
import { createTimeoutAgent } from "../fetch.js";
|
|
9
10
|
import { extendDeep } from "../utilities/ObjectUtilities.js";
|
|
10
11
|
const SERVICE_ID = "deepgram";
|
|
11
12
|
function formatToContentType(format) {
|
|
@@ -75,7 +76,8 @@ async function recognize(input, languageCode, timing, options, signal) {
|
|
|
75
76
|
// necessary because otherwise there's some excruciating type error when running `yarn check`
|
|
76
77
|
// from the root
|
|
77
78
|
body: uploadResult.stream,
|
|
78
|
-
signal: signal ?? null
|
|
79
|
+
signal: signal ?? null,
|
|
80
|
+
dispatcher: createTimeoutAgent(opts.timeout)
|
|
79
81
|
});
|
|
80
82
|
const conversionPromise = (_a2 = uploadResult.start) == null ? void 0 : _a2.call(uploadResult);
|
|
81
83
|
const resp = await fetchPromise;
|
|
@@ -169,7 +171,11 @@ function applyPunctuationToTimeline(timeline, transcript) {
|
|
|
169
171
|
const defaultDeepgramSTTOptions = {
|
|
170
172
|
apiKey: "",
|
|
171
173
|
model: "nova-3",
|
|
172
|
-
punctuate: true
|
|
174
|
+
punctuate: true,
|
|
175
|
+
timeout: 30 * 60 * 1e3,
|
|
176
|
+
// 30 minutes
|
|
177
|
+
inputFormat: void 0,
|
|
178
|
+
conversionMode: void 0
|
|
173
179
|
};
|
|
174
180
|
export {
|
|
175
181
|
defaultDeepgramSTTOptions,
|
|
@@ -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-CKxAQAj2.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-BJuNZJlT.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 { Q as InputPreference, O as OpenAICloudSTTOptions, B as RecognitionResult, C as inputPreference, D as recognize } from '../AudioFormat-
|
|
1
|
+
export { Q as InputPreference, O as OpenAICloudSTTOptions, B as RecognitionResult, C as inputPreference, D as recognize } from '../AudioFormat-CKxAQAj2.cjs';
|
|
2
2
|
import '../utilities/Timeline.cjs';
|
|
3
3
|
import '../utilities/Timing.cjs';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Q as InputPreference, O as OpenAICloudSTTOptions, B as RecognitionResult, C as inputPreference, D as recognize } from '../AudioFormat
|
|
1
|
+
export { Q as InputPreference, O as OpenAICloudSTTOptions, B as RecognitionResult, C as inputPreference, D as recognize } from '../AudioFormat-BJuNZJlT.js';
|
|
2
2
|
import '../utilities/Timeline.js';
|
|
3
3
|
import '../utilities/Timing.js';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-CKxAQAj2.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 { 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
|
|
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-BJuNZJlT.js';
|
|
2
2
|
import '../utilities/Timeline.js';
|
|
3
3
|
import '../utilities/Timing.js';
|
|
4
4
|
export { WhisperModel } from '../cli/config.js';
|
|
@@ -25,12 +25,15 @@ module.exports = __toCommonJS(WhisperServerSTT_exports);
|
|
|
25
25
|
var import_node_fs = require("node:fs");
|
|
26
26
|
var import_node_path = require("node:path");
|
|
27
27
|
var import_audio = require("../audio/index.cjs");
|
|
28
|
+
var import_fetch = require("../fetch.cjs");
|
|
28
29
|
var import_WhisperTimeline = require("../utilities/WhisperTimeline.cjs");
|
|
29
30
|
const inputPreference = "file";
|
|
30
31
|
const defaultOptions = {
|
|
31
32
|
baseURL: "http://localhost:8080",
|
|
32
33
|
inferencePath: "/audio/transcriptions",
|
|
33
|
-
temperature: 0
|
|
34
|
+
temperature: 0,
|
|
35
|
+
timeout: 30 * 60 * 1e3
|
|
36
|
+
// 30 minutes
|
|
34
37
|
};
|
|
35
38
|
async function recognize(input, languageCode, timing, options) {
|
|
36
39
|
const opts = { ...defaultOptions, ...options };
|
|
@@ -61,8 +64,16 @@ async function recognize(input, languageCode, timing, options) {
|
|
|
61
64
|
if (opts.apiKey) {
|
|
62
65
|
headers["Authorization"] = `Bearer ${opts.apiKey}`;
|
|
63
66
|
}
|
|
64
|
-
const
|
|
65
|
-
|
|
67
|
+
const response = await timing.timeAsync(
|
|
68
|
+
"upload",
|
|
69
|
+
async () => fetch(url, {
|
|
70
|
+
method: "POST",
|
|
71
|
+
body: form,
|
|
72
|
+
headers,
|
|
73
|
+
dispatcher: (0, import_fetch.createTimeoutAgent)(opts.timeout)
|
|
74
|
+
// this is necessary because `tsc` from `/web` will cry and shit its pants
|
|
75
|
+
})
|
|
76
|
+
);
|
|
66
77
|
if (!response.ok) {
|
|
67
78
|
const text = await response.text();
|
|
68
79
|
throw new Error(`Whisper server error: ${response.status} ${text}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { X as InputPreference, J as RecognitionResult, K as WhisperServerOptions, M as inputPreference, N as recognize } from '../AudioFormat-
|
|
1
|
+
export { X as InputPreference, J as RecognitionResult, K as WhisperServerOptions, M as inputPreference, N as recognize } from '../AudioFormat-CKxAQAj2.cjs';
|
|
2
2
|
import '../utilities/Timeline.cjs';
|
|
3
3
|
import '../utilities/Timing.cjs';
|
|
4
4
|
import 'node:fs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { X as InputPreference, J as RecognitionResult, K as WhisperServerOptions, M as inputPreference, N as recognize } from '../AudioFormat
|
|
1
|
+
export { X as InputPreference, J as RecognitionResult, K as WhisperServerOptions, M as inputPreference, N as recognize } from '../AudioFormat-BJuNZJlT.js';
|
|
2
2
|
import '../utilities/Timeline.js';
|
|
3
3
|
import '../utilities/Timing.js';
|
|
4
4
|
import 'node:fs';
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
prepareWavForService,
|
|
8
8
|
toFilePath
|
|
9
9
|
} from "../audio/index.js";
|
|
10
|
+
import { createTimeoutAgent } from "../fetch.js";
|
|
10
11
|
import {
|
|
11
12
|
calculateWhisperSplits,
|
|
12
13
|
countProcessorBoundaries,
|
|
@@ -17,7 +18,9 @@ const inputPreference = "file";
|
|
|
17
18
|
const defaultOptions = {
|
|
18
19
|
baseURL: "http://localhost:8080",
|
|
19
20
|
inferencePath: "/audio/transcriptions",
|
|
20
|
-
temperature: 0
|
|
21
|
+
temperature: 0,
|
|
22
|
+
timeout: 30 * 60 * 1e3
|
|
23
|
+
// 30 minutes
|
|
21
24
|
};
|
|
22
25
|
async function recognize(input, languageCode, timing, options) {
|
|
23
26
|
const opts = { ...defaultOptions, ...options };
|
|
@@ -48,8 +51,16 @@ async function recognize(input, languageCode, timing, options) {
|
|
|
48
51
|
if (opts.apiKey) {
|
|
49
52
|
headers["Authorization"] = `Bearer ${opts.apiKey}`;
|
|
50
53
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
54
|
+
const response = await timing.timeAsync(
|
|
55
|
+
"upload",
|
|
56
|
+
async () => fetch(url, {
|
|
57
|
+
method: "POST",
|
|
58
|
+
body: form,
|
|
59
|
+
headers,
|
|
60
|
+
dispatcher: createTimeoutAgent(opts.timeout)
|
|
61
|
+
// this is necessary because `tsc` from `/web` will cry and shit its pants
|
|
62
|
+
})
|
|
63
|
+
);
|
|
53
64
|
if (!response.ok) {
|
|
54
65
|
const text = await response.text();
|
|
55
66
|
throw new Error(`Whisper server error: ${response.status} ${text}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storyteller-platform/ghost-story",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "An easy-to-use speech toolset. Fork of the original echogarden project.",
|
|
5
5
|
"author": "Thomas F. K. Jorna",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"microsoft-cognitiveservices-speech-sdk": "~1.44.0",
|
|
77
77
|
"openai": "~4.103.0",
|
|
78
78
|
"tar": "^7.4.3",
|
|
79
|
+
"undici": "7.14.0",
|
|
79
80
|
"zod": "^3.25.0"
|
|
80
81
|
},
|
|
81
82
|
"devDependencies": {
|