@node-webrtc-rust/voice-catalog 0.11.3 → 0.11.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.
@@ -7,6 +7,7 @@
7
7
  "tts": true,
8
8
  "defaultSttModel": "whisper-1",
9
9
  "defaultTtsModel": "tts-1",
10
+ "defaultTtsVoice": "alloy",
10
11
  "sttModels": [
11
12
  "whisper-1",
12
13
  "gpt-4o-mini-transcribe",
@@ -16,10 +17,29 @@
16
17
  "gpt-live-transcribe"
17
18
  ],
18
19
  "ttsModels": ["tts-1", "tts-1-hd", "gpt-4o-mini-tts", "gpt-4o-mini-tts-2025-12-15"],
19
- "ttsVoices": [],
20
+ "ttsVoices": [
21
+ "alloy",
22
+ "ash",
23
+ "ballad",
24
+ "coral",
25
+ "echo",
26
+ "fable",
27
+ "onyx",
28
+ "nova",
29
+ "sage",
30
+ "shimmer",
31
+ "verse",
32
+ "marin",
33
+ "cedar"
34
+ ],
35
+ "ttsVoicesByModel": {
36
+ "tts-1": ["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"],
37
+ "tts-1-hd": ["alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer"]
38
+ },
39
+ "ttsVoiceIds": "listed",
20
40
  "home": "https://platform.openai.com/docs",
21
41
  "sttDocs": "https://platform.openai.com/docs/guides/speech-to-text",
22
- "ttsDocs": "https://platform.openai.com/docs/guides/text-to-speech",
42
+ "ttsDocs": "https://developers.openai.com/api/docs/guides/text-to-speech",
23
43
  "modelsDocs": "https://platform.openai.com/docs/models"
24
44
  },
25
45
  {
@@ -30,12 +50,152 @@
30
50
  "defaultSttModel": "nova-2",
31
51
  "defaultTtsModel": "aura-asteria-en",
32
52
  "sttModels": ["nova-2", "nova-3"],
33
- "ttsModels": ["aura-asteria-en"],
53
+ "ttsModels": [
54
+ "aura-asteria-en",
55
+ "aura-luna-en",
56
+ "aura-stella-en",
57
+ "aura-athena-en",
58
+ "aura-hera-en",
59
+ "aura-orion-en",
60
+ "aura-arcas-en",
61
+ "aura-perseus-en",
62
+ "aura-angus-en",
63
+ "aura-orpheus-en",
64
+ "aura-helios-en",
65
+ "aura-zeus-en",
66
+ "aura-2-amalthea-en",
67
+ "aura-2-andromeda-en",
68
+ "aura-2-apollo-en",
69
+ "aura-2-arcas-en",
70
+ "aura-2-aries-en",
71
+ "aura-2-asteria-en",
72
+ "aura-2-athena-en",
73
+ "aura-2-atlas-en",
74
+ "aura-2-aurora-en",
75
+ "aura-2-callista-en",
76
+ "aura-2-cora-en",
77
+ "aura-2-cordelia-en",
78
+ "aura-2-delia-en",
79
+ "aura-2-draco-en",
80
+ "aura-2-electra-en",
81
+ "aura-2-harmonia-en",
82
+ "aura-2-helena-en",
83
+ "aura-2-hera-en",
84
+ "aura-2-hermes-en",
85
+ "aura-2-hyperion-en",
86
+ "aura-2-iris-en",
87
+ "aura-2-janus-en",
88
+ "aura-2-juno-en",
89
+ "aura-2-jupiter-en",
90
+ "aura-2-luna-en",
91
+ "aura-2-mars-en",
92
+ "aura-2-minerva-en",
93
+ "aura-2-neptune-en",
94
+ "aura-2-odysseus-en",
95
+ "aura-2-ophelia-en",
96
+ "aura-2-orion-en",
97
+ "aura-2-orpheus-en",
98
+ "aura-2-pandora-en",
99
+ "aura-2-phoebe-en",
100
+ "aura-2-pluto-en",
101
+ "aura-2-saturn-en",
102
+ "aura-2-selene-en",
103
+ "aura-2-thalia-en",
104
+ "aura-2-theia-en",
105
+ "aura-2-vesta-en",
106
+ "aura-2-zeus-en",
107
+ "aura-2-agustina-es",
108
+ "aura-2-alvaro-es",
109
+ "aura-2-antonia-es",
110
+ "aura-2-aquila-es",
111
+ "aura-2-carina-es",
112
+ "aura-2-celeste-es",
113
+ "aura-2-diana-es",
114
+ "aura-2-estrella-es",
115
+ "aura-2-gloria-es",
116
+ "aura-2-javier-es",
117
+ "aura-2-luciano-es",
118
+ "aura-2-nestor-es",
119
+ "aura-2-olivia-es",
120
+ "aura-2-selena-es",
121
+ "aura-2-silvia-es",
122
+ "aura-2-sirio-es",
123
+ "aura-2-valerio-es",
124
+ "aura-2-beatrix-nl",
125
+ "aura-2-cornelia-nl",
126
+ "aura-2-daphne-nl",
127
+ "aura-2-hestia-nl",
128
+ "aura-2-lars-nl",
129
+ "aura-2-leda-nl",
130
+ "aura-2-rhea-nl",
131
+ "aura-2-roman-nl",
132
+ "aura-2-sander-nl",
133
+ "aura-2-agathe-fr",
134
+ "aura-2-hector-fr",
135
+ "aura-2-aurelia-de",
136
+ "aura-2-elara-de",
137
+ "aura-2-fabian-de",
138
+ "aura-2-julius-de",
139
+ "aura-2-kara-de",
140
+ "aura-2-lara-de",
141
+ "aura-2-viktoria-de",
142
+ "aura-2-cesare-it",
143
+ "aura-2-cinzia-it",
144
+ "aura-2-demetra-it",
145
+ "aura-2-dionisio-it",
146
+ "aura-2-elio-it",
147
+ "aura-2-flavio-it",
148
+ "aura-2-livia-it",
149
+ "aura-2-maia-it",
150
+ "aura-2-melia-it",
151
+ "aura-2-ama-ja",
152
+ "aura-2-ebisu-ja",
153
+ "aura-2-fujin-ja",
154
+ "aura-2-izanami-ja",
155
+ "aura-2-uzume-ja",
156
+ "flux-hannah-en",
157
+ "flux-kit-en",
158
+ "flux-alexis-en",
159
+ "flux-cliff-en",
160
+ "flux-sienna-en",
161
+ "flux-cole-en",
162
+ "flux-brooke-en",
163
+ "flux-colin-en",
164
+ "flux-gemma-en",
165
+ "flux-haley-en",
166
+ "flux-heather-en",
167
+ "flux-miles-en",
168
+ "flux-sean-en",
169
+ "flux-bree-en",
170
+ "flux-brittany-en",
171
+ "flux-bruce-en",
172
+ "flux-conor-en",
173
+ "flux-donovan-en",
174
+ "flux-drew-en",
175
+ "flux-elise-en",
176
+ "flux-jack-en",
177
+ "flux-kai-en",
178
+ "flux-kelsey-en",
179
+ "flux-maeve-en",
180
+ "flux-marcelo-en",
181
+ "flux-marcus-en",
182
+ "flux-meena-en",
183
+ "flux-meghan-en",
184
+ "flux-naveen-en",
185
+ "flux-paige-en",
186
+ "flux-priya-en",
187
+ "flux-rufus-en",
188
+ "flux-sharon-en",
189
+ "flux-tanner-en",
190
+ "flux-wade-en",
191
+ "flux-wes-en"
192
+ ],
34
193
  "ttsVoices": [],
194
+ "ttsVoiceIds": "model",
35
195
  "home": "https://developers.deepgram.com/",
36
196
  "sttDocs": "https://developers.deepgram.com/docs/live-streaming-audio",
37
197
  "ttsDocs": "https://developers.deepgram.com/reference/text-to-speech/speak",
38
- "modelsDocs": "https://developers.deepgram.com/docs/models"
198
+ "modelsDocs": "https://developers.deepgram.com/docs/tts-models"
39
199
  },
40
200
  {
41
201
  "id": "elevenlabs",
@@ -47,6 +207,7 @@
47
207
  "sttModels": ["scribe_v2_realtime"],
48
208
  "ttsModels": ["eleven_multilingual_v2", "eleven_v3", "eleven_flash_v2_5"],
49
209
  "ttsVoices": [],
210
+ "ttsVoiceIds": "open",
50
211
  "home": "https://elevenlabs.io/docs",
51
212
  "sttDocs": "https://elevenlabs.io/docs/api-reference/speech-to-text/v-1-speech-to-text-realtime",
52
213
  "ttsDocs": "https://elevenlabs.io/docs/api-reference/text-to-speech/stream",
@@ -61,6 +222,7 @@
61
222
  "sttModels": [],
62
223
  "ttsModels": ["sonic-3.6", "sonic-3.5", "sonic-3", "sonic-latest"],
63
224
  "ttsVoices": [],
225
+ "ttsVoiceIds": "open",
64
226
  "home": "https://docs.cartesia.ai/",
65
227
  "ttsDocs": "https://docs.cartesia.ai/api-reference/tts/websocket",
66
228
  "modelsDocs": "https://docs.cartesia.ai/models"
@@ -75,6 +237,7 @@
75
237
  "sttModels": ["transcribe-1"],
76
238
  "ttsModels": ["drama-3", "s2.1-pro", "s2.1-pro-free", "s2-pro"],
77
239
  "ttsVoices": [],
240
+ "ttsVoiceIds": "open",
78
241
  "home": "https://docs.fish.audio/",
79
242
  "sttDocs": "https://docs.fish.audio/developer-guide/compat/migrate-from-elevenlabs",
80
243
  "ttsDocs": "https://docs.fish.audio/api-reference/endpoint/websocket/tts-live",
@@ -103,6 +266,8 @@
103
266
  "sttModels": ["chirp_3", "chirp_2", "telephony", "latest_long"],
104
267
  "ttsModels": [],
105
268
  "ttsVoices": [],
269
+ "ttsVoiceListFile": "google-tts-voices.json",
270
+ "ttsVoiceIds": "listed",
106
271
  "home": "https://cloud.google.com/speech-to-text",
107
272
  "sttDocs": "https://docs.cloud.google.com/speech-to-text/docs/models/chirp-3",
108
273
  "ttsDocs": "https://docs.cloud.google.com/text-to-speech/docs/create-audio-text-streaming",
@@ -115,12 +280,38 @@
115
280
  "tts": true,
116
281
  "defaultSttModel": "whisper-large-v3-turbo",
117
282
  "defaultTtsModel": "canopylabs/orpheus-v1-english",
283
+ "defaultTtsVoice": "troy",
118
284
  "sttModels": ["whisper-large-v3-turbo", "whisper-large-v3"],
119
285
  "ttsModels": ["canopylabs/orpheus-v1-english", "canopylabs/orpheus-arabic-saudi"],
120
- "ttsVoices": [],
286
+ "ttsVoices": [
287
+ "autumn",
288
+ "diana",
289
+ "hannah",
290
+ "austin",
291
+ "daniel",
292
+ "troy",
293
+ "abdullah",
294
+ "fahad",
295
+ "sultan",
296
+ "lulwa",
297
+ "noura",
298
+ "aisha"
299
+ ],
300
+ "ttsVoicesByModel": {
301
+ "canopylabs/orpheus-v1-english": ["autumn", "diana", "hannah", "austin", "daniel", "troy"],
302
+ "canopylabs/orpheus-arabic-saudi": [
303
+ "abdullah",
304
+ "fahad",
305
+ "sultan",
306
+ "lulwa",
307
+ "noura",
308
+ "aisha"
309
+ ]
310
+ },
311
+ "ttsVoiceIds": "listed",
121
312
  "home": "https://console.groq.com/docs",
122
313
  "sttDocs": "https://console.groq.com/docs/speech-to-text",
123
- "ttsDocs": "https://console.groq.com/docs/text-to-speech"
314
+ "ttsDocs": "https://console.groq.com/docs/text-to-speech/orpheus"
124
315
  },
125
316
  {
126
317
  "id": "azure",
@@ -133,6 +324,7 @@
133
324
  "ttsModels": [],
134
325
  "ttsVoices": [],
135
326
  "ttsVoiceListFile": "azure-tts-voices.json",
327
+ "ttsVoiceIds": "listed",
136
328
  "snapshotDate": "2026-09-28",
137
329
  "home": "https://learn.microsoft.com/en-us/azure/ai-services/speech-service/",
138
330
  "sttDocs": "https://learn.microsoft.com/en-us/azure/ai-services/speech-service/rest-speech-to-text-short",
@@ -158,7 +350,72 @@
158
350
  "hi-IN"
159
351
  ],
160
352
  "ttsModels": [],
161
- "ttsVoices": ["Joanna", "Matthew", "Amy", "Brian", "Ruth", "Stephen"],
353
+ "ttsVoices": [
354
+ "Hala",
355
+ "Zayd",
356
+ "Lisa",
357
+ "Arlet",
358
+ "Jitka",
359
+ "Hiujin",
360
+ "Zhiyu",
361
+ "Sofie",
362
+ "Laura",
363
+ "Olivia",
364
+ "Amy",
365
+ "Emma",
366
+ "Brian",
367
+ "Arthur",
368
+ "Kajal",
369
+ "Niamh",
370
+ "Aria",
371
+ "Jasmine",
372
+ "Ayanda",
373
+ "Danielle",
374
+ "Gregory",
375
+ "Ivy",
376
+ "Joanna",
377
+ "Kendra",
378
+ "Kimberly",
379
+ "Salli",
380
+ "Joey",
381
+ "Justin",
382
+ "Kevin",
383
+ "Matthew",
384
+ "Ruth",
385
+ "Stephen",
386
+ "Suvi",
387
+ "Lea",
388
+ "Remi",
389
+ "Isabelle",
390
+ "Gabrielle",
391
+ "Liam",
392
+ "Vicki",
393
+ "Daniel",
394
+ "Hannah",
395
+ "Sabrina",
396
+ "Bianca",
397
+ "Adriano",
398
+ "Takumi",
399
+ "Kazuha",
400
+ "Tomoko",
401
+ "Seoyeon",
402
+ "Jihye",
403
+ "Ida",
404
+ "Ola",
405
+ "Camila",
406
+ "Vitoria",
407
+ "Thiago",
408
+ "Ines",
409
+ "Lucia",
410
+ "Sergio",
411
+ "Mia",
412
+ "Andres",
413
+ "Lupe",
414
+ "Pedro",
415
+ "Elin",
416
+ "Burcu"
417
+ ],
418
+ "ttsVoiceIds": "listed",
162
419
  "home": "https://docs.aws.amazon.com/transcribe/",
163
420
  "sttDocs": "https://docs.aws.amazon.com/transcribe/latest/dg/streaming-setting-up.html",
164
421
  "ttsDocs": "https://docs.aws.amazon.com/polly/latest/dg/API_SynthesizeSpeech.html"
@@ -173,6 +430,7 @@
173
430
  "sttModels": [],
174
431
  "ttsModels": [],
175
432
  "ttsVoices": [],
433
+ "ttsVoiceIds": "open",
176
434
  "home": "https://github.com/k2-fsa/sherpa-onnx",
177
435
  "sttDocs": "https://k2-fsa.github.io/sherpa/onnx/",
178
436
  "ttsDocs": "https://k2-fsa.github.io/sherpa/onnx/tts/index.html",
@@ -11,7 +11,16 @@ export interface VoiceVendorEntry {
11
11
  sttModels: string[];
12
12
  ttsModels: string[];
13
13
  ttsVoices: string[];
14
- /** Relative to `catalog/` — load via {@link azureTtsVoices}. */
14
+ /** Per-model voice list; overrides `ttsVoices` for that model. */
15
+ ttsVoicesByModel?: Record<string, string[]>;
16
+ /**
17
+ * How voice ids are defined for this vendor.
18
+ * - `listed`: `ttsVoices` / `ttsVoicesByModel` / `ttsVoiceListFile` is the complete documented list.
19
+ * - `open`: voice ids are account or library ids plus customer clones; no closed list exists.
20
+ * - `model`: the voice is selected by the model id.
21
+ */
22
+ ttsVoiceIds?: 'listed' | 'open' | 'model';
23
+ /** Relative to `catalog/` — load via {@link azureTtsVoices} / {@link googleTtsVoices}. */
15
24
  ttsVoiceListFile?: string;
16
25
  home: string;
17
26
  sttDocs?: string;
@@ -25,15 +34,24 @@ export interface AzureTtsVoicesCatalog {
25
34
  voicesListDoc: string;
26
35
  voices: string[];
27
36
  }
37
+ export interface GoogleTtsVoicesCatalog {
38
+ snapshotDate: string;
39
+ source: string;
40
+ voicesListDoc: string;
41
+ voices: string[];
42
+ }
28
43
  export interface VendorsCatalogFile {
29
44
  vendors: VoiceVendorEntry[];
30
45
  }
31
46
  export declare const vendorsCatalogJson: VendorsCatalogFile;
32
47
  export declare const azureTtsVoicesJson: AzureTtsVoicesCatalog;
48
+ export declare const googleTtsVoicesJson: GoogleTtsVoicesCatalog;
33
49
  /** All vendors from `catalog/vendors.json`. */
34
50
  export declare const VOICE_VENDORS: readonly VoiceVendorEntry[];
35
51
  /** Azure TTS ShortNames snapshot (`catalog/azure-tts-voices.json`). */
36
52
  export declare const azureTtsVoices: readonly string[];
53
+ /** Google TTS voice names snapshot (`catalog/google-tts-voices.json`). */
54
+ export declare const googleTtsVoices: readonly string[];
37
55
  export declare function getVendor(id: string): VoiceVendorEntry | undefined;
38
56
  export declare function allVendorIds(): VoiceVendorId[];
39
57
  /** STT-capable providers for customer configuration (excludes `mock`). */
@@ -42,7 +60,8 @@ export declare function customerSttProviderIds(): VoiceVendorId[];
42
60
  export declare function customerTtsProviderIds(): VoiceVendorId[];
43
61
  export declare function sttModelAllowlist(vendorId: string): readonly string[];
44
62
  export declare function ttsModelAllowlist(vendorId: string): readonly string[];
45
- export declare function ttsVoiceAllowlist(vendorId: string): readonly string[];
63
+ /** Documented TTS voices for a vendor; `model` selects a per-model list when the vendor has one. */
64
+ export declare function ttsVoiceAllowlist(vendorId: string, model?: string): readonly string[];
46
65
  export type VoiceCatalogValidationKind = 'sttModel' | 'ttsModel' | 'ttsVoice';
47
66
  export interface VoiceCatalogValidationError {
48
67
  kind: VoiceCatalogValidationKind;
@@ -51,6 +70,6 @@ export interface VoiceCatalogValidationError {
51
70
  message: string;
52
71
  }
53
72
  /** Returns `null` when the model/voice is in the published allowlist for that vendor. */
54
- export declare function validateVoiceCatalogChoice(vendorId: string, kind: VoiceCatalogValidationKind, value: string): VoiceCatalogValidationError | null;
55
- export { vendorsCatalogJson as loadVendorsCatalog, azureTtsVoicesJson as loadAzureTtsVoicesCatalog };
73
+ export declare function validateVoiceCatalogChoice(vendorId: string, kind: VoiceCatalogValidationKind, value: string, model?: string): VoiceCatalogValidationError | null;
74
+ export { vendorsCatalogJson as loadVendorsCatalog, azureTtsVoicesJson as loadAzureTtsVoicesCatalog, googleTtsVoicesJson as loadGoogleTtsVoicesCatalog, };
56
75
  //# sourceMappingURL=index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IAAI,CAgEpC;AAED,OAAO,EACL,kBAAkB,IAAI,kBAAkB,EACxC,kBAAkB,IAAI,yBAAyB,EAC/C,mBAAmB,IAAI,0BAA0B,GAClD,CAAA"}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.loadAzureTtsVoicesCatalog = exports.loadVendorsCatalog = exports.azureTtsVoices = exports.VOICE_VENDORS = exports.azureTtsVoicesJson = exports.vendorsCatalogJson = void 0;
6
+ exports.loadGoogleTtsVoicesCatalog = exports.loadAzureTtsVoicesCatalog = exports.loadVendorsCatalog = exports.googleTtsVoices = exports.azureTtsVoices = exports.VOICE_VENDORS = exports.googleTtsVoicesJson = exports.azureTtsVoicesJson = exports.vendorsCatalogJson = void 0;
7
7
  exports.getVendor = getVendor;
8
8
  exports.allVendorIds = allVendorIds;
9
9
  exports.customerSttProviderIds = customerSttProviderIds;
@@ -14,14 +14,19 @@ exports.ttsVoiceAllowlist = ttsVoiceAllowlist;
14
14
  exports.validateVoiceCatalogChoice = validateVoiceCatalogChoice;
15
15
  const vendors_json_1 = __importDefault(require("../catalog/vendors.json"));
16
16
  const azure_tts_voices_json_1 = __importDefault(require("../catalog/azure-tts-voices.json"));
17
+ const google_tts_voices_json_1 = __importDefault(require("../catalog/google-tts-voices.json"));
17
18
  exports.vendorsCatalogJson = vendors_json_1.default;
18
19
  exports.loadVendorsCatalog = exports.vendorsCatalogJson;
19
20
  exports.azureTtsVoicesJson = azure_tts_voices_json_1.default;
20
21
  exports.loadAzureTtsVoicesCatalog = exports.azureTtsVoicesJson;
22
+ exports.googleTtsVoicesJson = google_tts_voices_json_1.default;
23
+ exports.loadGoogleTtsVoicesCatalog = exports.googleTtsVoicesJson;
21
24
  /** All vendors from `catalog/vendors.json`. */
22
25
  exports.VOICE_VENDORS = exports.vendorsCatalogJson.vendors;
23
26
  /** Azure TTS ShortNames snapshot (`catalog/azure-tts-voices.json`). */
24
27
  exports.azureTtsVoices = exports.azureTtsVoicesJson.voices;
28
+ /** Google TTS voice names snapshot (`catalog/google-tts-voices.json`). */
29
+ exports.googleTtsVoices = exports.googleTtsVoicesJson.voices;
25
30
  function getVendor(id) {
26
31
  return exports.VOICE_VENDORS.find((entry) => entry.id === id);
27
32
  }
@@ -44,15 +49,23 @@ function ttsModelAllowlist(vendorId) {
44
49
  const vendor = getVendor(vendorId);
45
50
  return vendor?.ttsModels ?? [];
46
51
  }
47
- function ttsVoiceAllowlist(vendorId) {
52
+ /** Documented TTS voices for a vendor; `model` selects a per-model list when the vendor has one. */
53
+ function ttsVoiceAllowlist(vendorId, model) {
54
+ const vendor = getVendor(vendorId);
55
+ const byModel = model ? vendor?.ttsVoicesByModel?.[model] : undefined;
56
+ if (byModel) {
57
+ return byModel;
58
+ }
48
59
  if (vendorId === 'azure') {
49
60
  return exports.azureTtsVoices;
50
61
  }
51
- const vendor = getVendor(vendorId);
62
+ if (vendorId === 'google') {
63
+ return exports.googleTtsVoices;
64
+ }
52
65
  return vendor?.ttsVoices ?? [];
53
66
  }
54
67
  /** Returns `null` when the model/voice is in the published allowlist for that vendor. */
55
- function validateVoiceCatalogChoice(vendorId, kind, value) {
68
+ function validateVoiceCatalogChoice(vendorId, kind, value, model) {
56
69
  const vendor = getVendor(vendorId);
57
70
  if (!vendor) {
58
71
  return {
@@ -95,11 +108,12 @@ function validateVoiceCatalogChoice(vendorId, kind, value) {
95
108
  message: `vendor \`${vendorId}\` does not support TTS`,
96
109
  };
97
110
  }
98
- allowlist = ttsVoiceAllowlist(vendorId);
111
+ allowlist = ttsVoiceAllowlist(vendorId, model);
99
112
  break;
100
113
  }
101
114
  if (allowlist.length === 0) {
102
- // local-sherpa / google TTS voices / deepgram TTS models: no hardcoded zoo in catalog
115
+ // An empty list means the vendor's `ttsVoiceIds` is `open` (account/library ids) or `model`
116
+ // (voice chosen by the model id); there is no closed list to check against.
103
117
  return null;
104
118
  }
105
119
  if (!allowlist.includes(value)) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":";;;;;;AA2DA,8BAEC;AAED,oCAEC;AAGD,wDAEC;AAGD,wDAEC;AAED,8CAGC;AAED,8CAGC;AAED,8CAMC;AAYD,gEAmEC;AA5KD,2EAAoD;AACpD,6FAAoE;AAgDvD,QAAA,kBAAkB,GAAuB,sBAAoC,CAAA;AA6H3D,6BA7HlB,0BAAkB,CA6HkB;AA5HpC,QAAA,kBAAkB,GAC7B,+BAA8C,CAAA;AA2HyB,oCA5H5D,0BAAkB,CA4HmE;AAzHlG,+CAA+C;AAClC,QAAA,aAAa,GAAgC,0BAAkB,CAAC,OAAO,CAAA;AAEpF,uEAAuE;AAC1D,QAAA,cAAc,GAAsB,0BAAkB,CAAC,MAAM,CAAA;AAE1E,SAAgB,SAAS,CAAC,EAAU;IAClC,OAAO,qBAAa,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAA;AACvD,CAAC;AAED,SAAgB,YAAY;IAC1B,OAAO,qBAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAC/C,CAAC;AAED,0EAA0E;AAC1E,SAAgB,sBAAsB;IACpC,OAAO,qBAAa,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AACnG,CAAC;AAED,0EAA0E;AAC1E,SAAgB,sBAAsB;IACpC,OAAO,qBAAa,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAA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