@breeze.blue/sdk 0.20.1 → 0.21.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 +7 -7
- package/dist/client.d.ts +3 -5
- package/dist/client.js +35 -34
- package/dist/types.d.ts +22 -28
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.0
|
|
4
|
+
|
|
5
|
+
- Support request-scoped speaker boost across HTTP and realtime TTS, with performance instructions taking priority when guidance exceeds 1.
|
|
6
|
+
- Serialize documented request controls only.
|
|
7
|
+
- Honor the clone reference-denoising switch (disabled by default).
|
|
8
|
+
- Read the account's plan, billing period, monthly credits, saved voice and project limits and generation concurrency with `client.account.entitlements()`, typed as `Entitlements`.
|
|
9
|
+
- Breaking: remove `voices.getSettings(...)`, `voices.editSettings(...)`, the `VoiceSettings` type and `Voice.settings`; the voice settings endpoints are removed.
|
|
10
|
+
- TTS guidance no longer inherits saved voice settings; omitted `voiceSettings.guidanceScale` uses the default 1.
|
|
11
|
+
- Breaking: remove `voices.favorite(...)` and `voices.unfavorite(...)`; the favorite endpoints are removed. `isFavorited` and the `favoritesOnly` filter remain.
|
|
12
|
+
|
|
3
13
|
## 0.20.1
|
|
4
14
|
|
|
5
15
|
- Studio list methods type their filters: `StudioProjectListParams`, `StudioChapterListParams`, `StudioClipListParams` and `StudioFileListParams`.
|
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@ models, and account usage.
|
|
|
7
7
|
The root entrypoint is safe to import in Node, browser, and edge runtimes. Local
|
|
8
8
|
audio playback helpers live in the Node-only `@breeze.blue/sdk/node` subpath.
|
|
9
9
|
|
|
10
|
+
Guidance accepts 1–10; when omitted, the default 1 is used. HTTP speed and volume are per request and default to 1. Use `voiceSettings: { useSpeakerBoost: true }` for closer similarity to the reference voice (default false): it is ignored with non-empty instructions and guidance above 1, and otherwise instructions are not used. Realtime fixes boost at session creation; create a new session to change instructions while boost applies. Pass `removeBackgroundNoise: true` to denoise a clone sample (default false).
|
|
11
|
+
|
|
10
12
|
## Install
|
|
11
13
|
|
|
12
14
|
```sh
|
|
@@ -421,7 +423,6 @@ const taggedFavorites = await client.voices.search({
|
|
|
421
423
|
const firstVoiceId = voices.voices[0].voiceId;
|
|
422
424
|
|
|
423
425
|
const voice = await client.voices.get(firstVoiceId);
|
|
424
|
-
const settings = await client.voices.getSettings(firstVoiceId);
|
|
425
426
|
|
|
426
427
|
const randomVoice = await client.voices.random();
|
|
427
428
|
console.log(randomVoice.voiceId, randomVoice.name);
|
|
@@ -563,7 +564,7 @@ const saved = await client.voices.savePreview({
|
|
|
563
564
|
});
|
|
564
565
|
```
|
|
565
566
|
|
|
566
|
-
Edit
|
|
567
|
+
Edit or delete a saved voice:
|
|
567
568
|
|
|
568
569
|
```ts
|
|
569
570
|
await client.voices.edit(saved.voiceId, {
|
|
@@ -573,11 +574,8 @@ await client.voices.edit(saved.voiceId, {
|
|
|
573
574
|
});
|
|
574
575
|
// null clears nullable metadata; [] clears tone. Omitted fields remain unchanged.
|
|
575
576
|
await client.voices.edit(saved.voiceId, { accent: null, tone: [] });
|
|
576
|
-
await client.voices.editSettings(saved.voiceId, { guidanceScale: 1.2 });
|
|
577
|
-
await client.voices.favorite(firstVoiceId);
|
|
578
577
|
await client.voices.updateTags(firstVoiceId, ["narration", "novel=三体"]);
|
|
579
578
|
await client.voices.updateTags(firstVoiceId, []); // Resume owner tag inheritance.
|
|
580
|
-
await client.voices.unfavorite(firstVoiceId);
|
|
581
579
|
await client.voices.delete(saved.voiceId);
|
|
582
580
|
```
|
|
583
581
|
|
|
@@ -592,6 +590,8 @@ language-to-accent cascade at runtime.
|
|
|
592
590
|
```ts
|
|
593
591
|
const models = await client.models.list();
|
|
594
592
|
const balance = await client.account.balance();
|
|
593
|
+
const entitlements = await client.account.entitlements();
|
|
594
|
+
console.log(entitlements.planCode, entitlements.maxConcurrentGenerations);
|
|
595
595
|
const currentKey = (await client.account.currentApiKey()).apiKey;
|
|
596
596
|
console.log(currentKey.status, currentKey.creditRemaining);
|
|
597
597
|
const usage = await client.account.usage({ days: 7 });
|
|
@@ -640,9 +640,9 @@ Clone previews automatically generate a short script in the detected reference a
|
|
|
640
640
|
|
|
641
641
|
### HTTP TTS speed
|
|
642
642
|
|
|
643
|
-
Pass `voiceSettings: { speed: 1.25 }` to control speech speed without changing pitch, from 0.5 to 2.0. Omission always means 1.0
|
|
643
|
+
Pass `voiceSettings: { speed: 1.25 }` to control speech speed without changing pitch, from 0.5 to 2.0. Omission always means 1.0. Sync, async and HTTP streaming support this parameter; Realtime does not.
|
|
644
644
|
|
|
645
|
-
Pass `voiceSettings: { volume: 1.5 }` to apply a request-level linear amplitude multiplier. Values range from 0.01 to 2.0; omission means 1.0. Values above 1.0 may clip peaks. Sync, async and HTTP streaming support this parameter;
|
|
645
|
+
Pass `voiceSettings: { volume: 1.5 }` to apply a request-level linear amplitude multiplier. Values range from 0.01 to 2.0; omission means 1.0. Values above 1.0 may clip peaks. Sync, async and HTTP streaming support this parameter; Realtime does not.
|
|
646
646
|
|
|
647
647
|
## Word timing
|
|
648
648
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StudioResource } from "./studio.js";
|
|
2
2
|
import { SpeechTimingStream, type SpeechWithTimestamps } from "./timestamps.js";
|
|
3
3
|
import { AudioResponse } from "./audio.js";
|
|
4
|
-
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, VoiceLocalizeJob, VoiceLocalizePreviewRequest, VoiceLocalizePreviewStatus, VoiceRemixPreviewRequest, VoiceRemixPrepareRequest, VoiceRemixPresets, VoiceRemixPreparation, VoiceRemixJob, VoiceRemixPreviewStatus, VoiceMetadataOptions, VoiceRandomParams, VoiceSearchParams
|
|
4
|
+
import type { AudioRequestOptions, BreezeBlueWebSocket, AsyncTextToSpeechJob, Balance, BreezeBlueClientOptions, CurrentApiKeyResponse, Entitlements, 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, VoiceLocalizeJob, VoiceLocalizePreviewRequest, VoiceLocalizePreviewStatus, VoiceRemixPreviewRequest, VoiceRemixPrepareRequest, VoiceRemixPresets, VoiceRemixPreparation, VoiceRemixJob, VoiceRemixPreviewStatus, VoiceMetadataOptions, VoiceRandomParams, VoiceSearchParams } from "./types.js";
|
|
5
5
|
export declare class BreezeBlueClient {
|
|
6
6
|
readonly apiKey: string | undefined;
|
|
7
7
|
readonly baseUrl: string;
|
|
@@ -232,11 +232,7 @@ declare class VoicesResource {
|
|
|
232
232
|
metadataOptions(options?: RequestOptions): Promise<VoiceMetadataOptions>;
|
|
233
233
|
edit(voiceId: string, request: VoiceEditRequest, options?: RequestOptions): Promise<GenericStatus>;
|
|
234
234
|
updateTags(voiceId: string, tags: string[], options?: RequestOptions): Promise<Voice>;
|
|
235
|
-
favorite(voiceId: string, options?: RequestOptions): Promise<Voice>;
|
|
236
|
-
unfavorite(voiceId: string, options?: RequestOptions): Promise<Voice>;
|
|
237
235
|
delete(voiceId: string, options?: RequestOptions): Promise<GenericStatus>;
|
|
238
|
-
getSettings(voiceId: string, options?: RequestOptions): Promise<Required<VoiceSettings>>;
|
|
239
|
-
editSettings(voiceId: string, settings: VoiceSettings, options?: RequestOptions): Promise<Required<VoiceSettings>>;
|
|
240
236
|
/**
|
|
241
237
|
* Generate a clone preview from a single audio sample. Returns a
|
|
242
238
|
* `generatedVoiceId`; call {@link savePreview} after the user accepts
|
|
@@ -298,6 +294,8 @@ declare class AccountResource {
|
|
|
298
294
|
private readonly client;
|
|
299
295
|
constructor(client: BreezeBlueClient);
|
|
300
296
|
balance(options?: RequestOptions): Promise<Balance>;
|
|
297
|
+
/** Return the account's plan, billing period and generation limits. */
|
|
298
|
+
entitlements(options?: RequestOptions): Promise<Entitlements>;
|
|
301
299
|
/** Return the authenticating API key and its current Key Budget counters. */
|
|
302
300
|
currentApiKey(options?: RequestOptions): Promise<CurrentApiKeyResponse>;
|
|
303
301
|
usage(params?: UsageParams, options?: RequestOptions): Promise<Usage>;
|
package/dist/client.js
CHANGED
|
@@ -105,6 +105,18 @@ export class BreezeBlueClient {
|
|
|
105
105
|
return headers;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
function ttsRequest(request) {
|
|
109
|
+
const { text, modelId, languageCode, instructions, voiceSettings } = request;
|
|
110
|
+
return {
|
|
111
|
+
text, modelId, languageCode, instructions,
|
|
112
|
+
voiceSettings: voiceSettings == null ? voiceSettings : {
|
|
113
|
+
guidanceScale: voiceSettings.guidanceScale,
|
|
114
|
+
useSpeakerBoost: voiceSettings.useSpeakerBoost,
|
|
115
|
+
speed: voiceSettings.speed,
|
|
116
|
+
volume: voiceSettings.volume,
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
108
120
|
class TextToSpeechResource {
|
|
109
121
|
client;
|
|
110
122
|
realtime;
|
|
@@ -113,26 +125,25 @@ class TextToSpeechResource {
|
|
|
113
125
|
this.realtime = new RealtimeTextToSpeechResource(client);
|
|
114
126
|
}
|
|
115
127
|
convert(voiceId, request, options = {}) {
|
|
116
|
-
return this.client.requestAudio("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}`, { outputFormat: options.outputFormat }, request, options);
|
|
128
|
+
return this.client.requestAudio("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}`, { outputFormat: options.outputFormat }, ttsRequest(request), options);
|
|
117
129
|
}
|
|
118
130
|
createJob(voiceId, request, options = {}) {
|
|
119
|
-
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}`, { outputFormat: options.outputFormat, delivery: "async" }, request, options);
|
|
131
|
+
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}`, { outputFormat: options.outputFormat, delivery: "async" }, ttsRequest(request), options);
|
|
120
132
|
}
|
|
121
133
|
createJobWithTimestamps(voiceId, request, options = {}) {
|
|
122
|
-
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/with-timestamps`, { outputFormat: options.outputFormat, delivery: "async" }, request, options);
|
|
134
|
+
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/with-timestamps`, { outputFormat: options.outputFormat, delivery: "async" }, ttsRequest(request), options);
|
|
123
135
|
}
|
|
124
136
|
stream(voiceId, request, options = {}) {
|
|
125
137
|
return this.client.requestAudio("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/stream`, {
|
|
126
138
|
outputFormat: options.outputFormat,
|
|
127
|
-
optimizeStreamingLatency: options.optimizeStreamingLatency,
|
|
128
139
|
enableLogging: options.enableLogging,
|
|
129
|
-
}, request, options);
|
|
140
|
+
}, ttsRequest(request), options);
|
|
130
141
|
}
|
|
131
142
|
convertWithTimestamps(voiceId, request, options = {}) {
|
|
132
|
-
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/with-timestamps`, { outputFormat: options.outputFormat }, request, options);
|
|
143
|
+
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/with-timestamps`, { outputFormat: options.outputFormat }, ttsRequest(request), options);
|
|
133
144
|
}
|
|
134
145
|
async streamWithTimestamps(voiceId, request, options = {}) {
|
|
135
|
-
const response = await this.client.request("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/stream/with-timestamps`, { outputFormat: options.outputFormat,
|
|
146
|
+
const response = await this.client.request("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/stream/with-timestamps`, { outputFormat: options.outputFormat, enableLogging: options.enableLogging }, { ...ttsRequest(request), timestampMode: request.timestampMode }, options);
|
|
136
147
|
return new SpeechTimingStream(response);
|
|
137
148
|
}
|
|
138
149
|
enhance(request, options) {
|
|
@@ -145,7 +156,14 @@ class RealtimeTextToSpeechResource {
|
|
|
145
156
|
this.client = client;
|
|
146
157
|
}
|
|
147
158
|
createSession(voiceId, request = {}, options) {
|
|
148
|
-
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/realtime-sessions`, undefined,
|
|
159
|
+
return this.client.requestJson("POST", `/v1/text-to-speech/${encodeURIComponent(voiceId)}/realtime-sessions`, undefined, {
|
|
160
|
+
modelId: request.modelId,
|
|
161
|
+
languageCode: request.languageCode,
|
|
162
|
+
instructions: request.instructions,
|
|
163
|
+
voiceSettings: request.voiceSettings == null ? request.voiceSettings : { guidanceScale: request.voiceSettings.guidanceScale, useSpeakerBoost: request.voiceSettings.useSpeakerBoost },
|
|
164
|
+
inactivityTimeoutSeconds: request.inactivityTimeoutSeconds,
|
|
165
|
+
enableLogging: request.enableLogging,
|
|
166
|
+
}, options);
|
|
149
167
|
}
|
|
150
168
|
async connect(voiceId, options = {}) {
|
|
151
169
|
if ((options.clientSecret !== undefined ||
|
|
@@ -1543,24 +1561,9 @@ class VoicesResource {
|
|
|
1543
1561
|
const result = await this.client.requestJson("PUT", `/v1/voices/${encodeURIComponent(voiceId)}/tags`, undefined, { tags }, options);
|
|
1544
1562
|
return stripHiddenVoiceFields(result);
|
|
1545
1563
|
}
|
|
1546
|
-
async favorite(voiceId, options) {
|
|
1547
|
-
const result = await this.client.requestJson("PUT", `/v1/voices/${encodeURIComponent(voiceId)}/favorite`, undefined, undefined, options);
|
|
1548
|
-
return stripHiddenVoiceFields(result);
|
|
1549
|
-
}
|
|
1550
|
-
async unfavorite(voiceId, options) {
|
|
1551
|
-
const result = await this.client.requestJson("DELETE", `/v1/voices/${encodeURIComponent(voiceId)}/favorite`, undefined, undefined, options);
|
|
1552
|
-
return stripHiddenVoiceFields(result);
|
|
1553
|
-
}
|
|
1554
1564
|
delete(voiceId, options) {
|
|
1555
1565
|
return this.client.requestJson("DELETE", `/v1/voices/${encodeURIComponent(voiceId)}`, undefined, undefined, options);
|
|
1556
1566
|
}
|
|
1557
|
-
// -- voice settings ---------------------------------------------------
|
|
1558
|
-
getSettings(voiceId, options) {
|
|
1559
|
-
return this.client.requestJson("GET", `/v1/voices/${encodeURIComponent(voiceId)}/settings`, undefined, undefined, options);
|
|
1560
|
-
}
|
|
1561
|
-
editSettings(voiceId, settings, options) {
|
|
1562
|
-
return this.client.requestJson("PATCH", `/v1/voices/${encodeURIComponent(voiceId)}/settings`, undefined, settings, options);
|
|
1563
|
-
}
|
|
1564
1567
|
// -- two-step preview → save flow -------------------------------------
|
|
1565
1568
|
/**
|
|
1566
1569
|
* Generate a clone preview from a single audio sample. Returns a
|
|
@@ -1576,14 +1579,16 @@ class VoicesResource {
|
|
|
1576
1579
|
* {@link savePreview}.
|
|
1577
1580
|
*/
|
|
1578
1581
|
createDesignPreview(request, options = {}) {
|
|
1579
|
-
|
|
1582
|
+
const { voiceDescription, text, modelId, languageCode, guidanceScale, previewCount } = request;
|
|
1583
|
+
return this.client.requestJson("POST", "/v1/voice-previews/design", { outputFormat: options.outputFormat }, { voiceDescription, text, modelId, languageCode, guidanceScale, previewCount }, options);
|
|
1580
1584
|
}
|
|
1581
1585
|
/**
|
|
1582
1586
|
* Generate exactly one voice design preview as live 24 kHz mono PCM.
|
|
1583
1587
|
* A clean end means `generatedVoiceId` is ready for {@link savePreview}.
|
|
1584
1588
|
*/
|
|
1585
1589
|
streamDesignPreview(request, options) {
|
|
1586
|
-
return this.client.requestAudio("POST", "/v1/voice-previews/design/stream", undefined, request,
|
|
1590
|
+
return this.client.requestAudio("POST", "/v1/voice-previews/design/stream", undefined, { voiceDescription: request.voiceDescription, text: request.text, modelId: request.modelId,
|
|
1591
|
+
languageCode: request.languageCode, guidanceScale: request.guidanceScale }, options);
|
|
1587
1592
|
}
|
|
1588
1593
|
/** List curated voice changes and their sample recordings. */
|
|
1589
1594
|
listRemixPresets(options) {
|
|
@@ -1631,7 +1636,6 @@ class VoicesResource {
|
|
|
1631
1636
|
tags: request.tags,
|
|
1632
1637
|
primaryCategoryCode: request.primaryCategoryCode,
|
|
1633
1638
|
visibility: request.visibility,
|
|
1634
|
-
playedNotSelectedVoiceIds: request.playedNotSelectedVoiceIds,
|
|
1635
1639
|
languageCode: request.languageCode,
|
|
1636
1640
|
gender: request.gender,
|
|
1637
1641
|
age: request.age,
|
|
@@ -1676,6 +1680,10 @@ class AccountResource {
|
|
|
1676
1680
|
balance(options) {
|
|
1677
1681
|
return this.client.requestJson("GET", "/v1/balance", undefined, undefined, options);
|
|
1678
1682
|
}
|
|
1683
|
+
/** Return the account's plan, billing period and generation limits. */
|
|
1684
|
+
entitlements(options) {
|
|
1685
|
+
return this.client.requestJson("GET", "/v1/entitlements", undefined, undefined, options);
|
|
1686
|
+
}
|
|
1679
1687
|
/** Return the authenticating API key and its current Key Budget counters. */
|
|
1680
1688
|
currentApiKey(options) {
|
|
1681
1689
|
return this.client.requestJson("GET", "/v1/api-keys/current", undefined, undefined, options);
|
|
@@ -1778,17 +1786,10 @@ function clonePreviewForm(request) {
|
|
|
1778
1786
|
if (request.name != null && typeof request.name !== "string") {
|
|
1779
1787
|
throw new BreezeBlueConfigurationError("Clone name must be a string or null.");
|
|
1780
1788
|
}
|
|
1781
|
-
if (request.removeBackgroundNoise) {
|
|
1782
|
-
throw new BreezeBlueConfigurationError("removeBackgroundNoise is not supported by the Breeze Developer API.");
|
|
1783
|
-
}
|
|
1784
|
-
for (const field of ["text", "instructions", "languageCode", "previewLanguageCode"]) {
|
|
1785
|
-
if (field in request) {
|
|
1786
|
-
throw new BreezeBlueConfigurationError(`Clone previews do not accept ${field}; the script and language are generated automatically.`);
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
1789
|
const form = new FormData();
|
|
1790
1790
|
appendOptional(form, "name", request.name ?? undefined);
|
|
1791
1791
|
appendOptional(form, "description", request.description);
|
|
1792
|
+
appendOptional(form, "remove_background_noise", request.removeBackgroundNoise ?? false);
|
|
1792
1793
|
for (const file of normalizeFiles(request.file, request.files, { required: true })) {
|
|
1793
1794
|
appendFile(form, "files", file);
|
|
1794
1795
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export interface AudioRequestOptions extends RequestOptions {
|
|
|
23
23
|
outputFormat?: string;
|
|
24
24
|
}
|
|
25
25
|
export interface StreamTextToSpeechOptions extends AudioRequestOptions {
|
|
26
|
-
optimizeStreamingLatency?: number;
|
|
27
26
|
enableLogging?: boolean;
|
|
28
27
|
}
|
|
29
28
|
export type BreezeBlueWebSocketConstructor = new (url: string, protocols?: string | string[]) => BreezeBlueWebSocket;
|
|
@@ -42,9 +41,7 @@ export interface RealtimeTextToSpeechSessionRequest {
|
|
|
42
41
|
modelId?: string;
|
|
43
42
|
languageCode?: string;
|
|
44
43
|
instructions?: string;
|
|
45
|
-
voiceSettings?:
|
|
46
|
-
guidanceScale?: number | null;
|
|
47
|
-
};
|
|
44
|
+
voiceSettings?: Pick<TtsVoiceSettings, "guidanceScale" | "useSpeakerBoost">;
|
|
48
45
|
inactivityTimeoutSeconds?: number;
|
|
49
46
|
enableLogging?: boolean;
|
|
50
47
|
}
|
|
@@ -226,18 +223,15 @@ export interface RealtimeTextToSpeechAudioMessage {
|
|
|
226
223
|
audio: Uint8Array;
|
|
227
224
|
}
|
|
228
225
|
export type RealtimeTextToSpeechMessage = RealtimeTextToSpeechEvent | RealtimeTextToSpeechAudioMessage;
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
226
|
+
/** Per-request controls. */
|
|
227
|
+
export interface TtsVoiceSettings {
|
|
228
|
+
/** Generation guidance strength (1–10). Omitted or null uses the default 1. */
|
|
229
|
+
guidanceScale?: number | null;
|
|
230
|
+
/** Default false. Ignored with non-empty instructions and guidanceScale > 1; otherwise instructions are not used. */
|
|
233
231
|
useSpeakerBoost?: boolean;
|
|
234
|
-
/**
|
|
232
|
+
/** Pitch-preserving speed (0.5–2.0). */
|
|
235
233
|
speed?: number;
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
/** Request-only HTTP TTS settings. Volume is a linear amplitude multiplier. */
|
|
239
|
-
export interface TtsVoiceSettings extends VoiceSettings {
|
|
240
|
-
/** Linear amplitude multiplier (0.01–2.0); omitted means 1.0. */
|
|
234
|
+
/** Linear amplitude multiplier (0.01–2.0). */
|
|
241
235
|
volume?: number;
|
|
242
236
|
}
|
|
243
237
|
export interface PronunciationDictionaryLocator {
|
|
@@ -250,14 +244,6 @@ export interface TextToSpeechRequest {
|
|
|
250
244
|
languageCode?: string;
|
|
251
245
|
instructions?: string;
|
|
252
246
|
voiceSettings?: TtsVoiceSettings;
|
|
253
|
-
seed?: number;
|
|
254
|
-
pronunciationDictionaryLocators?: PronunciationDictionaryLocator[];
|
|
255
|
-
previousText?: string;
|
|
256
|
-
nextText?: string;
|
|
257
|
-
previousRequestIds?: string[];
|
|
258
|
-
nextRequestIds?: string[];
|
|
259
|
-
applyTextNormalization?: string;
|
|
260
|
-
applyLanguageTextNormalization?: boolean;
|
|
261
247
|
}
|
|
262
248
|
export interface TtsEnhanceRequest {
|
|
263
249
|
instruction: string;
|
|
@@ -315,7 +301,6 @@ export interface Voice {
|
|
|
315
301
|
tags: string[];
|
|
316
302
|
isFavorited: boolean;
|
|
317
303
|
previewUrl?: string | null;
|
|
318
|
-
settings: Required<VoiceSettings>;
|
|
319
304
|
description?: string | null;
|
|
320
305
|
createdAtUnix?: number | null;
|
|
321
306
|
primaryCategoryCode?: string | null;
|
|
@@ -430,10 +415,6 @@ export interface VoiceDesignRequest {
|
|
|
430
415
|
text?: string;
|
|
431
416
|
modelId?: string;
|
|
432
417
|
languageCode?: VoiceLanguageCode;
|
|
433
|
-
autoGenerateText?: boolean;
|
|
434
|
-
loudness?: number;
|
|
435
|
-
quality?: number;
|
|
436
|
-
seed?: number;
|
|
437
418
|
guidanceScale?: number | null;
|
|
438
419
|
previewCount?: number;
|
|
439
420
|
}
|
|
@@ -528,7 +509,6 @@ export interface SaveVoiceRequest {
|
|
|
528
509
|
tags?: string[];
|
|
529
510
|
primaryCategoryCode?: string;
|
|
530
511
|
visibility?: "private" | "public" | string;
|
|
531
|
-
playedNotSelectedVoiceIds?: string[];
|
|
532
512
|
languageCode: VoiceLanguageCode;
|
|
533
513
|
gender?: VoiceGender | null;
|
|
534
514
|
age?: VoiceAge | null;
|
|
@@ -588,6 +568,20 @@ export interface Balance {
|
|
|
588
568
|
topups: BalanceTopup[];
|
|
589
569
|
[key: string]: unknown;
|
|
590
570
|
}
|
|
571
|
+
export interface Entitlements {
|
|
572
|
+
planCode: string;
|
|
573
|
+
status: string;
|
|
574
|
+
billingInterval: string | null;
|
|
575
|
+
cancelAtPeriodEnd: boolean;
|
|
576
|
+
currentPeriodStart: string | null;
|
|
577
|
+
currentPeriodEnd: string | null;
|
|
578
|
+
monthlyCreativeCredits: number;
|
|
579
|
+
savedVoiceLimit: number;
|
|
580
|
+
savedProjectLimit: number;
|
|
581
|
+
maxConcurrentGenerations: number;
|
|
582
|
+
studioLongFormAccess: boolean;
|
|
583
|
+
commercialUseAllowed: boolean;
|
|
584
|
+
}
|
|
591
585
|
export interface CurrentApiKey {
|
|
592
586
|
id: string;
|
|
593
587
|
name: string;
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.21.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.21.0";
|
|
2
2
|
export const SDK_NAME = "@breeze.blue/sdk";
|