From f70b5a20da8ca141f440ca62247c25c9a6607cb7 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 6 Jan 2025 19:56:21 +0000
Subject: [PATCH] Release 2.1.3
---
reference.md | 5 +--
.../resources/tts/types/BytesOutputFormat.ts | 24 -----------
.../resources/tts/types/Mp3OutputFormat.ts | 5 ---
.../tts/types/RawBytesOutputFormat.ts | 13 ------
.../resources/tts/types/SseOutputFormat.ts | 17 --------
.../resources/tts/types/TtsBytesRequest.ts | 19 ---------
.../types/{TtssseRequest.ts => TtsRequest.ts} | 4 +-
.../tts/types/WavBytesOutputFormat.ts | 7 ----
src/api/resources/tts/types/index.ts | 7 +---
.../resources/tts/types/BytesOutputFormat.ts | 40 -------------------
.../resources/tts/types/Mp3OutputFormat.ts | 2 -
.../tts/types/RawBytesOutputFormat.ts | 23 -----------
.../resources/tts/types/SseOutputFormat.ts | 32 ---------------
.../resources/tts/types/TtsBytesRequest.ts | 33 ---------------
.../types/{TtssseRequest.ts => TtsRequest.ts} | 10 ++---
.../tts/types/WavBytesOutputFormat.ts | 17 --------
.../resources/tts/types/index.ts | 7 +---
17 files changed, 11 insertions(+), 254 deletions(-)
delete mode 100644 src/api/resources/tts/types/BytesOutputFormat.ts
delete mode 100644 src/api/resources/tts/types/RawBytesOutputFormat.ts
delete mode 100644 src/api/resources/tts/types/SseOutputFormat.ts
delete mode 100644 src/api/resources/tts/types/TtsBytesRequest.ts
rename src/api/resources/tts/types/{TtssseRequest.ts => TtsRequest.ts} (88%)
delete mode 100644 src/api/resources/tts/types/WavBytesOutputFormat.ts
delete mode 100644 src/serialization/resources/tts/types/BytesOutputFormat.ts
delete mode 100644 src/serialization/resources/tts/types/RawBytesOutputFormat.ts
delete mode 100644 src/serialization/resources/tts/types/SseOutputFormat.ts
delete mode 100644 src/serialization/resources/tts/types/TtsBytesRequest.ts
rename src/serialization/resources/tts/types/{TtssseRequest.ts => TtsRequest.ts} (77%)
delete mode 100644 src/serialization/resources/tts/types/WavBytesOutputFormat.ts
diff --git a/reference.md b/reference.md
index 17c74b3..1270038 100644
--- a/reference.md
+++ b/reference.md
@@ -273,7 +273,6 @@ await client.tts.bytes({
container: "mp3",
sampleRate: 44100,
bitRate: 128000,
- loudness: -17,
},
});
```
@@ -291,7 +290,7 @@ await client.tts.bytes({
-
-**request:** `Cartesia.TtsBytesRequest`
+**request:** `Cartesia.TtsRequest`
@@ -355,7 +354,7 @@ for await (const item of response) {
-
-**request:** `Cartesia.TtssseRequest`
+**request:** `Cartesia.TtsRequest`
diff --git a/src/api/resources/tts/types/BytesOutputFormat.ts b/src/api/resources/tts/types/BytesOutputFormat.ts
deleted file mode 100644
index e9978cf..0000000
--- a/src/api/resources/tts/types/BytesOutputFormat.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as Cartesia from "../../../index";
-
-export type BytesOutputFormat =
- | Cartesia.BytesOutputFormat.Raw
- | Cartesia.BytesOutputFormat.Wav
- | Cartesia.BytesOutputFormat.Mp3;
-
-export declare namespace BytesOutputFormat {
- interface Raw extends Cartesia.RawBytesOutputFormat {
- container: "raw";
- }
-
- interface Wav extends Cartesia.WavBytesOutputFormat {
- container: "wav";
- }
-
- interface Mp3 extends Cartesia.Mp3OutputFormat {
- container: "mp3";
- }
-}
diff --git a/src/api/resources/tts/types/Mp3OutputFormat.ts b/src/api/resources/tts/types/Mp3OutputFormat.ts
index f17d730..a51c18a 100644
--- a/src/api/resources/tts/types/Mp3OutputFormat.ts
+++ b/src/api/resources/tts/types/Mp3OutputFormat.ts
@@ -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;
}
diff --git a/src/api/resources/tts/types/RawBytesOutputFormat.ts b/src/api/resources/tts/types/RawBytesOutputFormat.ts
deleted file mode 100644
index f82759e..0000000
--- a/src/api/resources/tts/types/RawBytesOutputFormat.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as Cartesia from "../../../index";
-
-export interface RawBytesOutputFormat extends Cartesia.RawOutputFormat {
- /**
- * The loudness of the audio in LUFS.
- * Supports values between -14 (loudest) and -24 (quietest).
- */
- loudness?: number;
-}
diff --git a/src/api/resources/tts/types/SseOutputFormat.ts b/src/api/resources/tts/types/SseOutputFormat.ts
deleted file mode 100644
index aa632bc..0000000
--- a/src/api/resources/tts/types/SseOutputFormat.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as Cartesia from "../../../index";
-
-export type SseOutputFormat = Cartesia.SseOutputFormat.Raw | Cartesia.SseOutputFormat.Wav;
-
-export declare namespace SseOutputFormat {
- interface Raw extends Cartesia.RawOutputFormat {
- container: "raw";
- }
-
- interface Wav extends Cartesia.WavOutputFormat {
- container: "wav";
- }
-}
diff --git a/src/api/resources/tts/types/TtsBytesRequest.ts b/src/api/resources/tts/types/TtsBytesRequest.ts
deleted file mode 100644
index c4ae09a..0000000
--- a/src/api/resources/tts/types/TtsBytesRequest.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as Cartesia from "../../../index";
-
-export interface TtsBytesRequest {
- /** 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.BytesOutputFormat;
- /**
- * 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.
- */
- duration?: number;
-}
diff --git a/src/api/resources/tts/types/TtssseRequest.ts b/src/api/resources/tts/types/TtsRequest.ts
similarity index 88%
rename from src/api/resources/tts/types/TtssseRequest.ts
rename to src/api/resources/tts/types/TtsRequest.ts
index daf6ddc..154f6d1 100644
--- a/src/api/resources/tts/types/TtssseRequest.ts
+++ b/src/api/resources/tts/types/TtsRequest.ts
@@ -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.
diff --git a/src/api/resources/tts/types/WavBytesOutputFormat.ts b/src/api/resources/tts/types/WavBytesOutputFormat.ts
deleted file mode 100644
index 43e021e..0000000
--- a/src/api/resources/tts/types/WavBytesOutputFormat.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as Cartesia from "../../../index";
-
-export interface WavBytesOutputFormat extends Cartesia.RawBytesOutputFormat {}
diff --git a/src/api/resources/tts/types/index.ts b/src/api/resources/tts/types/index.ts
index 8d1e2ed..5212040 100644
--- a/src/api/resources/tts/types/index.ts
+++ b/src/api/resources/tts/types/index.ts
@@ -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";
@@ -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";
diff --git a/src/serialization/resources/tts/types/BytesOutputFormat.ts b/src/serialization/resources/tts/types/BytesOutputFormat.ts
deleted file mode 100644
index 4b74233..0000000
--- a/src/serialization/resources/tts/types/BytesOutputFormat.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as serializers from "../../../index";
-import * as Cartesia from "../../../../api/index";
-import * as core from "../../../../core";
-import { RawBytesOutputFormat } from "./RawBytesOutputFormat";
-import { WavBytesOutputFormat } from "./WavBytesOutputFormat";
-import { Mp3OutputFormat } from "./Mp3OutputFormat";
-
-export const BytesOutputFormat: core.serialization.Schema<
- serializers.BytesOutputFormat.Raw,
- Cartesia.BytesOutputFormat
-> = core.serialization
- .union("container", {
- raw: RawBytesOutputFormat,
- wav: WavBytesOutputFormat,
- mp3: Mp3OutputFormat,
- })
- .transform({
- transform: (value) => value,
- untransform: (value) => value,
- });
-
-export declare namespace BytesOutputFormat {
- type Raw = BytesOutputFormat.Raw | BytesOutputFormat.Wav | BytesOutputFormat.Mp3;
-
- interface Raw extends RawBytesOutputFormat.Raw {
- container: "raw";
- }
-
- interface Wav extends WavBytesOutputFormat.Raw {
- container: "wav";
- }
-
- interface Mp3 extends Mp3OutputFormat.Raw {
- container: "mp3";
- }
-}
diff --git a/src/serialization/resources/tts/types/Mp3OutputFormat.ts b/src/serialization/resources/tts/types/Mp3OutputFormat.ts
index 0942d89..d099ddc 100644
--- a/src/serialization/resources/tts/types/Mp3OutputFormat.ts
+++ b/src/serialization/resources/tts/types/Mp3OutputFormat.ts
@@ -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;
}
}
diff --git a/src/serialization/resources/tts/types/RawBytesOutputFormat.ts b/src/serialization/resources/tts/types/RawBytesOutputFormat.ts
deleted file mode 100644
index a7f8d76..0000000
--- a/src/serialization/resources/tts/types/RawBytesOutputFormat.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as serializers from "../../../index";
-import * as Cartesia from "../../../../api/index";
-import * as core from "../../../../core";
-import { RawOutputFormat } from "./RawOutputFormat";
-
-export const RawBytesOutputFormat: core.serialization.ObjectSchema<
- serializers.RawBytesOutputFormat.Raw,
- Cartesia.RawBytesOutputFormat
-> = core.serialization
- .object({
- loudness: core.serialization.number().optional(),
- })
- .extend(RawOutputFormat);
-
-export declare namespace RawBytesOutputFormat {
- interface Raw extends RawOutputFormat.Raw {
- loudness?: number | null;
- }
-}
diff --git a/src/serialization/resources/tts/types/SseOutputFormat.ts b/src/serialization/resources/tts/types/SseOutputFormat.ts
deleted file mode 100644
index 27b37a3..0000000
--- a/src/serialization/resources/tts/types/SseOutputFormat.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as serializers from "../../../index";
-import * as Cartesia from "../../../../api/index";
-import * as core from "../../../../core";
-import { RawOutputFormat } from "./RawOutputFormat";
-import { WavOutputFormat } from "./WavOutputFormat";
-
-export const SseOutputFormat: core.serialization.Schema =
- core.serialization
- .union("container", {
- raw: RawOutputFormat,
- wav: WavOutputFormat,
- })
- .transform({
- transform: (value) => value,
- untransform: (value) => value,
- });
-
-export declare namespace SseOutputFormat {
- type Raw = SseOutputFormat.Raw | SseOutputFormat.Wav;
-
- interface Raw extends RawOutputFormat.Raw {
- container: "raw";
- }
-
- interface Wav extends WavOutputFormat.Raw {
- container: "wav";
- }
-}
diff --git a/src/serialization/resources/tts/types/TtsBytesRequest.ts b/src/serialization/resources/tts/types/TtsBytesRequest.ts
deleted file mode 100644
index 09b4925..0000000
--- a/src/serialization/resources/tts/types/TtsBytesRequest.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as serializers from "../../../index";
-import * as Cartesia from "../../../../api/index";
-import * as core from "../../../../core";
-import { TtsRequestVoiceSpecifier } from "./TtsRequestVoiceSpecifier";
-import { SupportedLanguage } from "./SupportedLanguage";
-import { BytesOutputFormat } from "./BytesOutputFormat";
-
-export const TtsBytesRequest: core.serialization.ObjectSchema<
- serializers.TtsBytesRequest.Raw,
- Cartesia.TtsBytesRequest
-> = 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", BytesOutputFormat),
- duration: core.serialization.number().optional(),
-});
-
-export declare namespace TtsBytesRequest {
- interface Raw {
- model_id: string;
- transcript: string;
- voice: TtsRequestVoiceSpecifier.Raw;
- language?: SupportedLanguage.Raw | null;
- output_format: BytesOutputFormat.Raw;
- duration?: number | null;
- }
-}
diff --git a/src/serialization/resources/tts/types/TtssseRequest.ts b/src/serialization/resources/tts/types/TtsRequest.ts
similarity index 77%
rename from src/serialization/resources/tts/types/TtssseRequest.ts
rename to src/serialization/resources/tts/types/TtsRequest.ts
index 947f0a1..685a0b5 100644
--- a/src/serialization/resources/tts/types/TtssseRequest.ts
+++ b/src/serialization/resources/tts/types/TtsRequest.ts
@@ -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 =
+export const TtsRequest: core.serialization.ObjectSchema =
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;
}
}
diff --git a/src/serialization/resources/tts/types/WavBytesOutputFormat.ts b/src/serialization/resources/tts/types/WavBytesOutputFormat.ts
deleted file mode 100644
index 0599ceb..0000000
--- a/src/serialization/resources/tts/types/WavBytesOutputFormat.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-
-import * as serializers from "../../../index";
-import * as Cartesia from "../../../../api/index";
-import * as core from "../../../../core";
-import { RawBytesOutputFormat } from "./RawBytesOutputFormat";
-
-export const WavBytesOutputFormat: core.serialization.ObjectSchema<
- serializers.WavBytesOutputFormat.Raw,
- Cartesia.WavBytesOutputFormat
-> = core.serialization.object({}).extend(RawBytesOutputFormat);
-
-export declare namespace WavBytesOutputFormat {
- interface Raw extends RawBytesOutputFormat.Raw {}
-}
diff --git a/src/serialization/resources/tts/types/index.ts b/src/serialization/resources/tts/types/index.ts
index 8d1e2ed..5212040 100644
--- a/src/serialization/resources/tts/types/index.ts
+++ b/src/serialization/resources/tts/types/index.ts
@@ -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";
@@ -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";