@breeze.blue/sdk 0.13.0 → 0.15.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 +10 -0
- package/README.md +8 -0
- package/dist/client.d.ts +3 -1
- package/dist/client.js +5 -0
- package/dist/types.d.ts +18 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/voice-metadata.d.ts +1 -1
- package/dist/voice-metadata.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
- Added `previewLanguageCode` to Voice Clone previews independently of the reference audio language hint.
|
|
6
|
+
- Expanded voice language metadata for the Multilingual-51 model.
|
|
7
|
+
|
|
8
|
+
## 0.14.0
|
|
9
|
+
|
|
10
|
+
- Added `account.currentApiKey()` for checking the authenticating key's status
|
|
11
|
+
and current Key Budget counters before starting work.
|
|
12
|
+
|
|
3
13
|
## 0.13.0
|
|
4
14
|
|
|
5
15
|
- `voices.random(...)` accepts optional `languageCode` and `voiceType`
|
package/README.md
CHANGED
|
@@ -530,6 +530,8 @@ language-to-accent cascade at runtime.
|
|
|
530
530
|
```ts
|
|
531
531
|
const models = await client.models.list();
|
|
532
532
|
const balance = await client.account.balance();
|
|
533
|
+
const currentKey = (await client.account.currentApiKey()).apiKey;
|
|
534
|
+
console.log(currentKey.status, currentKey.creditRemaining);
|
|
533
535
|
const usage = await client.account.usage({ days: 7 });
|
|
534
536
|
const keyUsage = await client.account.usage({
|
|
535
537
|
apiKeyId: "key_01hprod",
|
|
@@ -571,3 +573,9 @@ try {
|
|
|
571
573
|
```
|
|
572
574
|
|
|
573
575
|
Each API error exposes `status`, `code`, `detail`, `meta`, and `headers`.
|
|
576
|
+
|
|
577
|
+
Clone previews identify the reference audio language and preview text language independently. Use `previewLanguageCode` for an explicit target hint when the text is ambiguous. Reference language hints do not override audio recognition; save cross-language previews with the original reference language.
|
|
578
|
+
|
|
579
|
+
### HTTP TTS speed
|
|
580
|
+
|
|
581
|
+
Pass `voiceSettings: { speed: 1.25 }` to control speech speed without changing pitch, from 0.5 to 2.0. Omission always means 1.0; saved voice speed is not inherited. Sync, async and HTTP streaming support this parameter; Realtime does not.
|
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, VoiceDesignStreamRequest, VoiceEditRequest, VoiceList, VoiceMetadataOptions, VoiceRandomParams, VoiceSearchParams, VoiceSettings } from "./types.js";
|
|
2
|
+
import type { AudioRequestOptions, BreezeBlueWebSocket, AsyncTextToSpeechJob, Balance, BreezeBlueClientOptions, CurrentApiKeyResponse, 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, VoiceDesignStreamRequest, VoiceEditRequest, VoiceList, VoiceMetadataOptions, VoiceRandomParams, VoiceSearchParams, VoiceSettings } from "./types.js";
|
|
3
3
|
export declare class BreezeBlueClient {
|
|
4
4
|
readonly apiKey: string | undefined;
|
|
5
5
|
readonly baseUrl: string;
|
|
@@ -267,6 +267,8 @@ declare class AccountResource {
|
|
|
267
267
|
private readonly client;
|
|
268
268
|
constructor(client: BreezeBlueClient);
|
|
269
269
|
balance(options?: RequestOptions): Promise<Balance>;
|
|
270
|
+
/** Return the authenticating API key and its current Key Budget counters. */
|
|
271
|
+
currentApiKey(options?: RequestOptions): Promise<CurrentApiKeyResponse>;
|
|
270
272
|
usage(params?: UsageParams, options?: RequestOptions): Promise<Usage>;
|
|
271
273
|
}
|
|
272
274
|
export {};
|
package/dist/client.js
CHANGED
|
@@ -1625,6 +1625,10 @@ class AccountResource {
|
|
|
1625
1625
|
balance(options) {
|
|
1626
1626
|
return this.client.requestJson("GET", "/v1/balance", undefined, undefined, options);
|
|
1627
1627
|
}
|
|
1628
|
+
/** Return the authenticating API key and its current Key Budget counters. */
|
|
1629
|
+
currentApiKey(options) {
|
|
1630
|
+
return this.client.requestJson("GET", "/v1/api-keys/current", undefined, undefined, options);
|
|
1631
|
+
}
|
|
1628
1632
|
usage(params = {}, options) {
|
|
1629
1633
|
return this.client.requestJson("GET", "/v1/usage", params, undefined, options);
|
|
1630
1634
|
}
|
|
@@ -1727,6 +1731,7 @@ function clonePreviewForm(request) {
|
|
|
1727
1731
|
form.set("name", request.name);
|
|
1728
1732
|
appendOptional(form, "description", request.description);
|
|
1729
1733
|
appendOptional(form, "language_code", request.languageCode);
|
|
1734
|
+
appendOptional(form, "preview_language_code", request.previewLanguageCode);
|
|
1730
1735
|
appendOptional(form, "text", request.text);
|
|
1731
1736
|
appendOptional(form, "instructions", request.instructions);
|
|
1732
1737
|
for (const file of normalizeFiles(request.file, request.files, { required: true })) {
|
package/dist/types.d.ts
CHANGED
|
@@ -230,6 +230,7 @@ export interface VoiceSettings {
|
|
|
230
230
|
similarityBoost?: number;
|
|
231
231
|
style?: number;
|
|
232
232
|
useSpeakerBoost?: boolean;
|
|
233
|
+
/** Request-only, pitch-preserving HTTP TTS speed (0.5–2.0). Omitted means 1.0. */
|
|
233
234
|
speed?: number;
|
|
234
235
|
guidanceScale?: number | null;
|
|
235
236
|
}
|
|
@@ -300,6 +301,7 @@ export interface Model {
|
|
|
300
301
|
}
|
|
301
302
|
export interface Voice {
|
|
302
303
|
voiceId: string;
|
|
304
|
+
/** Account display name, including a personal alias for a saved public voice. */
|
|
303
305
|
name: string;
|
|
304
306
|
origin: string;
|
|
305
307
|
voiceType: string;
|
|
@@ -390,7 +392,10 @@ export interface VoiceClonePreviewRequest {
|
|
|
390
392
|
files?: Array<UploadData | UploadFile>;
|
|
391
393
|
description?: string;
|
|
392
394
|
removeBackgroundNoise?: boolean;
|
|
395
|
+
/** Reference language hint; audio recognition remains authoritative. */
|
|
393
396
|
languageCode?: VoiceLanguageCode;
|
|
397
|
+
/** Target hint used when preview text language is uncertain. */
|
|
398
|
+
previewLanguageCode?: VoiceLanguageCode;
|
|
394
399
|
text?: string;
|
|
395
400
|
instructions?: string;
|
|
396
401
|
}
|
|
@@ -508,6 +513,19 @@ export interface Balance {
|
|
|
508
513
|
topups: BalanceTopup[];
|
|
509
514
|
[key: string]: unknown;
|
|
510
515
|
}
|
|
516
|
+
export interface CurrentApiKey {
|
|
517
|
+
id: string;
|
|
518
|
+
name: string;
|
|
519
|
+
prefix: string;
|
|
520
|
+
status: string;
|
|
521
|
+
creditLimit?: number | null;
|
|
522
|
+
creditUsed?: number;
|
|
523
|
+
creditReserved?: number;
|
|
524
|
+
creditRemaining?: number | null;
|
|
525
|
+
}
|
|
526
|
+
export interface CurrentApiKeyResponse {
|
|
527
|
+
apiKey: CurrentApiKey;
|
|
528
|
+
}
|
|
511
529
|
export interface UsageSummary {
|
|
512
530
|
requestCount: number;
|
|
513
531
|
totalTextCharacters: number;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.15.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.
|
|
1
|
+
export const SDK_VERSION = "0.15.0";
|
|
2
2
|
export const SDK_NAME = "@breeze.blue/sdk";
|
package/dist/voice-metadata.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const VOICE_GENDER_CODES: readonly ["male", "female", "neutral"];
|
|
2
2
|
export declare const VOICE_AGE_CODES: readonly ["child", "young", "middle_aged", "old"];
|
|
3
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"];
|
|
4
|
+
export declare const VOICE_LANGUAGE_CODES: readonly ["af", "ar", "bg", "bn", "bs", "ca", "cs", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fr", "gl", "he", "hi", "hu", "id", "is", "it", "ja", "kn", "ko", "lt", "mr", "ms", "ne", "nl", "no", "pl", "pt", "ro", "ru", "sk", "sl", "sq", "sv", "sw", "ta", "te", "th", "tl", "tr", "uk", "ur", "vi", "zh"];
|
|
5
5
|
export declare const VOICE_TONE_MAX_ITEMS: 3;
|
|
6
6
|
export declare const VOICE_ACCENT_CODES_BY_LANGUAGE: {
|
|
7
7
|
readonly en: readonly ["american", "british", "scottish", "irish", "australian", "canadian", "us_southern", "us_new_york", "indian", "south_african", "russian", "japanese", "korean", "chinese"];
|
package/dist/voice-metadata.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export const VOICE_GENDER_CODES = ["male", "female", "neutral"];
|
|
3
3
|
export const VOICE_AGE_CODES = ["child", "young", "middle_aged", "old"];
|
|
4
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"];
|
|
5
|
+
export const VOICE_LANGUAGE_CODES = ["af", "ar", "bg", "bn", "bs", "ca", "cs", "da", "de", "el", "en", "es", "et", "eu", "fa", "fi", "fr", "gl", "he", "hi", "hu", "id", "is", "it", "ja", "kn", "ko", "lt", "mr", "ms", "ne", "nl", "no", "pl", "pt", "ro", "ru", "sk", "sl", "sq", "sv", "sw", "ta", "te", "th", "tl", "tr", "uk", "ur", "vi", "zh"];
|
|
6
6
|
export const VOICE_TONE_MAX_ITEMS = 3;
|
|
7
7
|
export const VOICE_ACCENT_CODES_BY_LANGUAGE = {
|
|
8
8
|
en: ["american", "british", "scottish", "irish", "australian", "canadian", "us_southern", "us_new_york", "indian", "south_african", "russian", "japanese", "korean", "chinese"],
|