@mastra/voice-speechify 0.14.0 → 0.14.1-alpha.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.
- package/LICENSE.md +6 -4
- package/README.md +8 -46
- package/dist/_types/@internal_voice/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +19 -220
- package/dist/_types/@internal_voice/dist/_types/@internal_core/dist/base/index.d.ts +27 -27
- package/dist/_types/@internal_voice/dist/_types/@internal_core/dist/index-Biaf3BmX.d.ts +319 -0
- package/dist/_types/@internal_voice/dist/_types/@internal_core/dist/request-context/index.d.ts +167 -105
- package/dist/_types/@internal_voice/dist/_types/@internal_core/dist/types/index.d.ts +4 -2
- package/dist/_types/@internal_voice/dist/voice/composite-voice.d.ts +1 -1
- package/dist/docs/SKILL.md +4 -4
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/{reference-voice-speechify.md → integrations-voice-speechify.md} +2 -0
- package/dist/docs/references/{docs-voice-overview.md → reference-voice-overview.md} +88 -132
- package/dist/index.cjs +1160 -1060
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1159 -1058
- package/dist/index.js.map +1 -1
- package/dist/voices.d.ts +2 -2
- package/dist/voices.d.ts.map +1 -1
- package/package.json +13 -13
- package/CHANGELOG.md +0 -1866
- package/dist/_types/@internal_voice/dist/_types/@internal_core/dist/logger/index.d.ts +0 -217
package/dist/index.js
CHANGED
|
@@ -1,1071 +1,1172 @@
|
|
|
1
|
-
import { Readable } from
|
|
2
|
-
import { Speechify } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { Readable } from "stream";
|
|
2
|
+
import { Speechify } from "@speechify/api-sdk";
|
|
3
|
+
//#region ../../packages/_internal-core/dist/logger/index.js
|
|
4
|
+
/**
|
|
5
|
+
* Export a tracked exception through the adapter sink, mirroring the
|
|
6
|
+
* DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`
|
|
7
|
+
* when present on a MastraError-like value). Never throws into the caller.
|
|
8
|
+
*/
|
|
9
|
+
function exportTrackedException(ctx, error, metadata) {
|
|
10
|
+
if (!ctx?.options.export) return;
|
|
11
|
+
try {
|
|
12
|
+
const mastraError = error;
|
|
13
|
+
ctx.getLogSink()?.error(error.message, {
|
|
14
|
+
...mastraError.id !== void 0 ? { errorId: mastraError.id } : {},
|
|
15
|
+
...mastraError.domain !== void 0 ? { domain: mastraError.domain } : {},
|
|
16
|
+
...mastraError.category !== void 0 ? { category: mastraError.category } : {},
|
|
17
|
+
...mastraError.details !== void 0 ? { details: mastraError.details } : {},
|
|
18
|
+
...error.cause instanceof Error ? { cause: error.cause.message } : {},
|
|
19
|
+
...metadata
|
|
20
|
+
});
|
|
21
|
+
} catch {}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Adapt IMastraLogger's variadic args into the structured `data` payload of
|
|
25
|
+
* an exported log record. Extracts the first plain object as data,
|
|
26
|
+
* serializes an Error arg, and collects remaining primitives under `args`
|
|
27
|
+
* so the derived record preserves all context from the native call.
|
|
28
|
+
*/
|
|
29
|
+
function buildLogRecordData(args) {
|
|
30
|
+
const objectData = args.find((arg) => arg !== null && typeof arg === "object" && !Array.isArray(arg) && !(arg instanceof Error));
|
|
31
|
+
const errorArg = args.find((arg) => arg instanceof Error);
|
|
32
|
+
const extraArgs = args.filter((arg) => arg !== objectData && arg !== errorArg);
|
|
33
|
+
if (!objectData && !errorArg && extraArgs.length === 0) return void 0;
|
|
34
|
+
return {
|
|
35
|
+
...objectData ?? {},
|
|
36
|
+
...errorArg ? { error: {
|
|
37
|
+
name: errorArg.name,
|
|
38
|
+
message: errorArg.message,
|
|
39
|
+
stack: errorArg.stack
|
|
40
|
+
} } : {},
|
|
41
|
+
...extraArgs.length > 0 ? { args: extraArgs } : {}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const RegisteredLogger = {
|
|
45
|
+
AGENT: "AGENT",
|
|
46
|
+
OBSERVABILITY: "OBSERVABILITY",
|
|
47
|
+
AUTH: "AUTH",
|
|
48
|
+
BROWSER: "BROWSER",
|
|
49
|
+
NETWORK: "NETWORK",
|
|
50
|
+
WORKFLOW: "WORKFLOW",
|
|
51
|
+
LLM: "LLM",
|
|
52
|
+
TTS: "TTS",
|
|
53
|
+
VOICE: "VOICE",
|
|
54
|
+
VECTOR: "VECTOR",
|
|
55
|
+
BUNDLER: "BUNDLER",
|
|
56
|
+
DEPLOYER: "DEPLOYER",
|
|
57
|
+
MEMORY: "MEMORY",
|
|
58
|
+
STORAGE: "STORAGE",
|
|
59
|
+
EMBEDDINGS: "EMBEDDINGS",
|
|
60
|
+
MCP_SERVER: "MCP_SERVER",
|
|
61
|
+
SERVER_CACHE: "SERVER_CACHE",
|
|
62
|
+
SERVER: "SERVER",
|
|
63
|
+
WORKSPACE: "WORKSPACE",
|
|
64
|
+
CHANNEL: "CHANNEL"
|
|
65
|
+
};
|
|
66
|
+
const LogLevel = {
|
|
67
|
+
DEBUG: "debug",
|
|
68
|
+
INFO: "info",
|
|
69
|
+
WARN: "warn",
|
|
70
|
+
ERROR: "error",
|
|
71
|
+
NONE: "silent"
|
|
72
|
+
};
|
|
14
73
|
var MastraLogger = class {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
name;
|
|
75
|
+
level;
|
|
76
|
+
transports;
|
|
77
|
+
constructor(options = {}) {
|
|
78
|
+
this.name = options.name || "Mastra";
|
|
79
|
+
this.level = options.level || LogLevel.ERROR;
|
|
80
|
+
this.transports = new Map(Object.entries(options.transports || {}));
|
|
81
|
+
}
|
|
82
|
+
getTransports() {
|
|
83
|
+
return this.transports;
|
|
84
|
+
}
|
|
85
|
+
trackException(_error, _metadata) {}
|
|
86
|
+
async listLogs(transportId, params) {
|
|
87
|
+
if (!transportId || !this.transports.has(transportId)) return {
|
|
88
|
+
logs: [],
|
|
89
|
+
total: 0,
|
|
90
|
+
page: params?.page ?? 1,
|
|
91
|
+
perPage: params?.perPage ?? 100,
|
|
92
|
+
hasMore: false
|
|
93
|
+
};
|
|
94
|
+
return this.transports.get(transportId).listLogs?.(params) ?? {
|
|
95
|
+
logs: [],
|
|
96
|
+
total: 0,
|
|
97
|
+
page: params?.page ?? 1,
|
|
98
|
+
perPage: params?.perPage ?? 100,
|
|
99
|
+
hasMore: false
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
async listLogsByRunId({ transportId, runId, fromDate, toDate, logLevel, filters, page, perPage }) {
|
|
103
|
+
if (!transportId || !this.transports.has(transportId) || !runId) return {
|
|
104
|
+
logs: [],
|
|
105
|
+
total: 0,
|
|
106
|
+
page: page ?? 1,
|
|
107
|
+
perPage: perPage ?? 100,
|
|
108
|
+
hasMore: false
|
|
109
|
+
};
|
|
110
|
+
return this.transports.get(transportId).listLogsByRunId?.({
|
|
111
|
+
runId,
|
|
112
|
+
fromDate,
|
|
113
|
+
toDate,
|
|
114
|
+
logLevel,
|
|
115
|
+
filters,
|
|
116
|
+
page,
|
|
117
|
+
perPage
|
|
118
|
+
}) ?? {
|
|
119
|
+
logs: [],
|
|
120
|
+
total: 0,
|
|
121
|
+
page: page ?? 1,
|
|
122
|
+
perPage: perPage ?? 100,
|
|
123
|
+
hasMore: false
|
|
124
|
+
};
|
|
125
|
+
}
|
|
61
126
|
};
|
|
62
|
-
var ConsoleLogger = class
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
127
|
+
var ConsoleLogger = class ConsoleLogger extends MastraLogger {
|
|
128
|
+
component;
|
|
129
|
+
filter;
|
|
130
|
+
#adapterContext;
|
|
131
|
+
constructor(options = {}) {
|
|
132
|
+
super(options);
|
|
133
|
+
this.component = options.component;
|
|
134
|
+
this.filter = options.filter;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Adapter hook (see `AdaptableLogger`): enables native trace correlation
|
|
138
|
+
* (trace_id/span_id appended to console output) and observability export
|
|
139
|
+
* derived from the same record. Called by Mastra during setup.
|
|
140
|
+
*/
|
|
141
|
+
__attachObservability(ctx) {
|
|
142
|
+
this.#adapterContext = ctx;
|
|
143
|
+
}
|
|
144
|
+
child(componentOrBindings) {
|
|
145
|
+
const component = typeof componentOrBindings === "string" ? componentOrBindings : componentOrBindings?.component ?? this.component;
|
|
146
|
+
const child = new ConsoleLogger({
|
|
147
|
+
name: this.name,
|
|
148
|
+
level: this.level,
|
|
149
|
+
component,
|
|
150
|
+
filter: this.filter
|
|
151
|
+
});
|
|
152
|
+
if (this.#adapterContext) child.__attachObservability(this.#adapterContext);
|
|
153
|
+
return child;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Native-record correlation: when a span is active, append the trace
|
|
157
|
+
* fields object to the console args so every destination sees them.
|
|
158
|
+
*/
|
|
159
|
+
#correlate(args) {
|
|
160
|
+
const ctx = this.#adapterContext;
|
|
161
|
+
if (!ctx?.options.correlation) return args;
|
|
162
|
+
try {
|
|
163
|
+
const fields = ctx.resolveTraceFields();
|
|
164
|
+
return fields ? [...args, fields] : args;
|
|
165
|
+
} catch {
|
|
166
|
+
return args;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Export the record derived from the same native call to observability.
|
|
171
|
+
* Mirrors DualLogger semantics: export is independent of the console
|
|
172
|
+
* level filter, and never throws into the caller.
|
|
173
|
+
*/
|
|
174
|
+
#export(level, message, args) {
|
|
175
|
+
const ctx = this.#adapterContext;
|
|
176
|
+
if (!ctx?.options.export) return;
|
|
177
|
+
try {
|
|
178
|
+
ctx.getLogSink()?.[level](message, buildLogRecordData(args));
|
|
179
|
+
} catch {}
|
|
180
|
+
}
|
|
181
|
+
shouldLog(level, message, args) {
|
|
182
|
+
if (!this.filter) return true;
|
|
183
|
+
try {
|
|
184
|
+
return this.filter({
|
|
185
|
+
component: this.component,
|
|
186
|
+
level,
|
|
187
|
+
message,
|
|
188
|
+
args
|
|
189
|
+
});
|
|
190
|
+
} catch (e) {
|
|
191
|
+
console.error(`[Logger] Filter error for component=${this.component} level=${level}:`, e);
|
|
192
|
+
return true;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
prefix() {
|
|
196
|
+
return this.component ? `[${this.component}] ` : "";
|
|
197
|
+
}
|
|
198
|
+
debug(message, ...args) {
|
|
199
|
+
if (this.level === LogLevel.DEBUG && this.shouldLog(LogLevel.DEBUG, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));
|
|
200
|
+
this.#export("debug", message, args);
|
|
201
|
+
}
|
|
202
|
+
info(message, ...args) {
|
|
203
|
+
if ((this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.INFO, message, args)) console.info(`${this.prefix()}${message}`, ...this.#correlate(args));
|
|
204
|
+
this.#export("info", message, args);
|
|
205
|
+
}
|
|
206
|
+
warn(message, ...args) {
|
|
207
|
+
if ((this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.WARN, message, args)) console.warn(`${this.prefix()}${message}`, ...this.#correlate(args));
|
|
208
|
+
this.#export("warn", message, args);
|
|
209
|
+
}
|
|
210
|
+
error(message, ...args) {
|
|
211
|
+
if ((this.level === LogLevel.ERROR || this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.ERROR, message, args)) console.error(`${this.prefix()}${message}`, ...this.#correlate(args));
|
|
212
|
+
this.#export("error", message, args);
|
|
213
|
+
}
|
|
214
|
+
trackException(error, metadata) {
|
|
215
|
+
exportTrackedException(this.#adapterContext, error, metadata);
|
|
216
|
+
}
|
|
217
|
+
async listLogs(_transportId, _params) {
|
|
218
|
+
return {
|
|
219
|
+
logs: [],
|
|
220
|
+
total: 0,
|
|
221
|
+
page: _params?.page ?? 1,
|
|
222
|
+
perPage: _params?.perPage ?? 100,
|
|
223
|
+
hasMore: false
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
async listLogsByRunId(_args) {
|
|
227
|
+
return {
|
|
228
|
+
logs: [],
|
|
229
|
+
total: 0,
|
|
230
|
+
page: _args.page ?? 1,
|
|
231
|
+
perPage: _args.perPage ?? 100,
|
|
232
|
+
hasMore: false
|
|
233
|
+
};
|
|
234
|
+
}
|
|
117
235
|
};
|
|
118
|
-
|
|
119
|
-
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region ../../packages/_internal-core/dist/base/index.js
|
|
120
238
|
var MastraBase = class {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
*/
|
|
153
|
-
__setLogger(logger) {
|
|
154
|
-
this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
|
|
155
|
-
}
|
|
239
|
+
component = RegisteredLogger.LLM;
|
|
240
|
+
logger;
|
|
241
|
+
name;
|
|
242
|
+
#rawConfig;
|
|
243
|
+
constructor({ component, name, rawConfig }) {
|
|
244
|
+
this.component = component || RegisteredLogger.LLM;
|
|
245
|
+
this.name = name;
|
|
246
|
+
this.#rawConfig = rawConfig;
|
|
247
|
+
this.logger = new ConsoleLogger({ name: `${this.component} - ${this.name}` });
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Returns the raw storage configuration this primitive was created from,
|
|
251
|
+
* or undefined if it was created from code.
|
|
252
|
+
*/
|
|
253
|
+
toRawConfig() {
|
|
254
|
+
return this.#rawConfig;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Sets the raw storage configuration for this primitive.
|
|
258
|
+
* @internal
|
|
259
|
+
*/
|
|
260
|
+
__setRawConfig(rawConfig) {
|
|
261
|
+
this.#rawConfig = rawConfig;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Set the logger for the agent
|
|
265
|
+
* @param logger
|
|
266
|
+
*/
|
|
267
|
+
__setLogger(logger) {
|
|
268
|
+
this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
|
|
269
|
+
}
|
|
156
270
|
};
|
|
157
|
-
|
|
158
|
-
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region ../../packages/_internals/voice/dist/aisdk-C_K-VCwq.js
|
|
159
273
|
var MastraVoice = class extends MastraBase {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
return Promise.resolve({ enabled: false });
|
|
262
|
-
}
|
|
274
|
+
listeningModel;
|
|
275
|
+
speechModel;
|
|
276
|
+
speaker;
|
|
277
|
+
realtimeConfig;
|
|
278
|
+
constructor({ listeningModel, speechModel, speaker, realtimeConfig, name } = {}) {
|
|
279
|
+
super({
|
|
280
|
+
component: "VOICE",
|
|
281
|
+
name
|
|
282
|
+
});
|
|
283
|
+
this.listeningModel = listeningModel;
|
|
284
|
+
this.speechModel = speechModel;
|
|
285
|
+
this.speaker = speaker;
|
|
286
|
+
this.realtimeConfig = realtimeConfig;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Custom serialization for tracing/observability spans.
|
|
290
|
+
* Excludes `apiKey` from listeningModel / speechModel / realtimeConfig
|
|
291
|
+
* and any provider-specific state held by subclasses. Subclasses that
|
|
292
|
+
* need to expose additional non-sensitive fields can override.
|
|
293
|
+
*/
|
|
294
|
+
serializeForSpan() {
|
|
295
|
+
return {
|
|
296
|
+
component: "VOICE",
|
|
297
|
+
name: this.name,
|
|
298
|
+
speaker: this.speaker,
|
|
299
|
+
listeningModel: this.listeningModel ? { name: this.listeningModel.name } : void 0,
|
|
300
|
+
speechModel: this.speechModel ? { name: this.speechModel.name } : void 0,
|
|
301
|
+
realtimeModel: this.realtimeConfig?.model
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
updateConfig(_options) {
|
|
305
|
+
this.logger.debug("updateConfig not implemented by this voice provider");
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Initializes a WebSocket or WebRTC connection for real-time communication
|
|
309
|
+
* @returns Promise that resolves when the connection is established
|
|
310
|
+
*/
|
|
311
|
+
async connect(_options) {
|
|
312
|
+
this.logger.debug("connect not implemented by this voice provider");
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Relay audio data to the voice provider for real-time processing
|
|
316
|
+
* @param audioData Audio data to relay
|
|
317
|
+
*/
|
|
318
|
+
async send(_audioData) {
|
|
319
|
+
this.logger.debug("relay not implemented by this voice provider");
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Trigger voice providers to respond
|
|
323
|
+
*/
|
|
324
|
+
async answer(_options) {
|
|
325
|
+
this.logger.debug("answer not implemented by this voice provider");
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Equip the voice provider with instructions
|
|
329
|
+
* @param instructions Instructions to add
|
|
330
|
+
*/
|
|
331
|
+
addInstructions(_instructions) {}
|
|
332
|
+
/**
|
|
333
|
+
* Equip the voice provider with tools
|
|
334
|
+
* @param tools Array of tools to add
|
|
335
|
+
*/
|
|
336
|
+
addTools(_tools) {}
|
|
337
|
+
/**
|
|
338
|
+
* Disconnect from the WebSocket or WebRTC connection
|
|
339
|
+
*/
|
|
340
|
+
close() {
|
|
341
|
+
this.logger.debug("close not implemented by this voice provider");
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Register an event listener
|
|
345
|
+
* @param event Event name (e.g., 'speaking', 'writing', 'error')
|
|
346
|
+
* @param callback Callback function that receives event data
|
|
347
|
+
*/
|
|
348
|
+
on(_event, _callback) {
|
|
349
|
+
this.logger.debug("on not implemented by this voice provider");
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Remove an event listener
|
|
353
|
+
* @param event Event name (e.g., 'speaking', 'writing', 'error')
|
|
354
|
+
* @param callback Callback function to remove
|
|
355
|
+
*/
|
|
356
|
+
off(_event, _callback) {
|
|
357
|
+
this.logger.debug("off not implemented by this voice provider");
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Get available speakers/voices
|
|
361
|
+
* @returns Array of available voice IDs and their metadata
|
|
362
|
+
*/
|
|
363
|
+
getSpeakers() {
|
|
364
|
+
this.logger.debug("getSpeakers not implemented by this voice provider");
|
|
365
|
+
return Promise.resolve([]);
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Get available speakers/voices
|
|
369
|
+
* @returns Array of available voice IDs and their metadata
|
|
370
|
+
*/
|
|
371
|
+
getListener() {
|
|
372
|
+
this.logger.debug("getListener not implemented by this voice provider");
|
|
373
|
+
return Promise.resolve({ enabled: false });
|
|
374
|
+
}
|
|
263
375
|
};
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/voices.ts
|
|
378
|
+
/**
|
|
379
|
+
* Curated voices served by the Simba 3 generation models (`simba-3.0` and
|
|
380
|
+
* `simba-3.2`). The classic catalog voices in `SPEECHIFY_VOICES` are not
|
|
381
|
+
* served by those models and return an error. `simba-3.2` additionally
|
|
382
|
+
* accepts cloned voices manually approved by Speechify.
|
|
383
|
+
*/
|
|
384
|
+
const SIMBA_3_VOICES = [
|
|
385
|
+
"beatrice_32",
|
|
386
|
+
"dominic_32",
|
|
387
|
+
"edmund_32",
|
|
388
|
+
"geffen_32",
|
|
389
|
+
"harper_32",
|
|
390
|
+
"hugh_32",
|
|
391
|
+
"imogen_32",
|
|
392
|
+
"wyatt_32"
|
|
275
393
|
];
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
394
|
+
const SPEECHIFY_VOICES = [
|
|
395
|
+
"henry",
|
|
396
|
+
"bwyneth",
|
|
397
|
+
"carly",
|
|
398
|
+
"kristy",
|
|
399
|
+
"oliver",
|
|
400
|
+
"tasha",
|
|
401
|
+
"joe",
|
|
402
|
+
"lisa",
|
|
403
|
+
"george",
|
|
404
|
+
"emily",
|
|
405
|
+
"rob",
|
|
406
|
+
"russell",
|
|
407
|
+
"benjamin",
|
|
408
|
+
"michael",
|
|
409
|
+
"kim",
|
|
410
|
+
"ankit",
|
|
411
|
+
"arun",
|
|
412
|
+
"carol",
|
|
413
|
+
"helen",
|
|
414
|
+
"julie",
|
|
415
|
+
"linda",
|
|
416
|
+
"mark",
|
|
417
|
+
"nick",
|
|
418
|
+
"elijah",
|
|
419
|
+
"beverly",
|
|
420
|
+
"collin",
|
|
421
|
+
"erin",
|
|
422
|
+
"jack",
|
|
423
|
+
"jesse",
|
|
424
|
+
"ken",
|
|
425
|
+
"lindsey",
|
|
426
|
+
"monica",
|
|
427
|
+
"phil",
|
|
428
|
+
"ron",
|
|
429
|
+
"stacy",
|
|
430
|
+
"archie",
|
|
431
|
+
"evelyn",
|
|
432
|
+
"freddie",
|
|
433
|
+
"harper",
|
|
434
|
+
"jacob",
|
|
435
|
+
"james",
|
|
436
|
+
"mason",
|
|
437
|
+
"victoria",
|
|
438
|
+
"christina",
|
|
439
|
+
"douglas",
|
|
440
|
+
"lauren",
|
|
441
|
+
"patricia",
|
|
442
|
+
"jennifer",
|
|
443
|
+
"robert",
|
|
444
|
+
"peter",
|
|
445
|
+
"jeremy",
|
|
446
|
+
"barbara",
|
|
447
|
+
"susan",
|
|
448
|
+
"charles",
|
|
449
|
+
"harold",
|
|
450
|
+
"sarah",
|
|
451
|
+
"karen",
|
|
452
|
+
"anthony",
|
|
453
|
+
"donald",
|
|
454
|
+
"paul",
|
|
455
|
+
"steven",
|
|
456
|
+
"andrew",
|
|
457
|
+
"kenneth",
|
|
458
|
+
"joshua",
|
|
459
|
+
"betty",
|
|
460
|
+
"margaret",
|
|
461
|
+
"kyle",
|
|
462
|
+
"edward",
|
|
463
|
+
"ronald",
|
|
464
|
+
"timothy",
|
|
465
|
+
"sandra",
|
|
466
|
+
"dorothy",
|
|
467
|
+
"jeffrey",
|
|
468
|
+
"kimberly",
|
|
469
|
+
"donna",
|
|
470
|
+
"walter",
|
|
471
|
+
"megan",
|
|
472
|
+
"richard",
|
|
473
|
+
"amanda",
|
|
474
|
+
"melissa",
|
|
475
|
+
"deborah",
|
|
476
|
+
"gary",
|
|
477
|
+
"rebecca",
|
|
478
|
+
"sharon",
|
|
479
|
+
"cynthia",
|
|
480
|
+
"kathleen",
|
|
481
|
+
"joan",
|
|
482
|
+
"shirley",
|
|
483
|
+
"angela",
|
|
484
|
+
"anna",
|
|
485
|
+
"brenda",
|
|
486
|
+
"larry",
|
|
487
|
+
"keith",
|
|
488
|
+
"scott",
|
|
489
|
+
"pamela",
|
|
490
|
+
"samuel",
|
|
491
|
+
"gregory",
|
|
492
|
+
"samantha",
|
|
493
|
+
"katherine",
|
|
494
|
+
"christine",
|
|
495
|
+
"frank",
|
|
496
|
+
"alexander",
|
|
497
|
+
"raymond",
|
|
498
|
+
"debra",
|
|
499
|
+
"patrick",
|
|
500
|
+
"catherine",
|
|
501
|
+
"carolyn",
|
|
502
|
+
"janet",
|
|
503
|
+
"ruth",
|
|
504
|
+
"zachary",
|
|
505
|
+
"heather",
|
|
506
|
+
"diane",
|
|
507
|
+
"dennis",
|
|
508
|
+
"jerry",
|
|
509
|
+
"tyler",
|
|
510
|
+
"aaron",
|
|
511
|
+
"virginia",
|
|
512
|
+
"joyce",
|
|
513
|
+
"judith",
|
|
514
|
+
"kelly",
|
|
515
|
+
"nathan",
|
|
516
|
+
"terry",
|
|
517
|
+
"carl",
|
|
518
|
+
"gerald",
|
|
519
|
+
"jaqueline",
|
|
520
|
+
"cheryl",
|
|
521
|
+
"christian",
|
|
522
|
+
"rohit",
|
|
523
|
+
"gloria",
|
|
524
|
+
"arthur",
|
|
525
|
+
"austin",
|
|
526
|
+
"sean",
|
|
527
|
+
"martha",
|
|
528
|
+
"randy",
|
|
529
|
+
"ralph",
|
|
530
|
+
"roy",
|
|
531
|
+
"alan",
|
|
532
|
+
"logan",
|
|
533
|
+
"willie",
|
|
534
|
+
"kathryn",
|
|
535
|
+
"frances",
|
|
536
|
+
"madison",
|
|
537
|
+
"bruce",
|
|
538
|
+
"billy",
|
|
539
|
+
"jordan",
|
|
540
|
+
"bryan",
|
|
541
|
+
"dylan",
|
|
542
|
+
"vincent",
|
|
543
|
+
"eugene",
|
|
544
|
+
"janice",
|
|
545
|
+
"jean",
|
|
546
|
+
"abigail",
|
|
547
|
+
"alice",
|
|
548
|
+
"bobby",
|
|
549
|
+
"julia",
|
|
550
|
+
"johnny",
|
|
551
|
+
"judy",
|
|
552
|
+
"bradley",
|
|
553
|
+
"hunter",
|
|
554
|
+
"dale",
|
|
555
|
+
"howard",
|
|
556
|
+
"fred",
|
|
557
|
+
"danielle",
|
|
558
|
+
"marilyn",
|
|
559
|
+
"blake",
|
|
560
|
+
"doris",
|
|
561
|
+
"denise",
|
|
562
|
+
"issac",
|
|
563
|
+
"theresa",
|
|
564
|
+
"natalie",
|
|
565
|
+
"aiden",
|
|
566
|
+
"brittany",
|
|
567
|
+
"charlotte",
|
|
568
|
+
"marie",
|
|
569
|
+
"kayla",
|
|
570
|
+
"alexis",
|
|
571
|
+
"lori",
|
|
572
|
+
"landon",
|
|
573
|
+
"tiffany",
|
|
574
|
+
"marcus",
|
|
575
|
+
"martin",
|
|
576
|
+
"curtis",
|
|
577
|
+
"kathy",
|
|
578
|
+
"todd",
|
|
579
|
+
"leonard",
|
|
580
|
+
"calvin",
|
|
581
|
+
"rose",
|
|
582
|
+
"ava",
|
|
583
|
+
"bonnie",
|
|
584
|
+
"peggy",
|
|
585
|
+
"edwin",
|
|
586
|
+
"don",
|
|
587
|
+
"ruby",
|
|
588
|
+
"crystal",
|
|
589
|
+
"craig",
|
|
590
|
+
"norma",
|
|
591
|
+
"paula",
|
|
592
|
+
"annie",
|
|
593
|
+
"shawn",
|
|
594
|
+
"lillian",
|
|
595
|
+
"robin",
|
|
596
|
+
"evan",
|
|
597
|
+
"garrette",
|
|
598
|
+
"francis",
|
|
599
|
+
"danny",
|
|
600
|
+
"stanley",
|
|
601
|
+
"lucy",
|
|
602
|
+
"jeffery",
|
|
603
|
+
"herbert",
|
|
604
|
+
"lee",
|
|
605
|
+
"april",
|
|
606
|
+
"anne",
|
|
607
|
+
"tammy",
|
|
608
|
+
"trevor",
|
|
609
|
+
"eleanor",
|
|
610
|
+
"regina",
|
|
611
|
+
"carrie",
|
|
612
|
+
"leah",
|
|
613
|
+
"beth",
|
|
614
|
+
"cody",
|
|
615
|
+
"shane",
|
|
616
|
+
"dana",
|
|
617
|
+
"allison",
|
|
618
|
+
"dawn",
|
|
619
|
+
"julian",
|
|
620
|
+
"wendy",
|
|
621
|
+
"travis",
|
|
622
|
+
"florence",
|
|
623
|
+
"tracy",
|
|
624
|
+
"adrian",
|
|
625
|
+
"phillis",
|
|
626
|
+
"carole",
|
|
627
|
+
"mildred",
|
|
628
|
+
"cameron",
|
|
629
|
+
"chad",
|
|
630
|
+
"connie",
|
|
631
|
+
"gladys",
|
|
632
|
+
"arlene",
|
|
633
|
+
"jana",
|
|
634
|
+
"leona",
|
|
635
|
+
"miriam",
|
|
636
|
+
"lorrie",
|
|
637
|
+
"velma",
|
|
638
|
+
"eduardo",
|
|
639
|
+
"bennie",
|
|
640
|
+
"rene",
|
|
641
|
+
"ed",
|
|
642
|
+
"stuart",
|
|
643
|
+
"terrence",
|
|
644
|
+
"delbert",
|
|
645
|
+
"colin",
|
|
646
|
+
"susanne",
|
|
647
|
+
"hugo",
|
|
648
|
+
"ignacio",
|
|
649
|
+
"sheldon",
|
|
650
|
+
"josefina",
|
|
651
|
+
"corinne",
|
|
652
|
+
"lana",
|
|
653
|
+
"cherry",
|
|
654
|
+
"erick",
|
|
655
|
+
"frankie",
|
|
656
|
+
"stewart",
|
|
657
|
+
"claudette",
|
|
658
|
+
"doyle",
|
|
659
|
+
"darrel",
|
|
660
|
+
"janine",
|
|
661
|
+
"simone",
|
|
662
|
+
"casey",
|
|
663
|
+
"leta",
|
|
664
|
+
"rogelio",
|
|
665
|
+
"lorraine",
|
|
666
|
+
"terence",
|
|
667
|
+
"santiago",
|
|
668
|
+
"alonzo",
|
|
669
|
+
"benny",
|
|
670
|
+
"elisa",
|
|
671
|
+
"dee",
|
|
672
|
+
"bert",
|
|
673
|
+
"elbert",
|
|
674
|
+
"charmaine",
|
|
675
|
+
"roslyn",
|
|
676
|
+
"shelley",
|
|
677
|
+
"ramiro",
|
|
678
|
+
"noel",
|
|
679
|
+
"mercedes",
|
|
680
|
+
"christie",
|
|
681
|
+
"laurel",
|
|
682
|
+
"spencer",
|
|
683
|
+
"pat",
|
|
684
|
+
"dorthy",
|
|
685
|
+
"jeanie",
|
|
686
|
+
"clare",
|
|
687
|
+
"aileen",
|
|
688
|
+
"grady",
|
|
689
|
+
"deana",
|
|
690
|
+
"cornelius",
|
|
691
|
+
"cecelia",
|
|
692
|
+
"maryann",
|
|
693
|
+
"rolando",
|
|
694
|
+
"lamar",
|
|
695
|
+
"susana",
|
|
696
|
+
"katharine",
|
|
697
|
+
"clay",
|
|
698
|
+
"liza",
|
|
699
|
+
"jerri",
|
|
700
|
+
"rochelle",
|
|
701
|
+
"cathy",
|
|
702
|
+
"percy",
|
|
703
|
+
"dexter",
|
|
704
|
+
"maribel",
|
|
705
|
+
"rosemarie",
|
|
706
|
+
"bradford",
|
|
707
|
+
"kari",
|
|
708
|
+
"nikki",
|
|
709
|
+
"bernadette",
|
|
710
|
+
"eugenia",
|
|
711
|
+
"merie",
|
|
712
|
+
"darie",
|
|
713
|
+
"amon",
|
|
714
|
+
"moses",
|
|
715
|
+
"concetta",
|
|
716
|
+
"irvin",
|
|
717
|
+
"rodolfo",
|
|
718
|
+
"christi",
|
|
719
|
+
"roman",
|
|
720
|
+
"janie",
|
|
721
|
+
"marcy",
|
|
722
|
+
"lindy",
|
|
723
|
+
"tommie",
|
|
724
|
+
"darnell",
|
|
725
|
+
"randal",
|
|
726
|
+
"selena",
|
|
727
|
+
"shari",
|
|
728
|
+
"antoinette",
|
|
729
|
+
"timmy",
|
|
730
|
+
"darrin",
|
|
731
|
+
"margo",
|
|
732
|
+
"sherri",
|
|
733
|
+
"erika",
|
|
734
|
+
"robbie",
|
|
735
|
+
"marcella",
|
|
736
|
+
"lela",
|
|
737
|
+
"winston",
|
|
738
|
+
"jeannine",
|
|
739
|
+
"brendan",
|
|
740
|
+
"christa",
|
|
741
|
+
"deloris",
|
|
742
|
+
"toby",
|
|
743
|
+
"elva",
|
|
744
|
+
"van",
|
|
745
|
+
"abel",
|
|
746
|
+
"myron",
|
|
747
|
+
"gracie",
|
|
748
|
+
"gwen",
|
|
749
|
+
"melba",
|
|
750
|
+
"boyd",
|
|
751
|
+
"shawna",
|
|
752
|
+
"courtney",
|
|
753
|
+
"marlena",
|
|
754
|
+
"cathie",
|
|
755
|
+
"ramesh",
|
|
756
|
+
"rita",
|
|
757
|
+
"joel",
|
|
758
|
+
"derek",
|
|
759
|
+
"earl",
|
|
760
|
+
"brett",
|
|
761
|
+
"ellis",
|
|
762
|
+
"ian",
|
|
763
|
+
"oscar",
|
|
764
|
+
"edna",
|
|
765
|
+
"ethel",
|
|
766
|
+
"gene",
|
|
767
|
+
"shannon",
|
|
768
|
+
"sheila",
|
|
769
|
+
"dustin",
|
|
770
|
+
"ellen",
|
|
771
|
+
"hilda",
|
|
772
|
+
"ray",
|
|
773
|
+
"marjorie",
|
|
774
|
+
"sylvia",
|
|
775
|
+
"barry",
|
|
776
|
+
"melvin",
|
|
777
|
+
"thelma",
|
|
778
|
+
"cindy",
|
|
779
|
+
"miranda",
|
|
780
|
+
"bernard",
|
|
781
|
+
"carlton",
|
|
782
|
+
"juanita",
|
|
783
|
+
"darrell",
|
|
784
|
+
"erik",
|
|
785
|
+
"jeremiah",
|
|
786
|
+
"nicolas",
|
|
787
|
+
"gordon",
|
|
788
|
+
"violet",
|
|
789
|
+
"mona",
|
|
790
|
+
"glen",
|
|
791
|
+
"willis",
|
|
792
|
+
"harvey",
|
|
793
|
+
"rudolph",
|
|
794
|
+
"preston",
|
|
795
|
+
"cole",
|
|
796
|
+
"june",
|
|
797
|
+
"pauline",
|
|
798
|
+
"leo",
|
|
799
|
+
"earnest",
|
|
800
|
+
"devin",
|
|
801
|
+
"audrey",
|
|
802
|
+
"claire",
|
|
803
|
+
"vivian",
|
|
804
|
+
"goldie",
|
|
805
|
+
"tommy",
|
|
806
|
+
"allen",
|
|
807
|
+
"glenn",
|
|
808
|
+
"wilson",
|
|
809
|
+
"jill",
|
|
810
|
+
"loretta",
|
|
811
|
+
"mabel",
|
|
812
|
+
"marsha",
|
|
813
|
+
"lillie",
|
|
814
|
+
"minnie",
|
|
815
|
+
"essie",
|
|
816
|
+
"madge",
|
|
817
|
+
"viola",
|
|
818
|
+
"nellie",
|
|
819
|
+
"pearl",
|
|
820
|
+
"marvin",
|
|
821
|
+
"mae",
|
|
822
|
+
"levi",
|
|
823
|
+
"lucille",
|
|
824
|
+
"hazel",
|
|
825
|
+
"nathaniel",
|
|
826
|
+
"lydia",
|
|
827
|
+
"bertha",
|
|
828
|
+
"ursula",
|
|
829
|
+
"kay",
|
|
830
|
+
"sue",
|
|
831
|
+
"dean",
|
|
832
|
+
"verna",
|
|
833
|
+
"teri",
|
|
834
|
+
"edith",
|
|
835
|
+
"dan",
|
|
836
|
+
"lewis",
|
|
837
|
+
"harriett",
|
|
838
|
+
"clifford",
|
|
839
|
+
"genevieve",
|
|
840
|
+
"colleen",
|
|
841
|
+
"gilbert",
|
|
842
|
+
"patrice",
|
|
843
|
+
"jared",
|
|
844
|
+
"elaine",
|
|
845
|
+
"maureen",
|
|
846
|
+
"edmund",
|
|
847
|
+
"nina",
|
|
848
|
+
"georgia",
|
|
849
|
+
"garrett",
|
|
850
|
+
"renee",
|
|
851
|
+
"bessie",
|
|
852
|
+
"leslie",
|
|
853
|
+
"max",
|
|
854
|
+
"leon",
|
|
855
|
+
"fannie",
|
|
856
|
+
"lowell",
|
|
857
|
+
"veronica",
|
|
858
|
+
"vanessa",
|
|
859
|
+
"joy",
|
|
860
|
+
"jim",
|
|
861
|
+
"faith",
|
|
862
|
+
"valerie",
|
|
863
|
+
"wanda",
|
|
864
|
+
"steve",
|
|
865
|
+
"naomi",
|
|
866
|
+
"miles",
|
|
867
|
+
"marcia",
|
|
868
|
+
"brent",
|
|
869
|
+
"clinton",
|
|
870
|
+
"jon",
|
|
871
|
+
"marshall",
|
|
872
|
+
"roberta",
|
|
873
|
+
"alexandra",
|
|
874
|
+
"doreen",
|
|
875
|
+
"daisy",
|
|
876
|
+
"della",
|
|
877
|
+
"minerva",
|
|
878
|
+
"cedric",
|
|
879
|
+
"patsy",
|
|
880
|
+
"kerry",
|
|
881
|
+
"lena",
|
|
882
|
+
"gregg",
|
|
883
|
+
"lois",
|
|
884
|
+
"kurt",
|
|
885
|
+
"lorene",
|
|
886
|
+
"susie",
|
|
887
|
+
"nora",
|
|
888
|
+
"lucinda",
|
|
889
|
+
"mathew",
|
|
890
|
+
"flora",
|
|
891
|
+
"rosie",
|
|
892
|
+
"sherman",
|
|
893
|
+
"lance",
|
|
894
|
+
"darcy",
|
|
895
|
+
"mattie",
|
|
896
|
+
"madeline",
|
|
897
|
+
"sylvester",
|
|
898
|
+
"cory",
|
|
899
|
+
"anita",
|
|
900
|
+
"allan",
|
|
901
|
+
"lula",
|
|
902
|
+
"nell",
|
|
903
|
+
"priscilla",
|
|
904
|
+
"kristin",
|
|
905
|
+
"rosemary",
|
|
906
|
+
"roosevelt",
|
|
907
|
+
"geneva",
|
|
908
|
+
"jeannette",
|
|
909
|
+
"bob",
|
|
910
|
+
"esther",
|
|
911
|
+
"michele",
|
|
912
|
+
"forrest",
|
|
913
|
+
"wilbert",
|
|
914
|
+
"cathleen",
|
|
915
|
+
"jaime",
|
|
916
|
+
"dwayne",
|
|
917
|
+
"inez",
|
|
918
|
+
"alberto",
|
|
919
|
+
"lynne",
|
|
920
|
+
"maxine",
|
|
921
|
+
"wilma",
|
|
922
|
+
"taylor",
|
|
923
|
+
"angelina",
|
|
924
|
+
"hope",
|
|
925
|
+
"margie",
|
|
926
|
+
"myrtle",
|
|
927
|
+
"misty",
|
|
928
|
+
"jimmie",
|
|
929
|
+
"eunice",
|
|
930
|
+
"everett",
|
|
931
|
+
"miracle",
|
|
932
|
+
"billie",
|
|
933
|
+
"leland",
|
|
934
|
+
"jackie",
|
|
935
|
+
"kristina",
|
|
936
|
+
"johnnie",
|
|
937
|
+
"isaac",
|
|
938
|
+
"bobbie",
|
|
939
|
+
"tonya",
|
|
940
|
+
"reba",
|
|
941
|
+
"kristine",
|
|
942
|
+
"amelia",
|
|
943
|
+
"cassandra",
|
|
944
|
+
"angie",
|
|
945
|
+
"maude",
|
|
946
|
+
"nichole",
|
|
947
|
+
"marguerite",
|
|
948
|
+
"justine",
|
|
949
|
+
"kelli",
|
|
950
|
+
"mandy",
|
|
951
|
+
"jeri",
|
|
952
|
+
"darla",
|
|
953
|
+
"shelia",
|
|
954
|
+
"jacquelin",
|
|
955
|
+
"cara",
|
|
956
|
+
"kellie",
|
|
957
|
+
"jolene",
|
|
958
|
+
"chelsea",
|
|
959
|
+
"autumn",
|
|
960
|
+
"glenda",
|
|
961
|
+
"lolita",
|
|
962
|
+
"jeanne",
|
|
963
|
+
"sherrie",
|
|
964
|
+
"toni",
|
|
965
|
+
"becky",
|
|
966
|
+
"jennie",
|
|
967
|
+
"jenna",
|
|
968
|
+
"leigh",
|
|
969
|
+
"cristina",
|
|
970
|
+
"blanche",
|
|
971
|
+
"clarissa",
|
|
972
|
+
"betsy",
|
|
973
|
+
"bridget",
|
|
974
|
+
"ginger",
|
|
975
|
+
"faye",
|
|
976
|
+
"candice",
|
|
977
|
+
"jaclyn",
|
|
978
|
+
"krista",
|
|
979
|
+
"marisa",
|
|
980
|
+
"gayle",
|
|
981
|
+
"meredith",
|
|
982
|
+
"angelica",
|
|
983
|
+
"rachael",
|
|
984
|
+
"candy",
|
|
985
|
+
"trisha",
|
|
986
|
+
"sandy",
|
|
987
|
+
"holly",
|
|
988
|
+
"alicia",
|
|
989
|
+
"melinda",
|
|
990
|
+
"geraldine",
|
|
991
|
+
"tara",
|
|
992
|
+
"isabel",
|
|
993
|
+
"adrienne",
|
|
994
|
+
"terra",
|
|
995
|
+
"rubye",
|
|
996
|
+
"antonia",
|
|
997
|
+
"guadalupe",
|
|
998
|
+
"cheri",
|
|
999
|
+
"janelle",
|
|
1000
|
+
"constance",
|
|
1001
|
+
"robyn",
|
|
1002
|
+
"jodi",
|
|
1003
|
+
"krystal",
|
|
1004
|
+
"rosalie",
|
|
1005
|
+
"deanna",
|
|
1006
|
+
"debbie",
|
|
1007
|
+
"josie",
|
|
1008
|
+
"ronda",
|
|
1009
|
+
"paulette",
|
|
1010
|
+
"belinda",
|
|
1011
|
+
"alton",
|
|
1012
|
+
"rudy",
|
|
1013
|
+
"kelvin",
|
|
1014
|
+
"damon",
|
|
1015
|
+
"johnathan",
|
|
1016
|
+
"cesar",
|
|
1017
|
+
"ira",
|
|
1018
|
+
"horace",
|
|
1019
|
+
"grant",
|
|
1020
|
+
"lionel",
|
|
1021
|
+
"wilbur",
|
|
1022
|
+
"jake",
|
|
1023
|
+
"jody",
|
|
1024
|
+
"rickey",
|
|
1025
|
+
"lester",
|
|
1026
|
+
"pablo",
|
|
1027
|
+
"neal",
|
|
1028
|
+
"mack",
|
|
1029
|
+
"orlando",
|
|
1030
|
+
"alfonso",
|
|
1031
|
+
"ernesto",
|
|
1032
|
+
"rex",
|
|
1033
|
+
"lynn",
|
|
1034
|
+
"matt",
|
|
1035
|
+
"lyle",
|
|
1036
|
+
"kristopher",
|
|
1037
|
+
"hubert",
|
|
1038
|
+
"kenny",
|
|
1039
|
+
"doug",
|
|
1040
|
+
"sammy",
|
|
1041
|
+
"homer",
|
|
1042
|
+
"wendell",
|
|
1043
|
+
"woodrow",
|
|
1044
|
+
"felipe",
|
|
1045
|
+
"garry",
|
|
1046
|
+
"pete",
|
|
1047
|
+
"marco",
|
|
1048
|
+
"rufus",
|
|
1049
|
+
"owen",
|
|
1050
|
+
"bryant",
|
|
1051
|
+
"abraham",
|
|
1052
|
+
"irving",
|
|
1053
|
+
"jermaine",
|
|
1054
|
+
"julius",
|
|
1055
|
+
"marty",
|
|
1056
|
+
"alejandro",
|
|
1057
|
+
"carmen",
|
|
1058
|
+
"carlos",
|
|
1059
|
+
"celia",
|
|
1060
|
+
"lucas",
|
|
1061
|
+
"luiza",
|
|
1062
|
+
"diogo",
|
|
1063
|
+
"agueda",
|
|
1064
|
+
"raphael",
|
|
1065
|
+
"elise",
|
|
1066
|
+
"frederick",
|
|
1067
|
+
"andra",
|
|
1068
|
+
"frederik",
|
|
1069
|
+
"freja",
|
|
1070
|
+
"daan",
|
|
1071
|
+
"lotte",
|
|
1072
|
+
"eino",
|
|
1073
|
+
"helmi",
|
|
1074
|
+
"jakob",
|
|
1075
|
+
"frida",
|
|
1076
|
+
"kostas",
|
|
1077
|
+
"eleni",
|
|
1078
|
+
"lazzaro",
|
|
1079
|
+
"alessia",
|
|
1080
|
+
"mart",
|
|
1081
|
+
"liis",
|
|
1082
|
+
"trinh",
|
|
1083
|
+
"thoa",
|
|
1084
|
+
"lesya",
|
|
1085
|
+
"taras",
|
|
1086
|
+
"mikhail",
|
|
1087
|
+
"olga",
|
|
1088
|
+
"axel",
|
|
1089
|
+
"ebba",
|
|
1090
|
+
"hemant",
|
|
1091
|
+
"priya",
|
|
1092
|
+
"aicha",
|
|
1093
|
+
"ismail",
|
|
1094
|
+
"moshe",
|
|
1095
|
+
"inbar",
|
|
1096
|
+
"gil",
|
|
1097
|
+
"lital",
|
|
1098
|
+
"yusuf",
|
|
1099
|
+
"elif",
|
|
1100
|
+
"dominika",
|
|
1101
|
+
"michal"
|
|
984
1102
|
];
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1103
|
+
//#endregion
|
|
1104
|
+
//#region src/index.ts
|
|
1105
|
+
const isSimba3Model = (model) => model === "simba-3.0" || model === "simba-3.2";
|
|
988
1106
|
var SpeechifyVoice = class extends MastraVoice {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
});
|
|
1051
|
-
nodeStream.on("end", () => {
|
|
1052
|
-
reader.releaseLock();
|
|
1053
|
-
});
|
|
1054
|
-
return nodeStream;
|
|
1055
|
-
}
|
|
1056
|
-
/**
|
|
1057
|
-
* Checks if listening capabilities are enabled.
|
|
1058
|
-
*
|
|
1059
|
-
* @returns {Promise<{ enabled: boolean }>}
|
|
1060
|
-
*/
|
|
1061
|
-
async getListener() {
|
|
1062
|
-
return { enabled: false };
|
|
1063
|
-
}
|
|
1064
|
-
async listen(_input, _options) {
|
|
1065
|
-
throw new Error("Speechify does not support speech recognition");
|
|
1066
|
-
}
|
|
1107
|
+
client;
|
|
1108
|
+
constructor({ speechModel, speaker } = {}) {
|
|
1109
|
+
const modelName = speechModel?.name ?? "simba-english";
|
|
1110
|
+
super({
|
|
1111
|
+
speechModel: {
|
|
1112
|
+
name: modelName,
|
|
1113
|
+
apiKey: speechModel?.apiKey ?? process.env.SPEECHIFY_API_KEY
|
|
1114
|
+
},
|
|
1115
|
+
speaker: speaker ?? (isSimba3Model(modelName) ? "harper_32" : "george")
|
|
1116
|
+
});
|
|
1117
|
+
const apiKey = speechModel?.apiKey ?? process.env.SPEECHIFY_API_KEY;
|
|
1118
|
+
if (!apiKey) throw new Error("SPEECHIFY_API_KEY is not set");
|
|
1119
|
+
this.client = new Speechify({ apiKey });
|
|
1120
|
+
}
|
|
1121
|
+
async getSpeakers() {
|
|
1122
|
+
return [...SIMBA_3_VOICES, ...SPEECHIFY_VOICES].map((voice) => ({
|
|
1123
|
+
voiceId: voice,
|
|
1124
|
+
name: voice
|
|
1125
|
+
}));
|
|
1126
|
+
}
|
|
1127
|
+
async streamToString(stream) {
|
|
1128
|
+
const chunks = [];
|
|
1129
|
+
for await (const chunk of stream) if (typeof chunk === "string") chunks.push(Buffer.from(chunk));
|
|
1130
|
+
else chunks.push(chunk);
|
|
1131
|
+
return Buffer.concat(chunks).toString("utf-8");
|
|
1132
|
+
}
|
|
1133
|
+
async speak(input, options) {
|
|
1134
|
+
const text = typeof input === "string" ? input : await this.streamToString(input);
|
|
1135
|
+
const { speaker, model, ...streamOptions } = options ?? {};
|
|
1136
|
+
const request = {
|
|
1137
|
+
...streamOptions,
|
|
1138
|
+
input: text,
|
|
1139
|
+
model: model || this.speechModel?.name,
|
|
1140
|
+
voiceId: speaker || this.speaker
|
|
1141
|
+
};
|
|
1142
|
+
const reader = (await this.client.audioStream(request)).getReader();
|
|
1143
|
+
const nodeStream = new Readable({ read: async function() {
|
|
1144
|
+
try {
|
|
1145
|
+
const { done, value } = await reader.read();
|
|
1146
|
+
if (done) this.push(null);
|
|
1147
|
+
else this.push(value);
|
|
1148
|
+
} catch (error) {
|
|
1149
|
+
this.destroy(error);
|
|
1150
|
+
}
|
|
1151
|
+
} });
|
|
1152
|
+
nodeStream.on("end", () => {
|
|
1153
|
+
reader.releaseLock();
|
|
1154
|
+
});
|
|
1155
|
+
return nodeStream;
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Checks if listening capabilities are enabled.
|
|
1159
|
+
*
|
|
1160
|
+
* @returns {Promise<{ enabled: boolean }>}
|
|
1161
|
+
*/
|
|
1162
|
+
async getListener() {
|
|
1163
|
+
return { enabled: false };
|
|
1164
|
+
}
|
|
1165
|
+
async listen(_input, _options) {
|
|
1166
|
+
throw new Error("Speechify does not support speech recognition");
|
|
1167
|
+
}
|
|
1067
1168
|
};
|
|
1068
|
-
|
|
1169
|
+
//#endregion
|
|
1069
1170
|
export { SpeechifyVoice };
|
|
1070
|
-
|
|
1171
|
+
|
|
1071
1172
|
//# sourceMappingURL=index.js.map
|