@storyteller-platform/ghost-story 0.0.1

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.
Files changed (135) hide show
  1. package/LICENSE.md +611 -0
  2. package/README.md +18 -0
  3. package/dist/api/APIOptions.cjs +16 -0
  4. package/dist/api/APIOptions.d.cts +18 -0
  5. package/dist/api/APIOptions.d.ts +18 -0
  6. package/dist/api/APIOptions.js +0 -0
  7. package/dist/api/Recognition.cjs +263 -0
  8. package/dist/api/Recognition.d.cts +77 -0
  9. package/dist/api/Recognition.d.ts +77 -0
  10. package/dist/api/Recognition.js +233 -0
  11. package/dist/api/VoiceActivityDetection.cjs +77 -0
  12. package/dist/api/VoiceActivityDetection.d.cts +24 -0
  13. package/dist/api/VoiceActivityDetection.d.ts +24 -0
  14. package/dist/api/VoiceActivityDetection.js +43 -0
  15. package/dist/audio/AudioConverter.cjs +331 -0
  16. package/dist/audio/AudioConverter.d.cts +53 -0
  17. package/dist/audio/AudioConverter.d.ts +53 -0
  18. package/dist/audio/AudioConverter.js +310 -0
  19. package/dist/audio/AudioFormat.cjs +151 -0
  20. package/dist/audio/AudioFormat.d.cts +25 -0
  21. package/dist/audio/AudioFormat.d.ts +25 -0
  22. package/dist/audio/AudioFormat.js +123 -0
  23. package/dist/audio/AudioSource.cjs +119 -0
  24. package/dist/audio/AudioSource.d.cts +33 -0
  25. package/dist/audio/AudioSource.d.ts +33 -0
  26. package/dist/audio/AudioSource.js +88 -0
  27. package/dist/audio/index.cjs +74 -0
  28. package/dist/audio/index.d.cts +6 -0
  29. package/dist/audio/index.d.ts +6 -0
  30. package/dist/audio/index.js +54 -0
  31. package/dist/cli/bin.cjs +277 -0
  32. package/dist/cli/bin.d.cts +1 -0
  33. package/dist/cli/bin.d.ts +1 -0
  34. package/dist/cli/bin.js +275 -0
  35. package/dist/cli/config.cjs +347 -0
  36. package/dist/cli/config.d.cts +33 -0
  37. package/dist/cli/config.d.ts +33 -0
  38. package/dist/cli/config.js +285 -0
  39. package/dist/cli/install.cjs +334 -0
  40. package/dist/cli/install.d.cts +62 -0
  41. package/dist/cli/install.d.ts +62 -0
  42. package/dist/cli/install.js +316 -0
  43. package/dist/cli/whisper-server.cjs +172 -0
  44. package/dist/cli/whisper-server.d.cts +24 -0
  45. package/dist/cli/whisper-server.d.ts +24 -0
  46. package/dist/cli/whisper-server.js +152 -0
  47. package/dist/config.cjs +60 -0
  48. package/dist/config.d.cts +12 -0
  49. package/dist/config.d.ts +12 -0
  50. package/dist/config.js +32 -0
  51. package/dist/convert.cjs +88 -0
  52. package/dist/convert.d.cts +12 -0
  53. package/dist/convert.d.ts +12 -0
  54. package/dist/convert.js +63 -0
  55. package/dist/encodings/Ascii.cjs +75 -0
  56. package/dist/encodings/Ascii.d.cts +13 -0
  57. package/dist/encodings/Ascii.d.ts +13 -0
  58. package/dist/encodings/Ascii.js +48 -0
  59. package/dist/encodings/Base64.cjs +155 -0
  60. package/dist/encodings/Base64.d.cts +5 -0
  61. package/dist/encodings/Base64.d.ts +5 -0
  62. package/dist/encodings/Base64.js +129 -0
  63. package/dist/encodings/TextEncodingsCommon.cjs +16 -0
  64. package/dist/encodings/TextEncodingsCommon.d.cts +6 -0
  65. package/dist/encodings/TextEncodingsCommon.d.ts +6 -0
  66. package/dist/encodings/TextEncodingsCommon.js +0 -0
  67. package/dist/index.cjs +153 -0
  68. package/dist/index.d.cts +15 -0
  69. package/dist/index.d.ts +15 -0
  70. package/dist/index.js +140 -0
  71. package/dist/recognition/AmazonTranscribeSTT.cjs +188 -0
  72. package/dist/recognition/AmazonTranscribeSTT.d.cts +21 -0
  73. package/dist/recognition/AmazonTranscribeSTT.d.ts +21 -0
  74. package/dist/recognition/AmazonTranscribeSTT.js +160 -0
  75. package/dist/recognition/AzureCognitiveServicesSTT.cjs +124 -0
  76. package/dist/recognition/AzureCognitiveServicesSTT.d.cts +21 -0
  77. package/dist/recognition/AzureCognitiveServicesSTT.d.ts +21 -0
  78. package/dist/recognition/AzureCognitiveServicesSTT.js +95 -0
  79. package/dist/recognition/DeepgramSTT.cjs +172 -0
  80. package/dist/recognition/DeepgramSTT.d.cts +23 -0
  81. package/dist/recognition/DeepgramSTT.d.ts +23 -0
  82. package/dist/recognition/DeepgramSTT.js +153 -0
  83. package/dist/recognition/GoogleCloudSTT.cjs +125 -0
  84. package/dist/recognition/GoogleCloudSTT.d.cts +35 -0
  85. package/dist/recognition/GoogleCloudSTT.d.ts +35 -0
  86. package/dist/recognition/GoogleCloudSTT.js +107 -0
  87. package/dist/recognition/OpenAICloudSTT.cjs +180 -0
  88. package/dist/recognition/OpenAICloudSTT.d.cts +29 -0
  89. package/dist/recognition/OpenAICloudSTT.d.ts +29 -0
  90. package/dist/recognition/OpenAICloudSTT.js +150 -0
  91. package/dist/recognition/WhisperCppSTT.cjs +296 -0
  92. package/dist/recognition/WhisperCppSTT.d.cts +40 -0
  93. package/dist/recognition/WhisperCppSTT.d.ts +40 -0
  94. package/dist/recognition/WhisperCppSTT.js +275 -0
  95. package/dist/recognition/WhisperServerSTT.cjs +119 -0
  96. package/dist/recognition/WhisperServerSTT.d.cts +24 -0
  97. package/dist/recognition/WhisperServerSTT.d.ts +24 -0
  98. package/dist/recognition/WhisperServerSTT.js +105 -0
  99. package/dist/utilities/FileSystem.cjs +54 -0
  100. package/dist/utilities/FileSystem.d.cts +3 -0
  101. package/dist/utilities/FileSystem.d.ts +3 -0
  102. package/dist/utilities/FileSystem.js +20 -0
  103. package/dist/utilities/Locale.cjs +46 -0
  104. package/dist/utilities/Locale.d.cts +9 -0
  105. package/dist/utilities/Locale.d.ts +9 -0
  106. package/dist/utilities/Locale.js +20 -0
  107. package/dist/utilities/ObjectUtilities.cjs +41 -0
  108. package/dist/utilities/ObjectUtilities.d.cts +3 -0
  109. package/dist/utilities/ObjectUtilities.d.ts +3 -0
  110. package/dist/utilities/ObjectUtilities.js +7 -0
  111. package/dist/utilities/Timeline.cjs +120 -0
  112. package/dist/utilities/Timeline.d.cts +23 -0
  113. package/dist/utilities/Timeline.d.ts +23 -0
  114. package/dist/utilities/Timeline.js +94 -0
  115. package/dist/utilities/Timing.cjs +287 -0
  116. package/dist/utilities/Timing.d.cts +64 -0
  117. package/dist/utilities/Timing.d.ts +64 -0
  118. package/dist/utilities/Timing.js +256 -0
  119. package/dist/utilities/WhisperTimeline.cjs +344 -0
  120. package/dist/utilities/WhisperTimeline.d.cts +86 -0
  121. package/dist/utilities/WhisperTimeline.d.ts +86 -0
  122. package/dist/utilities/WhisperTimeline.js +313 -0
  123. package/dist/vad/ActiveGate.cjs +357 -0
  124. package/dist/vad/ActiveGate.d.cts +53 -0
  125. package/dist/vad/ActiveGate.d.ts +53 -0
  126. package/dist/vad/ActiveGate.js +329 -0
  127. package/dist/vad/ActiveGateOg.cjs +1366 -0
  128. package/dist/vad/ActiveGateOg.d.cts +33 -0
  129. package/dist/vad/ActiveGateOg.d.ts +33 -0
  130. package/dist/vad/ActiveGateOg.js +1341 -0
  131. package/dist/vad/Silero.cjs +174 -0
  132. package/dist/vad/Silero.d.cts +25 -0
  133. package/dist/vad/Silero.d.ts +25 -0
  134. package/dist/vad/Silero.js +153 -0
  135. package/package.json +125 -0
@@ -0,0 +1,155 @@
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 Base64_exports = {};
20
+ __export(Base64_exports, {
21
+ defaultBase64CharCodeMap: () => defaultBase64CharCodeMap,
22
+ encodeBase64: () => encodeBase64,
23
+ encodeBase64AsAsciiBuffer: () => encodeBase64AsAsciiBuffer
24
+ });
25
+ module.exports = __toCommonJS(Base64_exports);
26
+ var import_Ascii = require("./Ascii.cjs");
27
+ function encodeBase64(inputBytes, paddingCharacter = "=", charCodeMap) {
28
+ const asciiBuffer = encodeBase64AsAsciiBuffer(
29
+ inputBytes,
30
+ void 0,
31
+ paddingCharacter,
32
+ charCodeMap
33
+ );
34
+ return (0, import_Ascii.decodeAscii)(asciiBuffer);
35
+ }
36
+ function encodeBase64AsAsciiBuffer(inputBytes, asciiBuffer, paddingCharacter = "=", charCodeMap) {
37
+ if (inputBytes.length === 0) {
38
+ return new Uint8Array(0);
39
+ }
40
+ let paddingCharCode;
41
+ if (paddingCharacter.length !== 1) {
42
+ throw new Error(`A padding character can only be a single character`);
43
+ } else {
44
+ paddingCharCode = paddingCharacter.charCodeAt(0);
45
+ }
46
+ if (!charCodeMap) {
47
+ charCodeMap = defaultBase64CharCodeMap;
48
+ }
49
+ let charCodes;
50
+ if (asciiBuffer) {
51
+ charCodes = asciiBuffer;
52
+ } else {
53
+ charCodes = new Uint8Array(Math.floor(inputBytes.length * 4 / 3 + 4));
54
+ }
55
+ const inputBytesLength = inputBytes.length;
56
+ let writeOffset = 0;
57
+ let readOffset = 0;
58
+ while (readOffset <= inputBytesLength - 3) {
59
+ const uint24 = inputBytes[readOffset++] << 16 | inputBytes[readOffset++] << 8 | inputBytes[readOffset++];
60
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 18 & 63];
61
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 12 & 63];
62
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 6 & 63];
63
+ charCodes[writeOffset++] = charCodeMap[uint24 & 63];
64
+ }
65
+ if (readOffset === inputBytesLength - 2) {
66
+ const uint24 = inputBytes[readOffset++] << 16 | inputBytes[readOffset++] << 8;
67
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 18 & 63];
68
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 12 & 63];
69
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 6 & 63];
70
+ if (paddingCharCode >= 0) {
71
+ charCodes[writeOffset++] = paddingCharCode;
72
+ }
73
+ } else if (readOffset === inputBytesLength - 1) {
74
+ const uint24 = inputBytes[readOffset++] << 16;
75
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 18 & 63];
76
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 12 & 63];
77
+ if (paddingCharCode >= 0) {
78
+ charCodes[writeOffset++] = paddingCharCode;
79
+ charCodes[writeOffset++] = paddingCharCode;
80
+ }
81
+ }
82
+ return charCodes.subarray(0, writeOffset);
83
+ }
84
+ const defaultBase64CharCodeMap = new Uint8Array([
85
+ 65,
86
+ 66,
87
+ 67,
88
+ 68,
89
+ 69,
90
+ 70,
91
+ 71,
92
+ 72,
93
+ 73,
94
+ 74,
95
+ 75,
96
+ 76,
97
+ 77,
98
+ 78,
99
+ 79,
100
+ 80,
101
+ 81,
102
+ 82,
103
+ 83,
104
+ 84,
105
+ 85,
106
+ 86,
107
+ 87,
108
+ 88,
109
+ 89,
110
+ 90,
111
+ 97,
112
+ 98,
113
+ 99,
114
+ 100,
115
+ 101,
116
+ 102,
117
+ 103,
118
+ 104,
119
+ 105,
120
+ 106,
121
+ 107,
122
+ 108,
123
+ 109,
124
+ 110,
125
+ 111,
126
+ 112,
127
+ 113,
128
+ 114,
129
+ 115,
130
+ 116,
131
+ 117,
132
+ 118,
133
+ 119,
134
+ 120,
135
+ 121,
136
+ 122,
137
+ 48,
138
+ 49,
139
+ 50,
140
+ 51,
141
+ 52,
142
+ 53,
143
+ 54,
144
+ 55,
145
+ 56,
146
+ 57,
147
+ 43,
148
+ 47
149
+ ]);
150
+ // Annotate the CommonJS export names for ESM import in node:
151
+ 0 && (module.exports = {
152
+ defaultBase64CharCodeMap,
153
+ encodeBase64,
154
+ encodeBase64AsAsciiBuffer
155
+ });
@@ -0,0 +1,5 @@
1
+ declare function encodeBase64(inputBytes: Uint8Array, paddingCharacter?: string | undefined, charCodeMap?: Uint8Array): string;
2
+ declare function encodeBase64AsAsciiBuffer(inputBytes: Uint8Array, asciiBuffer?: Uint8Array, paddingCharacter?: string | undefined, charCodeMap?: Uint8Array): Uint8Array;
3
+ declare const defaultBase64CharCodeMap: Uint8Array;
4
+
5
+ export { defaultBase64CharCodeMap, encodeBase64, encodeBase64AsAsciiBuffer };
@@ -0,0 +1,5 @@
1
+ declare function encodeBase64(inputBytes: Uint8Array, paddingCharacter?: string | undefined, charCodeMap?: Uint8Array): string;
2
+ declare function encodeBase64AsAsciiBuffer(inputBytes: Uint8Array, asciiBuffer?: Uint8Array, paddingCharacter?: string | undefined, charCodeMap?: Uint8Array): Uint8Array;
3
+ declare const defaultBase64CharCodeMap: Uint8Array;
4
+
5
+ export { defaultBase64CharCodeMap, encodeBase64, encodeBase64AsAsciiBuffer };
@@ -0,0 +1,129 @@
1
+ import { decodeAscii } from "./Ascii.js";
2
+ function encodeBase64(inputBytes, paddingCharacter = "=", charCodeMap) {
3
+ const asciiBuffer = encodeBase64AsAsciiBuffer(
4
+ inputBytes,
5
+ void 0,
6
+ paddingCharacter,
7
+ charCodeMap
8
+ );
9
+ return decodeAscii(asciiBuffer);
10
+ }
11
+ function encodeBase64AsAsciiBuffer(inputBytes, asciiBuffer, paddingCharacter = "=", charCodeMap) {
12
+ if (inputBytes.length === 0) {
13
+ return new Uint8Array(0);
14
+ }
15
+ let paddingCharCode;
16
+ if (paddingCharacter.length !== 1) {
17
+ throw new Error(`A padding character can only be a single character`);
18
+ } else {
19
+ paddingCharCode = paddingCharacter.charCodeAt(0);
20
+ }
21
+ if (!charCodeMap) {
22
+ charCodeMap = defaultBase64CharCodeMap;
23
+ }
24
+ let charCodes;
25
+ if (asciiBuffer) {
26
+ charCodes = asciiBuffer;
27
+ } else {
28
+ charCodes = new Uint8Array(Math.floor(inputBytes.length * 4 / 3 + 4));
29
+ }
30
+ const inputBytesLength = inputBytes.length;
31
+ let writeOffset = 0;
32
+ let readOffset = 0;
33
+ while (readOffset <= inputBytesLength - 3) {
34
+ const uint24 = inputBytes[readOffset++] << 16 | inputBytes[readOffset++] << 8 | inputBytes[readOffset++];
35
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 18 & 63];
36
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 12 & 63];
37
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 6 & 63];
38
+ charCodes[writeOffset++] = charCodeMap[uint24 & 63];
39
+ }
40
+ if (readOffset === inputBytesLength - 2) {
41
+ const uint24 = inputBytes[readOffset++] << 16 | inputBytes[readOffset++] << 8;
42
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 18 & 63];
43
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 12 & 63];
44
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 6 & 63];
45
+ if (paddingCharCode >= 0) {
46
+ charCodes[writeOffset++] = paddingCharCode;
47
+ }
48
+ } else if (readOffset === inputBytesLength - 1) {
49
+ const uint24 = inputBytes[readOffset++] << 16;
50
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 18 & 63];
51
+ charCodes[writeOffset++] = charCodeMap[uint24 >>> 12 & 63];
52
+ if (paddingCharCode >= 0) {
53
+ charCodes[writeOffset++] = paddingCharCode;
54
+ charCodes[writeOffset++] = paddingCharCode;
55
+ }
56
+ }
57
+ return charCodes.subarray(0, writeOffset);
58
+ }
59
+ const defaultBase64CharCodeMap = new Uint8Array([
60
+ 65,
61
+ 66,
62
+ 67,
63
+ 68,
64
+ 69,
65
+ 70,
66
+ 71,
67
+ 72,
68
+ 73,
69
+ 74,
70
+ 75,
71
+ 76,
72
+ 77,
73
+ 78,
74
+ 79,
75
+ 80,
76
+ 81,
77
+ 82,
78
+ 83,
79
+ 84,
80
+ 85,
81
+ 86,
82
+ 87,
83
+ 88,
84
+ 89,
85
+ 90,
86
+ 97,
87
+ 98,
88
+ 99,
89
+ 100,
90
+ 101,
91
+ 102,
92
+ 103,
93
+ 104,
94
+ 105,
95
+ 106,
96
+ 107,
97
+ 108,
98
+ 109,
99
+ 110,
100
+ 111,
101
+ 112,
102
+ 113,
103
+ 114,
104
+ 115,
105
+ 116,
106
+ 117,
107
+ 118,
108
+ 119,
109
+ 120,
110
+ 121,
111
+ 122,
112
+ 48,
113
+ 49,
114
+ 50,
115
+ 51,
116
+ 52,
117
+ 53,
118
+ 54,
119
+ 55,
120
+ 56,
121
+ 57,
122
+ 43,
123
+ 47
124
+ ]);
125
+ export {
126
+ defaultBase64CharCodeMap,
127
+ encodeBase64,
128
+ encodeBase64AsAsciiBuffer
129
+ };
@@ -0,0 +1,16 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var TextEncodingsCommon_exports = {};
16
+ module.exports = __toCommonJS(TextEncodingsCommon_exports);
@@ -0,0 +1,6 @@
1
+ interface EncodeIntoResult {
2
+ read: number;
3
+ written: number;
4
+ }
5
+
6
+ export type { EncodeIntoResult };
@@ -0,0 +1,6 @@
1
+ interface EncodeIntoResult {
2
+ read: number;
3
+ written: number;
4
+ }
5
+
6
+ export type { EncodeIntoResult };
File without changes
package/dist/index.cjs ADDED
@@ -0,0 +1,153 @@
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 index_exports = {};
20
+ __export(index_exports, {
21
+ BUILD_VARIANTS: () => import_config.BUILD_VARIANTS,
22
+ Timing: () => import_Timing.Timing,
23
+ TimingAggregator: () => import_Timing.TimingAggregator,
24
+ WHISPER_CPP_VERSION: () => import_config.WHISPER_CPP_VERSION,
25
+ WHISPER_MODELS: () => import_config.WHISPER_MODELS,
26
+ audioSourceFromBuffer: () => import_audio.audioSourceFromBuffer,
27
+ audioSourceFromFile: () => import_audio.audioSourceFromFile,
28
+ audioSourceFromStream: () => import_audio.audioSourceFromStream,
29
+ convertToBuffer: () => import_audio.convertToBuffer,
30
+ convertToFile: () => import_audio.convertToFile,
31
+ createAggregator: () => import_Timing.createAggregator,
32
+ createStreamingConversion: () => import_audio.createStreamingConversion,
33
+ createTiming: () => import_Timing.createTiming,
34
+ detectPlatform: () => import_config.detectPlatform,
35
+ detectVoiceActivity: () => import_Silero.detectVoiceActivity,
36
+ ensureVadInstalled: () => import_Silero.ensureVadInstalled,
37
+ ensureWhisperInstalled: () => import_install.ensureWhisperInstalled,
38
+ formatDuration: () => import_Timing.formatDuration,
39
+ formatFromExtension: () => import_audio.formatFromExtension,
40
+ formatPercentage: () => import_Timing.formatPercentage,
41
+ formatSingleReport: () => import_Timing.formatSingleReport,
42
+ formatToExtension: () => import_audio.formatToExtension,
43
+ getConfig: () => import_config2.getConfig,
44
+ getConversionMode: () => import_config2.getConversionMode,
45
+ getFormat: () => import_audio.getFormat,
46
+ getFormatInfo: () => import_audio.getFormatInfo,
47
+ getInstallDir: () => import_config.getInstallDir,
48
+ getModelDir: () => import_config.getModelDir,
49
+ getModelPath: () => import_config.getModelPath,
50
+ getTargetFormat: () => import_audio.getTargetFormat,
51
+ getVadModelPath: () => import_config.getVadModelPath,
52
+ getWhisperExecutablePath: () => import_config.getWhisperExecutablePath,
53
+ getWhisperServerExecutablePath: () => import_config.getWhisperServerExecutablePath,
54
+ installBinary: () => import_install.installBinary,
55
+ installModel: () => import_install.installModel,
56
+ installVadModel: () => import_install.installVadModel,
57
+ isAudioSource: () => import_audio.isAudioSource,
58
+ isTimingEnabled: () => import_config2.isTimingEnabled,
59
+ isValidModel: () => import_config.isValidModel,
60
+ needsConversion: () => import_audio.needsConversion,
61
+ normalizeToAudioSource: () => import_audio.normalizeToAudioSource,
62
+ openaiInputPreference: () => import_OpenAICloudSTT.inputPreference,
63
+ prepareForService: () => import_audio.prepareForService,
64
+ prepareWavForService: () => import_audio.prepareWavForService,
65
+ printSingleReport: () => import_Timing.printSingleReport,
66
+ recognitionEngines: () => import_Recognition.recognitionEngines,
67
+ recognize: () => import_Recognition.recognize,
68
+ recognizeOpenAI: () => import_OpenAICloudSTT.recognize,
69
+ recognizeWhisperCpp: () => import_WhisperCppSTT.recognize,
70
+ recognizeWhisperServer: () => import_WhisperServerSTT.recognize,
71
+ segmentsToTimeline: () => import_Silero.segmentsToTimeline,
72
+ serviceCapabilities: () => import_audio.serviceCapabilities,
73
+ setConversionMode: () => import_config2.setConversionMode,
74
+ setTimingEnabled: () => import_config2.setTimingEnabled,
75
+ toBuffer: () => import_audio.toBuffer,
76
+ toFilePath: () => import_audio.toFilePath,
77
+ toReadStream: () => import_audio.toReadStream,
78
+ whisperCppInputPreference: () => import_WhisperCppSTT.inputPreference,
79
+ whisperServerInputPreference: () => import_WhisperServerSTT.inputPreference
80
+ });
81
+ module.exports = __toCommonJS(index_exports);
82
+ var import_Recognition = require("./api/Recognition.cjs");
83
+ var import_audio = require("./audio/index.cjs");
84
+ var import_config = require("./cli/config.cjs");
85
+ var import_install = require("./cli/install.cjs");
86
+ var import_config2 = require("./config.cjs");
87
+ var import_OpenAICloudSTT = require("./recognition/OpenAICloudSTT.cjs");
88
+ var import_WhisperCppSTT = require("./recognition/WhisperCppSTT.cjs");
89
+ var import_WhisperServerSTT = require("./recognition/WhisperServerSTT.cjs");
90
+ var import_Timing = require("./utilities/Timing.cjs");
91
+ var import_Silero = require("./vad/Silero.cjs");
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ BUILD_VARIANTS,
95
+ Timing,
96
+ TimingAggregator,
97
+ WHISPER_CPP_VERSION,
98
+ WHISPER_MODELS,
99
+ audioSourceFromBuffer,
100
+ audioSourceFromFile,
101
+ audioSourceFromStream,
102
+ convertToBuffer,
103
+ convertToFile,
104
+ createAggregator,
105
+ createStreamingConversion,
106
+ createTiming,
107
+ detectPlatform,
108
+ detectVoiceActivity,
109
+ ensureVadInstalled,
110
+ ensureWhisperInstalled,
111
+ formatDuration,
112
+ formatFromExtension,
113
+ formatPercentage,
114
+ formatSingleReport,
115
+ formatToExtension,
116
+ getConfig,
117
+ getConversionMode,
118
+ getFormat,
119
+ getFormatInfo,
120
+ getInstallDir,
121
+ getModelDir,
122
+ getModelPath,
123
+ getTargetFormat,
124
+ getVadModelPath,
125
+ getWhisperExecutablePath,
126
+ getWhisperServerExecutablePath,
127
+ installBinary,
128
+ installModel,
129
+ installVadModel,
130
+ isAudioSource,
131
+ isTimingEnabled,
132
+ isValidModel,
133
+ needsConversion,
134
+ normalizeToAudioSource,
135
+ openaiInputPreference,
136
+ prepareForService,
137
+ prepareWavForService,
138
+ printSingleReport,
139
+ recognitionEngines,
140
+ recognize,
141
+ recognizeOpenAI,
142
+ recognizeWhisperCpp,
143
+ recognizeWhisperServer,
144
+ segmentsToTimeline,
145
+ serviceCapabilities,
146
+ setConversionMode,
147
+ setTimingEnabled,
148
+ toBuffer,
149
+ toFilePath,
150
+ toReadStream,
151
+ whisperCppInputPreference,
152
+ whisperServerInputPreference
153
+ });
@@ -0,0 +1,15 @@
1
+ export { AudioInput, RecognitionEngine, RecognitionOptions, RecognitionResult, recognitionEngines, recognize } from './api/Recognition.cjs';
2
+ export { AudioFormat, AudioFormatInfo, ServiceCapabilities, formatFromExtension, formatToExtension, getTargetFormat, needsConversion, serviceCapabilities } from './audio/AudioFormat.cjs';
3
+ export { AudioSource, AudioSourceFromBuffer, AudioSourceFromFile, AudioSourceFromStream, RawAudioInput, audioSourceFromBuffer, audioSourceFromFile, audioSourceFromStream, getFormat, getFormatInfo, isAudioSource, normalizeToAudioSource, toBuffer, toFilePath, toReadStream } from './audio/AudioSource.cjs';
4
+ export { ConversionOptions, PreparedAudio, convertToBuffer, convertToFile, createStreamingConversion, prepareForService, prepareWavForService } from './audio/AudioConverter.cjs';
5
+ export { BUILD_VARIANTS, BuildVariant, WHISPER_CPP_VERSION, WHISPER_MODELS, WhisperModel, detectPlatform, getInstallDir, getModelDir, getModelPath, getVadModelPath, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel } from './cli/config.cjs';
6
+ export { InstallBinaryOptions, InstallModelOptions, InstallVadModelOptions, ensureWhisperInstalled, installBinary, installModel, installVadModel } from './cli/install.cjs';
7
+ export { ConversionMode, getConfig, getConversionMode, isTimingEnabled, setConversionMode, setTimingEnabled } from './config.cjs';
8
+ export { OpenAICloudSTTOptions, RecognitionResult as OpenAIResult, inputPreference as openaiInputPreference, recognize as recognizeOpenAI } from './recognition/OpenAICloudSTT.cjs';
9
+ export { Language, WhisperCppModelId, WhisperCppOptions, RecognitionResult as WhisperCppResult, recognize as recognizeWhisperCpp, inputPreference as whisperCppInputPreference } from './recognition/WhisperCppSTT.cjs';
10
+ export { WhisperServerOptions, RecognitionResult as WhisperServerResult, recognize as recognizeWhisperServer, inputPreference as whisperServerInputPreference } from './recognition/WhisperServerSTT.cjs';
11
+ export { Timeline, TimelineEntry, TimelineEntryType } from './utilities/Timeline.cjs';
12
+ export { AggregatedStats, PhaseTiming, Timing, TimingAggregator, TimingSpan, TimingSummary, createAggregator, createTiming, formatDuration, formatPercentage, formatSingleReport, printSingleReport } from './utilities/Timing.cjs';
13
+ export { SileroOptions, VadSegment, detectVoiceActivity, ensureVadInstalled, segmentsToTimeline } from './vad/Silero.cjs';
14
+ import 'node:fs';
15
+ import 'node:stream';
@@ -0,0 +1,15 @@
1
+ export { AudioInput, RecognitionEngine, RecognitionOptions, RecognitionResult, recognitionEngines, recognize } from './api/Recognition.js';
2
+ export { AudioFormat, AudioFormatInfo, ServiceCapabilities, formatFromExtension, formatToExtension, getTargetFormat, needsConversion, serviceCapabilities } from './audio/AudioFormat.js';
3
+ export { AudioSource, AudioSourceFromBuffer, AudioSourceFromFile, AudioSourceFromStream, RawAudioInput, audioSourceFromBuffer, audioSourceFromFile, audioSourceFromStream, getFormat, getFormatInfo, isAudioSource, normalizeToAudioSource, toBuffer, toFilePath, toReadStream } from './audio/AudioSource.js';
4
+ export { ConversionOptions, PreparedAudio, convertToBuffer, convertToFile, createStreamingConversion, prepareForService, prepareWavForService } from './audio/AudioConverter.js';
5
+ export { BUILD_VARIANTS, BuildVariant, WHISPER_CPP_VERSION, WHISPER_MODELS, WhisperModel, detectPlatform, getInstallDir, getModelDir, getModelPath, getVadModelPath, getWhisperExecutablePath, getWhisperServerExecutablePath, isValidModel } from './cli/config.js';
6
+ export { InstallBinaryOptions, InstallModelOptions, InstallVadModelOptions, ensureWhisperInstalled, installBinary, installModel, installVadModel } from './cli/install.js';
7
+ export { ConversionMode, getConfig, getConversionMode, isTimingEnabled, setConversionMode, setTimingEnabled } from './config.js';
8
+ export { OpenAICloudSTTOptions, RecognitionResult as OpenAIResult, inputPreference as openaiInputPreference, recognize as recognizeOpenAI } from './recognition/OpenAICloudSTT.js';
9
+ export { Language, WhisperCppModelId, WhisperCppOptions, RecognitionResult as WhisperCppResult, recognize as recognizeWhisperCpp, inputPreference as whisperCppInputPreference } from './recognition/WhisperCppSTT.js';
10
+ export { WhisperServerOptions, RecognitionResult as WhisperServerResult, recognize as recognizeWhisperServer, inputPreference as whisperServerInputPreference } from './recognition/WhisperServerSTT.js';
11
+ export { Timeline, TimelineEntry, TimelineEntryType } from './utilities/Timeline.js';
12
+ export { AggregatedStats, PhaseTiming, Timing, TimingAggregator, TimingSpan, TimingSummary, createAggregator, createTiming, formatDuration, formatPercentage, formatSingleReport, printSingleReport } from './utilities/Timing.js';
13
+ export { SileroOptions, VadSegment, detectVoiceActivity, ensureVadInstalled, segmentsToTimeline } from './vad/Silero.js';
14
+ import 'node:fs';
15
+ import 'node:stream';
package/dist/index.js ADDED
@@ -0,0 +1,140 @@
1
+ import {
2
+ recognitionEngines,
3
+ recognize
4
+ } from "./api/Recognition.js";
5
+ import {
6
+ audioSourceFromBuffer,
7
+ audioSourceFromFile,
8
+ audioSourceFromStream,
9
+ convertToBuffer,
10
+ convertToFile,
11
+ createStreamingConversion,
12
+ formatFromExtension,
13
+ formatToExtension,
14
+ getFormat,
15
+ getFormatInfo,
16
+ getTargetFormat,
17
+ isAudioSource,
18
+ needsConversion,
19
+ normalizeToAudioSource,
20
+ prepareForService,
21
+ prepareWavForService,
22
+ serviceCapabilities,
23
+ toBuffer,
24
+ toFilePath,
25
+ toReadStream
26
+ } from "./audio/index.js";
27
+ import {
28
+ BUILD_VARIANTS,
29
+ WHISPER_CPP_VERSION,
30
+ WHISPER_MODELS,
31
+ detectPlatform,
32
+ getInstallDir,
33
+ getModelDir,
34
+ getModelPath,
35
+ getVadModelPath,
36
+ getWhisperExecutablePath,
37
+ getWhisperServerExecutablePath,
38
+ isValidModel
39
+ } from "./cli/config.js";
40
+ import {
41
+ ensureWhisperInstalled,
42
+ installBinary,
43
+ installModel,
44
+ installVadModel
45
+ } from "./cli/install.js";
46
+ import {
47
+ getConfig,
48
+ getConversionMode,
49
+ isTimingEnabled,
50
+ setConversionMode,
51
+ setTimingEnabled
52
+ } from "./config.js";
53
+ import {
54
+ inputPreference,
55
+ recognize as recognize2
56
+ } from "./recognition/OpenAICloudSTT.js";
57
+ import {
58
+ inputPreference as inputPreference2,
59
+ recognize as recognize3
60
+ } from "./recognition/WhisperCppSTT.js";
61
+ import {
62
+ inputPreference as inputPreference3,
63
+ recognize as recognize4
64
+ } from "./recognition/WhisperServerSTT.js";
65
+ import {
66
+ Timing,
67
+ TimingAggregator,
68
+ createAggregator,
69
+ createTiming,
70
+ formatDuration,
71
+ formatPercentage,
72
+ formatSingleReport,
73
+ printSingleReport
74
+ } from "./utilities/Timing.js";
75
+ import {
76
+ detectVoiceActivity,
77
+ ensureVadInstalled,
78
+ segmentsToTimeline
79
+ } from "./vad/Silero.js";
80
+ export {
81
+ BUILD_VARIANTS,
82
+ Timing,
83
+ TimingAggregator,
84
+ WHISPER_CPP_VERSION,
85
+ WHISPER_MODELS,
86
+ audioSourceFromBuffer,
87
+ audioSourceFromFile,
88
+ audioSourceFromStream,
89
+ convertToBuffer,
90
+ convertToFile,
91
+ createAggregator,
92
+ createStreamingConversion,
93
+ createTiming,
94
+ detectPlatform,
95
+ detectVoiceActivity,
96
+ ensureVadInstalled,
97
+ ensureWhisperInstalled,
98
+ formatDuration,
99
+ formatFromExtension,
100
+ formatPercentage,
101
+ formatSingleReport,
102
+ formatToExtension,
103
+ getConfig,
104
+ getConversionMode,
105
+ getFormat,
106
+ getFormatInfo,
107
+ getInstallDir,
108
+ getModelDir,
109
+ getModelPath,
110
+ getTargetFormat,
111
+ getVadModelPath,
112
+ getWhisperExecutablePath,
113
+ getWhisperServerExecutablePath,
114
+ installBinary,
115
+ installModel,
116
+ installVadModel,
117
+ isAudioSource,
118
+ isTimingEnabled,
119
+ isValidModel,
120
+ needsConversion,
121
+ normalizeToAudioSource,
122
+ inputPreference as openaiInputPreference,
123
+ prepareForService,
124
+ prepareWavForService,
125
+ printSingleReport,
126
+ recognitionEngines,
127
+ recognize,
128
+ recognize2 as recognizeOpenAI,
129
+ recognize3 as recognizeWhisperCpp,
130
+ recognize4 as recognizeWhisperServer,
131
+ segmentsToTimeline,
132
+ serviceCapabilities,
133
+ setConversionMode,
134
+ setTimingEnabled,
135
+ toBuffer,
136
+ toFilePath,
137
+ toReadStream,
138
+ inputPreference2 as whisperCppInputPreference,
139
+ inputPreference3 as whisperServerInputPreference
140
+ };