Skip to content

Commit

Permalink
Release 2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jan 6, 2025
1 parent 724d2a4 commit f70b5a2
Show file tree
Hide file tree
Showing 17 changed files with 11 additions and 254 deletions.
5 changes: 2 additions & 3 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ await client.tts.bytes({
container: "mp3",
sampleRate: 44100,
bitRate: 128000,
loudness: -17,
},
});
```
Expand All @@ -291,7 +290,7 @@ await client.tts.bytes({
<dl>
<dd>

**request:** `Cartesia.TtsBytesRequest`
**request:** `Cartesia.TtsRequest`

</dd>
</dl>
Expand Down Expand Up @@ -355,7 +354,7 @@ for await (const item of response) {
<dl>
<dd>

**request:** `Cartesia.TtssseRequest`
**request:** `Cartesia.TtsRequest`

</dd>
</dl>
Expand Down
24 changes: 0 additions & 24 deletions src/api/resources/tts/types/BytesOutputFormat.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/api/resources/tts/types/Mp3OutputFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,4 @@ 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;
/**
* The loudness of the audio in LUFS.
* Supports values between -14 (loudest) and -24 (quietest).
*/
loudness?: number;
}
13 changes: 0 additions & 13 deletions src/api/resources/tts/types/RawBytesOutputFormat.ts

This file was deleted.

17 changes: 0 additions & 17 deletions src/api/resources/tts/types/SseOutputFormat.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/api/resources/tts/types/TtsBytesRequest.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

import * as Cartesia from "../../../index";

export interface TtssseRequest {
export interface TtsRequest {
/** The ID of the model to use for the generation. See [Models](/build-with-sonic/models) for available models. */
modelId: string;
transcript: string;
voice: Cartesia.TtsRequestVoiceSpecifier;
language?: Cartesia.SupportedLanguage;
outputFormat: Cartesia.SseOutputFormat;
outputFormat: Cartesia.OutputFormat;
/**
* The maximum duration of the audio in seconds. You do not usually need to specify this.
* If the duration is not appropriate for the length of the transcript, the output audio may be truncated.
Expand Down
7 changes: 0 additions & 7 deletions src/api/resources/tts/types/WavBytesOutputFormat.ts

This file was deleted.

7 changes: 1 addition & 6 deletions src/api/resources/tts/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ export * from "./GenerationRequest";
export * from "./WebSocketRawOutputFormat";
export * from "./WebSocketRequest";
export * from "./WebSocketTtsRequest";
export * from "./TtsRequest";
export * from "./SupportedLanguage";
export * from "./OutputFormat";
export * from "./RawOutputFormat";
export * from "./RawBytesOutputFormat";
export * from "./RawEncoding";
export * from "./WavOutputFormat";
export * from "./WavBytesOutputFormat";
export * from "./Mp3OutputFormat";
export * from "./TtsRequestVoiceSpecifier";
export * from "./TtsRequestIdSpecifier";
Expand All @@ -29,7 +28,3 @@ export * from "./Speed";
export * from "./NumericalSpecifier";
export * from "./NaturalSpecifier";
export * from "./Emotion";
export * from "./TtsBytesRequest";
export * from "./BytesOutputFormat";
export * from "./TtssseRequest";
export * from "./SseOutputFormat";
40 changes: 0 additions & 40 deletions src/serialization/resources/tts/types/BytesOutputFormat.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/serialization/resources/tts/types/Mp3OutputFormat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ export const Mp3OutputFormat: core.serialization.ObjectSchema<
> = core.serialization.object({
sampleRate: core.serialization.property("sample_rate", core.serialization.number()),
bitRate: core.serialization.property("bit_rate", core.serialization.number()),
loudness: core.serialization.number().optional(),
});

export declare namespace Mp3OutputFormat {
interface Raw {
sample_rate: number;
bit_rate: number;
loudness?: number | null;
}
}
23 changes: 0 additions & 23 deletions src/serialization/resources/tts/types/RawBytesOutputFormat.ts

This file was deleted.

32 changes: 0 additions & 32 deletions src/serialization/resources/tts/types/SseOutputFormat.ts

This file was deleted.

33 changes: 0 additions & 33 deletions src/serialization/resources/tts/types/TtsBytesRequest.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ import * as Cartesia from "../../../../api/index";
import * as core from "../../../../core";
import { TtsRequestVoiceSpecifier } from "./TtsRequestVoiceSpecifier";
import { SupportedLanguage } from "./SupportedLanguage";
import { SseOutputFormat } from "./SseOutputFormat";
import { OutputFormat } from "./OutputFormat";

export const TtssseRequest: core.serialization.ObjectSchema<serializers.TtssseRequest.Raw, Cartesia.TtssseRequest> =
export const TtsRequest: core.serialization.ObjectSchema<serializers.TtsRequest.Raw, Cartesia.TtsRequest> =
core.serialization.object({
modelId: core.serialization.property("model_id", core.serialization.string()),
transcript: core.serialization.string(),
voice: TtsRequestVoiceSpecifier,
language: SupportedLanguage.optional(),
outputFormat: core.serialization.property("output_format", SseOutputFormat),
outputFormat: core.serialization.property("output_format", OutputFormat),
duration: core.serialization.number().optional(),
});

export declare namespace TtssseRequest {
export declare namespace TtsRequest {
interface Raw {
model_id: string;
transcript: string;
voice: TtsRequestVoiceSpecifier.Raw;
language?: SupportedLanguage.Raw | null;
output_format: SseOutputFormat.Raw;
output_format: OutputFormat.Raw;
duration?: number | null;
}
}
17 changes: 0 additions & 17 deletions src/serialization/resources/tts/types/WavBytesOutputFormat.ts

This file was deleted.

7 changes: 1 addition & 6 deletions src/serialization/resources/tts/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ export * from "./GenerationRequest";
export * from "./WebSocketRawOutputFormat";
export * from "./WebSocketRequest";
export * from "./WebSocketTtsRequest";
export * from "./TtsRequest";
export * from "./SupportedLanguage";
export * from "./OutputFormat";
export * from "./RawOutputFormat";
export * from "./RawBytesOutputFormat";
export * from "./RawEncoding";
export * from "./WavOutputFormat";
export * from "./WavBytesOutputFormat";
export * from "./Mp3OutputFormat";
export * from "./TtsRequestVoiceSpecifier";
export * from "./TtsRequestIdSpecifier";
Expand All @@ -29,7 +28,3 @@ export * from "./Speed";
export * from "./NumericalSpecifier";
export * from "./NaturalSpecifier";
export * from "./Emotion";
export * from "./TtsBytesRequest";
export * from "./BytesOutputFormat";
export * from "./TtssseRequest";
export * from "./SseOutputFormat";

0 comments on commit f70b5a2

Please sign in to comment.