@breeze.blue/sdk 0.9.0 → 0.11.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.11.0
4
+
5
+ - Added canonical Voice `tags`, personal tag overrides, favorite management,
6
+ exact tag filters, and `voices.updateTags()` / `favorite()` / `unfavorite()`.
7
+ - `voices.savePreview(...)` now requires `languageCode`, preventing saved
8
+ voices from being created without explicit reference-language metadata.
9
+ - Added `voices.metadataOptions()` and the typed `VoiceLanguageCode` contract
10
+ for discovering Voice Metadata codes and language-to-accent constraints.
11
+ - Sync and async TTS accept explicit sample-rate and bitrate output profiles,
12
+ such as `wav_48000` and `mp3_44100_128`.
13
+
14
+ ## 0.10.0
15
+
16
+ - Added typed Voice Metadata codes and camelCase response fields for gender,
17
+ age, tone, and accent. `voices.edit(...)` uses `null` or an empty tone array
18
+ to clear metadata, and `voices.savePreview(...)` accepts metadata when saving
19
+ a preview.
4
20
 
5
21
  ## 0.9.0
6
22
 
@@ -200,7 +216,7 @@
200
216
 
201
217
  ## 0.1.2
202
218
 
203
- - Breaking: all request and response field names are now camelCase (e.g. `modelId`, `voiceId`, `voiceSettings`, `historyItemId`). The SDK transparently translates to the snake_case HTTP wire format on send and from snake_case on receive. `labels: Record<string, string>` is preserved verbatim.
219
+ - Breaking: all request and response field names are now camelCase (e.g. `modelId`, `voiceId`, `voiceSettings`, `historyItemId`). The SDK transparently translates to the snake_case HTTP wire format on send and from snake_case on receive.
204
220
  - Removed remaining ElevenLabs-positioning copy from the README and package keywords. Quickstart and reference examples use the published packages only.
205
221
 
206
222
  ## 0.1.1
package/README.md CHANGED
@@ -393,6 +393,10 @@ Streaming text-to-speech defaults to `pcm` to reduce time to first audio. Pass
393
393
  `{ outputFormat: "wav" }` or `{ outputFormat: "mp3" }` when you need that wire
394
394
  format explicitly.
395
395
 
396
+ Sync and async text-to-speech also take a sample rate and, for the lossy encodings, a bitrate, such as
397
+ `{ outputFormat: "wav_48000" }`. Breeze resamples its native 24000 Hz output for
398
+ downstream compatibility; profiles carrying a sample rate are not available for streaming.
399
+
396
400
  ## Voices
397
401
 
398
402
  Search every voice available to the account and inspect a single voice. Public
@@ -402,6 +406,10 @@ or voice ID.
402
406
 
403
407
  ```ts
404
408
  const voices = await client.voices.search({ search: "calm documentary narrator" });
409
+ const taggedFavorites = await client.voices.search({
410
+ favoritesOnly: true,
411
+ tags: ["narration", "novel=三体"],
412
+ });
405
413
  const firstVoiceId = voices.voices[0].voiceId;
406
414
 
407
415
  const voice = await client.voices.get(firstVoiceId);
@@ -409,6 +417,11 @@ const settings = await client.voices.getSettings(firstVoiceId);
409
417
 
410
418
  const randomVoice = await client.voices.random();
411
419
  console.log(randomVoice.voiceId, randomVoice.name);
420
+
421
+ // Discover the current code-only Voice Metadata contract before building a form.
422
+ const metadataOptions = await client.voices.metadataOptions();
423
+ console.log(metadataOptions.languageCodes);
424
+ console.log(metadataOptions.accentCodesByLanguage.en);
412
425
  ```
413
426
 
414
427
  Breeze voice creation is always two steps: produce a **preview**, let the
@@ -450,17 +463,38 @@ const saved = await client.voices.savePreview({
450
463
  generatedVoiceId,
451
464
  voiceName: "Documentary narrator",
452
465
  languageCode: "en",
466
+ gender: "neutral",
467
+ age: "middle_aged",
468
+ tone: ["warm", "articulate"],
469
+ accent: "american",
470
+ tags: ["narration", "novel=三体"],
453
471
  });
454
472
  ```
455
473
 
456
474
  Edit, tune settings, or delete a saved voice:
457
475
 
458
476
  ```ts
459
- await client.voices.edit(saved.voiceId, { name: "Renamed narrator", languageCode: "en" });
477
+ await client.voices.edit(saved.voiceId, {
478
+ name: "Renamed narrator",
479
+ languageCode: "en",
480
+ tone: ["calm", "measured"],
481
+ });
482
+ // null clears nullable metadata; [] clears tone. Omitted fields remain unchanged.
483
+ await client.voices.edit(saved.voiceId, { accent: null, tone: [] });
460
484
  await client.voices.editSettings(saved.voiceId, { guidanceScale: 1.2 });
485
+ await client.voices.favorite(firstVoiceId);
486
+ await client.voices.updateTags(firstVoiceId, ["narration", "novel=三体"]);
487
+ await client.voices.updateTags(firstVoiceId, []); // Resume owner tag inheritance.
488
+ await client.voices.unfavorite(firstVoiceId);
461
489
  await client.voices.delete(saved.voiceId);
462
490
  ```
463
491
 
492
+ Voice Metadata uses stable code values. `gender`, `age`, and `accent` may be
493
+ `null`; `tone` contains up to three distinct codes. English and Chinese use
494
+ different accent code sets, and other languages require `accent: null`.
495
+ Call `client.voices.metadataOptions()` to discover every accepted code and the
496
+ language-to-accent cascade at runtime.
497
+
464
498
  ## History, Models, and Account
465
499
 
466
500
  ```ts
@@ -1,6 +1,3 @@
1
- // Keys whose values are user-defined dictionaries; we transform the key itself
2
- // but never recurse into the value.
3
- const OPAQUE_VALUE_KEYS = new Set(["labels"]);
4
1
  function snakeToCamel(key) {
5
2
  return key.replace(/_([a-z0-9])/g, (_, c) => c.toUpperCase());
6
3
  }
@@ -15,24 +12,22 @@ function isPlainObject(value) {
15
12
  const proto = Object.getPrototypeOf(value);
16
13
  return proto === Object.prototype || proto === null;
17
14
  }
18
- function transform(value, keyFn, opaqueKey) {
15
+ function transform(value, keyFn) {
19
16
  if (Array.isArray(value)) {
20
- return value.map((item) => transform(item, keyFn, false));
17
+ return value.map((item) => transform(item, keyFn));
21
18
  }
22
19
  if (isPlainObject(value)) {
23
- if (opaqueKey)
24
- return value;
25
20
  const out = {};
26
21
  for (const [k, v] of Object.entries(value)) {
27
- out[keyFn(k)] = transform(v, keyFn, OPAQUE_VALUE_KEYS.has(k));
22
+ out[keyFn(k)] = transform(v, keyFn);
28
23
  }
29
24
  return out;
30
25
  }
31
26
  return value;
32
27
  }
33
28
  export function camelizeKeys(value) {
34
- return transform(value, snakeToCamel, false);
29
+ return transform(value, snakeToCamel);
35
30
  }
36
31
  export function snakeizeKeys(value) {
37
- return transform(value, camelToSnake, false);
32
+ return transform(value, camelToSnake);
38
33
  }
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AudioResponse } from "./audio.js";
2
- import type { AudioRequestOptions, BreezeBlueWebSocket, AsyncTextToSpeechJob, Balance, BreezeBlueClientOptions, GenericStatus, GenerationJob, HistoryItem, HistoryList, HistoryListParams, Model, RequestOptions, RealtimeTextToSpeechConnectOptions, RealtimeTextToSpeechEvent, RealtimeTextToSpeechManagedConnectOptions, RealtimeTextToSpeechMessage, RealtimeTextToSpeechSession, RealtimeTextToSpeechSessionRequest, SavedVoice, SaveVoiceRequest, StreamTextToSpeechOptions, TextToSpeechRequest, TtsEnhanceRequest, TtsEnhanceResponse, Usage, UsageParams, Voice, VoiceClonePreview, VoiceClonePreviewRequest, VoiceDesignRequest, VoiceDesignResponse, VoiceEditRequest, VoiceList, VoiceSearchParams, VoiceSettings } from "./types.js";
2
+ import type { AudioRequestOptions, BreezeBlueWebSocket, AsyncTextToSpeechJob, Balance, BreezeBlueClientOptions, GenericStatus, GenerationJob, HistoryItem, HistoryList, HistoryListParams, Model, RequestOptions, RealtimeTextToSpeechConnectOptions, RealtimeTextToSpeechEvent, RealtimeTextToSpeechManagedConnectOptions, RealtimeTextToSpeechMessage, RealtimeTextToSpeechSession, RealtimeTextToSpeechSessionRequest, SavedVoice, SaveVoiceRequest, StreamTextToSpeechOptions, TextToSpeechRequest, TtsEnhanceRequest, TtsEnhanceResponse, Usage, UsageParams, Voice, VoiceClonePreview, VoiceClonePreviewRequest, VoiceDesignRequest, VoiceDesignResponse, VoiceEditRequest, VoiceList, VoiceMetadataOptions, VoiceSearchParams, VoiceSettings } from "./types.js";
3
3
  export declare class BreezeBlueClient {
4
4
  readonly apiKey: string | undefined;
5
5
  readonly baseUrl: string;
@@ -212,7 +212,12 @@ declare class VoicesResource {
212
212
  search(params?: VoiceSearchParams, options?: RequestOptions): Promise<VoiceList>;
213
213
  get(voiceId: string, options?: RequestOptions): Promise<Voice>;
214
214
  random(options?: RequestOptions): Promise<Voice>;
215
+ /** Return stable Voice Metadata codes and language-accent constraints. */
216
+ metadataOptions(options?: RequestOptions): Promise<VoiceMetadataOptions>;
215
217
  edit(voiceId: string, request: VoiceEditRequest, options?: RequestOptions): Promise<GenericStatus>;
218
+ updateTags(voiceId: string, tags: string[], options?: RequestOptions): Promise<Voice>;
219
+ favorite(voiceId: string, options?: RequestOptions): Promise<Voice>;
220
+ unfavorite(voiceId: string, options?: RequestOptions): Promise<Voice>;
216
221
  delete(voiceId: string, options?: RequestOptions): Promise<GenericStatus>;
217
222
  getSettings(voiceId: string, options?: RequestOptions): Promise<Required<VoiceSettings>>;
218
223
  editSettings(voiceId: string, settings: VoiceSettings, options?: RequestOptions): Promise<Required<VoiceSettings>>;
package/dist/client.js CHANGED
@@ -1494,18 +1494,39 @@ class VoicesResource {
1494
1494
  * semantic and text relevance; personal voices match by name, description,
1495
1495
  * or identifier.
1496
1496
  */
1497
- search(params = {}, options) {
1498
- return this.client.requestJson("GET", "/v1/voices", params, undefined, options);
1497
+ async search(params = {}, options) {
1498
+ const result = await this.client.requestJson("GET", "/v1/voices", params, undefined, options);
1499
+ return Array.isArray(result.voices)
1500
+ ? { ...result, voices: result.voices.map(stripHiddenVoiceFields) }
1501
+ : result;
1499
1502
  }
1500
- get(voiceId, options) {
1501
- return this.client.requestJson("GET", `/v1/voices/${encodeURIComponent(voiceId)}`, undefined, undefined, options);
1503
+ async get(voiceId, options) {
1504
+ const result = await this.client.requestJson("GET", `/v1/voices/${encodeURIComponent(voiceId)}`, undefined, undefined, options);
1505
+ return stripHiddenVoiceFields(result);
1502
1506
  }
1503
- random(options) {
1504
- return this.client.requestJson("GET", "/v1/voices/random", undefined, undefined, options);
1507
+ async random(options) {
1508
+ const result = await this.client.requestJson("GET", "/v1/voices/random", undefined, undefined, options);
1509
+ return stripHiddenVoiceFields(result);
1510
+ }
1511
+ /** Return stable Voice Metadata codes and language-accent constraints. */
1512
+ metadataOptions(options) {
1513
+ return this.client.requestJson("GET", "/v1/voice-metadata/options", undefined, undefined, options);
1505
1514
  }
1506
1515
  edit(voiceId, request, options) {
1507
1516
  return this.client.requestJson("PATCH", `/v1/voices/${encodeURIComponent(voiceId)}`, undefined, voiceEditForm(request), options);
1508
1517
  }
1518
+ async updateTags(voiceId, tags, options) {
1519
+ const result = await this.client.requestJson("PUT", `/v1/voices/${encodeURIComponent(voiceId)}/tags`, undefined, { tags }, options);
1520
+ return stripHiddenVoiceFields(result);
1521
+ }
1522
+ async favorite(voiceId, options) {
1523
+ const result = await this.client.requestJson("PUT", `/v1/voices/${encodeURIComponent(voiceId)}/favorite`, undefined, undefined, options);
1524
+ return stripHiddenVoiceFields(result);
1525
+ }
1526
+ async unfavorite(voiceId, options) {
1527
+ const result = await this.client.requestJson("DELETE", `/v1/voices/${encodeURIComponent(voiceId)}/favorite`, undefined, undefined, options);
1528
+ return stripHiddenVoiceFields(result);
1529
+ }
1509
1530
  delete(voiceId, options) {
1510
1531
  return this.client.requestJson("DELETE", `/v1/voices/${encodeURIComponent(voiceId)}`, undefined, undefined, options);
1511
1532
  }
@@ -1538,16 +1559,21 @@ class VoicesResource {
1538
1559
  return this.client.requestAudio("GET", `/v1/voice-previews/${encodeURIComponent(generatedVoiceId)}/stream`, { outputFormat: options.outputFormat }, undefined, options);
1539
1560
  }
1540
1561
  /** Persist a clone or design preview as a real voice asset. */
1541
- savePreview(request, options) {
1542
- return this.client.requestJson("POST", `/v1/voice-previews/${encodeURIComponent(request.generatedVoiceId)}/save`, undefined, {
1562
+ async savePreview(request, options) {
1563
+ const result = await this.client.requestJson("POST", `/v1/voice-previews/${encodeURIComponent(request.generatedVoiceId)}/save`, undefined, {
1543
1564
  voiceName: request.voiceName,
1544
1565
  voiceDescription: request.voiceDescription,
1545
- labels: request.labels,
1566
+ tags: request.tags,
1546
1567
  primaryCategoryCode: request.primaryCategoryCode,
1547
1568
  visibility: request.visibility,
1548
1569
  playedNotSelectedVoiceIds: request.playedNotSelectedVoiceIds,
1549
1570
  languageCode: request.languageCode,
1571
+ gender: request.gender,
1572
+ age: request.age,
1573
+ tone: request.tone,
1574
+ accent: request.accent,
1550
1575
  }, options);
1576
+ return stripHiddenVoiceFields(result);
1551
1577
  }
1552
1578
  }
1553
1579
  class HistoryResource {
@@ -1650,7 +1676,13 @@ function buildUrl(baseUrl, path, params) {
1650
1676
  for (const [key, value] of Object.entries(params ?? {})) {
1651
1677
  if (value === undefined || value === null)
1652
1678
  continue;
1653
- url.searchParams.set(key, String(value));
1679
+ if (Array.isArray(value)) {
1680
+ for (const item of value)
1681
+ url.searchParams.append(key, String(item));
1682
+ }
1683
+ else {
1684
+ url.searchParams.set(key, String(value));
1685
+ }
1654
1686
  }
1655
1687
  return url.toString();
1656
1688
  }
@@ -1680,7 +1712,7 @@ function clonePreviewForm(request) {
1680
1712
  const form = new FormData();
1681
1713
  form.set("name", request.name);
1682
1714
  appendOptional(form, "description", request.description);
1683
- appendOptional(form, "labels", request.labels ? JSON.stringify(request.labels) : undefined);
1715
+ appendOptional(form, "language_code", request.languageCode);
1684
1716
  appendOptional(form, "text", request.text);
1685
1717
  appendOptional(form, "instructions", request.instructions);
1686
1718
  for (const file of normalizeFiles(request.file, request.files, { required: true })) {
@@ -1692,15 +1724,40 @@ function voiceEditForm(request) {
1692
1724
  const form = new FormData();
1693
1725
  appendOptional(form, "name", request.name);
1694
1726
  appendOptional(form, "description", request.description);
1695
- appendOptional(form, "labels", request.labels ? JSON.stringify(request.labels) : undefined);
1727
+ if (request.tags !== undefined) {
1728
+ for (const tag of request.tags)
1729
+ form.append("tags", tag);
1730
+ }
1696
1731
  appendOptional(form, "primary_category_code", request.primaryCategoryCode);
1697
1732
  appendOptional(form, "visibility", request.visibility);
1698
1733
  appendOptional(form, "language_code", request.languageCode);
1734
+ appendNullable(form, "gender", request.gender);
1735
+ appendNullable(form, "age", request.age);
1736
+ if (request.tone !== undefined) {
1737
+ if (request.tone.length === 0) {
1738
+ form.append("tone", "");
1739
+ }
1740
+ else {
1741
+ for (const tone of request.tone)
1742
+ form.append("tone", tone);
1743
+ }
1744
+ }
1745
+ appendNullable(form, "accent", request.accent);
1699
1746
  for (const file of normalizeFiles(request.file, request.files, { required: false })) {
1700
1747
  appendFile(form, "files", file);
1701
1748
  }
1702
1749
  return form;
1703
1750
  }
1751
+ function stripHiddenVoiceFields(voice) {
1752
+ const result = { ...voice };
1753
+ delete result.labels;
1754
+ return result;
1755
+ }
1756
+ function appendNullable(form, key, value) {
1757
+ if (value === undefined)
1758
+ return;
1759
+ form.set(key, value ?? "");
1760
+ }
1704
1761
  function appendOptional(form, key, value) {
1705
1762
  if (value === undefined)
1706
1763
  return;
package/dist/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export { BreezeBlueAPIError, BreezeBlueAuthenticationError, BreezeBlueBadRequest
3
3
  export { BreezeBlueClient, ManagedRealtimeTextToSpeechConnection, RealtimeTextToSpeechConnection, } from "./client.js";
4
4
  export { SDK_NAME, SDK_VERSION } from "./version.js";
5
5
  export type * from "./types.js";
6
+ export * from "./voice-metadata.js";
package/dist/index.js CHANGED
@@ -2,3 +2,4 @@ export { AudioResponse } from "./audio.js";
2
2
  export { BreezeBlueAPIError, BreezeBlueAuthenticationError, BreezeBlueBadRequestError, BreezeBlueConfigurationError, BreezeBlueConflictError, BreezeBlueError, BreezeBlueForbiddenError, BreezeBlueGenerationNotReadyError, BreezeBlueInsufficientCreditsError, BreezeBlueNotFoundError, BreezeBlueRateLimitError, BreezeBlueRealtimeError, BreezeBlueServiceUnavailableError, BreezeBlueUpstreamError, BreezeBlueValidationError, } from "./errors.js";
3
3
  export { BreezeBlueClient, ManagedRealtimeTextToSpeechConnection, RealtimeTextToSpeechConnection, } from "./client.js";
4
4
  export { SDK_NAME, SDK_VERSION } from "./version.js";
5
+ export * from "./voice-metadata.js";
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { VoiceAccent, VoiceAge, VoiceGender, VoiceLanguageCode, VoiceTone } from "./voice-metadata.js";
1
2
  export type JsonObject = Record<string, unknown>;
2
3
  export type BreezeBlueFetch = typeof fetch;
3
4
  export interface BreezeBlueClientOptions {
@@ -302,26 +303,37 @@ export interface Voice {
302
303
  name: string;
303
304
  origin: string;
304
305
  voiceType: string;
305
- labels: Record<string, string>;
306
+ tags: string[];
307
+ isFavorited: boolean;
306
308
  previewUrl?: string | null;
307
309
  settings: Required<VoiceSettings>;
308
310
  description?: string | null;
309
311
  createdAtUnix?: number | null;
310
312
  primaryCategoryCode?: string | null;
311
313
  visibility?: string | null;
312
- languageCode: string;
314
+ languageCode: VoiceLanguageCode;
315
+ gender: VoiceGender | null;
316
+ age: VoiceAge | null;
317
+ tone: VoiceTone[];
318
+ accent: VoiceAccent | null;
313
319
  [key: string]: unknown;
314
320
  }
315
321
  export interface SavedVoice {
316
322
  voiceId: string;
317
323
  name: string;
318
324
  origin: string;
325
+ tags: string[];
326
+ isFavorited: boolean;
319
327
  previewUrl?: string | null;
320
328
  description?: string | null;
321
329
  createdAtUnix?: number | null;
322
330
  primaryCategoryCode?: string | null;
323
331
  visibility?: string | null;
324
- languageCode: string;
332
+ languageCode: VoiceLanguageCode;
333
+ gender: VoiceGender | null;
334
+ age: VoiceAge | null;
335
+ tone: VoiceTone[];
336
+ accent: VoiceAccent | null;
325
337
  }
326
338
  export interface VoiceList {
327
339
  voices: Voice[];
@@ -331,9 +343,17 @@ export interface VoiceList {
331
343
  page: number;
332
344
  pageSize: number;
333
345
  }
346
+ export interface VoiceMetadataOptions {
347
+ languageCodes: VoiceLanguageCode[];
348
+ genderCodes: VoiceGender[];
349
+ ageCodes: VoiceAge[];
350
+ toneCodes: VoiceTone[];
351
+ toneMaxItems: number;
352
+ accentCodesByLanguage: Record<VoiceLanguageCode, VoiceAccent[]>;
353
+ }
334
354
  export interface VoiceSearchParams {
335
355
  search?: string;
336
- languageCode?: string;
356
+ languageCode?: VoiceLanguageCode;
337
357
  origin?: "designed" | "cloned" | string;
338
358
  voiceType?: "all" | "default" | "personal" | string;
339
359
  sort?: "created_at_unix" | "name" | string;
@@ -341,6 +361,8 @@ export interface VoiceSearchParams {
341
361
  nextPageToken?: string;
342
362
  page?: number;
343
363
  pageSize?: number;
364
+ favoritesOnly?: boolean;
365
+ tags?: string[];
344
366
  }
345
367
  export interface GenericStatus {
346
368
  status: string;
@@ -356,8 +378,8 @@ export interface VoiceClonePreviewRequest {
356
378
  file?: UploadData | UploadFile;
357
379
  files?: Array<UploadData | UploadFile>;
358
380
  description?: string;
359
- labels?: Record<string, string>;
360
381
  removeBackgroundNoise?: boolean;
382
+ languageCode?: VoiceLanguageCode;
361
383
  text?: string;
362
384
  instructions?: string;
363
385
  }
@@ -368,10 +390,14 @@ export interface VoiceClonePreview {
368
390
  export interface VoiceEditRequest {
369
391
  name?: string;
370
392
  description?: string;
371
- labels?: Record<string, string>;
393
+ tags?: string[];
372
394
  primaryCategoryCode?: string;
373
395
  visibility?: "private" | "public" | string;
374
- languageCode?: string;
396
+ languageCode?: VoiceLanguageCode;
397
+ gender?: VoiceGender | null;
398
+ age?: VoiceAge | null;
399
+ tone?: VoiceTone[];
400
+ accent?: VoiceAccent | null;
375
401
  file?: UploadData | UploadFile;
376
402
  files?: Array<UploadData | UploadFile>;
377
403
  }
@@ -379,7 +405,7 @@ export interface VoiceDesignRequest {
379
405
  voiceDescription: string;
380
406
  text?: string;
381
407
  modelId?: string;
382
- languageCode?: string;
408
+ languageCode?: VoiceLanguageCode;
383
409
  autoGenerateText?: boolean;
384
410
  loudness?: number;
385
411
  quality?: number;
@@ -401,11 +427,15 @@ export interface SaveVoiceRequest {
401
427
  generatedVoiceId: string;
402
428
  voiceName: string;
403
429
  voiceDescription?: string | null;
404
- labels?: Record<string, string>;
430
+ tags?: string[];
405
431
  primaryCategoryCode?: string;
406
432
  visibility?: "private" | "public" | string;
407
433
  playedNotSelectedVoiceIds?: string[];
408
- languageCode?: string;
434
+ languageCode: VoiceLanguageCode;
435
+ gender?: VoiceGender | null;
436
+ age?: VoiceAge | null;
437
+ tone?: VoiceTone[];
438
+ accent?: VoiceAccent | null;
409
439
  }
410
440
  export interface HistoryItem {
411
441
  historyItemId: string;
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "0.9.0";
1
+ export declare const SDK_VERSION = "0.11.0";
2
2
  export declare const SDK_NAME = "@breeze.blue/sdk";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const SDK_VERSION = "0.9.0";
1
+ export const SDK_VERSION = "0.11.0";
2
2
  export const SDK_NAME = "@breeze.blue/sdk";
@@ -0,0 +1,14 @@
1
+ export declare const VOICE_GENDER_CODES: readonly ["male", "female", "neutral"];
2
+ export declare const VOICE_AGE_CODES: readonly ["child", "young", "middle_aged", "old"];
3
+ export declare const VOICE_TONE_CODES: readonly ["warm", "calm", "bright", "gentle", "energetic", "authoritative", "sincere", "weary", "precise", "refined", "urgent", "friendly", "articulate", "steady", "playful", "compassionate", "reflective", "measured", "rhythmic", "passionate"];
4
+ export declare const VOICE_LANGUAGE_CODES: readonly ["ar", "cs", "de", "el", "en", "es", "fi", "fr", "hi", "id", "it", "ja", "ko", "nl", "pl", "pt", "ro", "ru", "th", "tr", "uk", "vi", "zh"];
5
+ export declare const VOICE_TONE_MAX_ITEMS: 3;
6
+ export declare const VOICE_ACCENT_CODES_BY_LANGUAGE: {
7
+ readonly en: readonly ["american", "british", "scottish", "irish", "australian", "canadian", "us_southern", "us_new_york", "indian", "south_african", "russian", "japanese", "korean", "chinese"];
8
+ readonly zh: readonly ["mandarin_guangdong", "mandarin_northeastern", "mandarin_shaanxi", "mandarin_shanghai", "mandarin_sichuan", "mandarin_yunnan", "mandarin_henan", "cantonese"];
9
+ };
10
+ export type VoiceGender = (typeof VOICE_GENDER_CODES)[number];
11
+ export type VoiceAge = (typeof VOICE_AGE_CODES)[number];
12
+ export type VoiceTone = (typeof VOICE_TONE_CODES)[number];
13
+ export type VoiceLanguageCode = (typeof VOICE_LANGUAGE_CODES)[number];
14
+ export type VoiceAccent = (typeof VOICE_ACCENT_CODES_BY_LANGUAGE)[keyof typeof VOICE_ACCENT_CODES_BY_LANGUAGE][number];
@@ -0,0 +1,10 @@
1
+ // Generated from contracts/voice-metadata.json. Do not edit manually.
2
+ export const VOICE_GENDER_CODES = ["male", "female", "neutral"];
3
+ export const VOICE_AGE_CODES = ["child", "young", "middle_aged", "old"];
4
+ export const VOICE_TONE_CODES = ["warm", "calm", "bright", "gentle", "energetic", "authoritative", "sincere", "weary", "precise", "refined", "urgent", "friendly", "articulate", "steady", "playful", "compassionate", "reflective", "measured", "rhythmic", "passionate"];
5
+ export const VOICE_LANGUAGE_CODES = ["ar", "cs", "de", "el", "en", "es", "fi", "fr", "hi", "id", "it", "ja", "ko", "nl", "pl", "pt", "ro", "ru", "th", "tr", "uk", "vi", "zh"];
6
+ export const VOICE_TONE_MAX_ITEMS = 3;
7
+ export const VOICE_ACCENT_CODES_BY_LANGUAGE = {
8
+ en: ["american", "british", "scottish", "irish", "australian", "canadian", "us_southern", "us_new_york", "indian", "south_african", "russian", "japanese", "korean", "chinese"],
9
+ zh: ["mandarin_guangdong", "mandarin_northeastern", "mandarin_shaanxi", "mandarin_shanghai", "mandarin_sichuan", "mandarin_yunnan", "mandarin_henan", "cantonese"],
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breeze.blue/sdk",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "description": "ESM-first TypeScript SDK for the Breeze Blue Developer API.",
5
5
  "license": "MIT",
6
6
  "author": "Breeze Blue <support@breeze.blue>",