Skip to content

Commit

Permalink
Release 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 16, 2024
1 parent 7896e72 commit 5a53baf
Show file tree
Hide file tree
Showing 12 changed files with 130 additions and 137 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cartesia/cartesia-js",
"version": "2.1.0",
"version": "2.1.1",
"private": false,
"repository": "https://github.com/cartesia-ai/cartesia-js",
"main": "./index.js",
Expand Down
13 changes: 5 additions & 8 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,21 +323,18 @@ await client.tts.bytes({

```typescript
const response = await client.tts.sse({
modelId: "string",
transcript: "string",
modelId: "sonic-english",
transcript: "Hello, world!",
voice: {
mode: "id",
id: "string",
experimentalControls: {
speed: 1.1,
emotion: "anger:lowest",
},
id: "694f9389-aac1-45b6-b726-9d9369183238",
},
language: "en",
outputFormat: {
container: "raw",
sampleRate: 44100,
encoding: "pcm_f32le",
},
duration: 1.1,
});
for await (const item of response) {
console.log(item);
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/apiStatus/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ export class ApiStatus {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
16 changes: 8 additions & 8 deletions src/api/resources/datasets/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export class Datasets {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -119,8 +119,8 @@ export class Datasets {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -185,8 +185,8 @@ export class Datasets {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -258,8 +258,8 @@ export class Datasets {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/tts/types/Controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import * as Cartesia from "../../../index";

export interface Controls {
speed: Cartesia.Speed;
emotion: Cartesia.Emotion;
emotion: Cartesia.Emotion[];
}
8 changes: 0 additions & 8 deletions src/api/resources/tts/types/Emotion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,36 @@
export type Emotion =
| "anger:lowest"
| "anger:low"
| "anger"
| "anger:high"
| "anger:highest"
| "positivity:lowest"
| "positivity:low"
| "positivity"
| "positivity:high"
| "positivity:highest"
| "surprise:lowest"
| "surprise:high"
| "surprise:highest"
| "sadness:lowest"
| "sadness:low"
| "sadness"
| "curiosity:low"
| "curiosity"
| "curiosity:high"
| "curiosity:highest";

export const Emotion = {
AngerLowest: "anger:lowest",
AngerLow: "anger:low",
AngerNormal: "anger",
AngerHigh: "anger:high",
AngerHighest: "anger:highest",
PositivityLowest: "positivity:lowest",
PositivityLow: "positivity:low",
PositivityNormal: "positivity",
PositivityHigh: "positivity:high",
PositivityHighest: "positivity:highest",
SurpriseLowest: "surprise:lowest",
SurpriseHigh: "surprise:high",
SurpriseHighest: "surprise:highest",
SadnessLowest: "sadness:lowest",
SadnessLow: "sadness:low",
SadnessNormal: "sadness",
CuriosityLow: "curiosity:low",
CuriosityNormal: "curiosity",
CuriosityHigh: "curiosity:high",
CuriosityHighest: "curiosity:highest",
} as const;
1 change: 1 addition & 0 deletions src/api/resources/tts/types/Mp3OutputFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

export interface Mp3OutputFormat {
sampleRate: number;
/** The bit rate of the audio in bits per second. Supported bit rates are 32000, 64000, 96000, 128000, 192000. */
bitRate: number;
}
32 changes: 16 additions & 16 deletions src/api/resources/voices/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -123,8 +123,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -186,8 +186,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -250,8 +250,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -313,8 +313,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -383,8 +383,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -454,8 +454,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -559,8 +559,8 @@ export class Voices {
"Cartesia-Version": requestOptions?.cartesiaVersion ?? this._options?.cartesiaVersion ?? "2024-06-10",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@cartesia/cartesia-js",
"X-Fern-SDK-Version": "2.1.0",
"User-Agent": "@cartesia/cartesia-js/2.1.0",
"X-Fern-SDK-Version": "2.1.1",
"User-Agent": "@cartesia/cartesia-js/2.1.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
4 changes: 2 additions & 2 deletions src/serialization/resources/tts/types/Controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import { Emotion } from "./Emotion";
export const Controls: core.serialization.ObjectSchema<serializers.Controls.Raw, Cartesia.Controls> =
core.serialization.object({
speed: Speed,
emotion: Emotion,
emotion: core.serialization.list(Emotion),
});

export declare namespace Controls {
interface Raw {
speed: Speed.Raw;
emotion: Emotion.Raw;
emotion: Emotion.Raw[];
}
}
8 changes: 0 additions & 8 deletions src/serialization/resources/tts/types/Emotion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@ import * as core from "../../../../core";
export const Emotion: core.serialization.Schema<serializers.Emotion.Raw, Cartesia.Emotion> = core.serialization.enum_([
"anger:lowest",
"anger:low",
"anger",
"anger:high",
"anger:highest",
"positivity:lowest",
"positivity:low",
"positivity",
"positivity:high",
"positivity:highest",
"surprise:lowest",
"surprise:high",
"surprise:highest",
"sadness:lowest",
"sadness:low",
"sadness",
"curiosity:low",
"curiosity",
"curiosity:high",
"curiosity:highest",
]);
Expand All @@ -33,22 +29,18 @@ export declare namespace Emotion {
type Raw =
| "anger:lowest"
| "anger:low"
| "anger"
| "anger:high"
| "anger:highest"
| "positivity:lowest"
| "positivity:low"
| "positivity"
| "positivity:high"
| "positivity:highest"
| "surprise:lowest"
| "surprise:high"
| "surprise:highest"
| "sadness:lowest"
| "sadness:low"
| "sadness"
| "curiosity:low"
| "curiosity"
| "curiosity:high"
| "curiosity:highest";
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const SDK_VERSION = "2.1.0";
export const SDK_VERSION = "2.1.1";
Loading

0 comments on commit 5a53baf

Please sign in to comment.