-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d36b88
commit 724d2a4
Showing
25 changed files
with
312 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* 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"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* 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"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* 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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* This file was auto-generated by Fern from our API Definition. | ||
*/ | ||
|
||
import * as Cartesia from "../../../index"; | ||
|
||
export interface WavBytesOutputFormat extends Cartesia.RawBytesOutputFormat {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/serialization/resources/tts/types/BytesOutputFormat.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* 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<Cartesia.BytesOutputFormat>({ | ||
transform: (value) => value, | ||
untransform: (value) => value, | ||
}); | ||
|
||
export declare namespace BytesOutputFormat { | ||
type Raw = BytesOutputFormat.Raw | BytesOutputFormat.Wav | BytesOutputFormat.Mp3; | ||
Check failure on line 27 in src/serialization/resources/tts/types/BytesOutputFormat.ts GitHub Actions / compile
Check failure on line 27 in src/serialization/resources/tts/types/BytesOutputFormat.ts GitHub Actions / compile
Check failure on line 27 in src/serialization/resources/tts/types/BytesOutputFormat.ts GitHub Actions / compile
|
||
|
||
interface Raw extends RawBytesOutputFormat.Raw { | ||
Check failure on line 29 in src/serialization/resources/tts/types/BytesOutputFormat.ts GitHub Actions / compile
|
||
container: "raw"; | ||
} | ||
|
||
interface Wav extends WavBytesOutputFormat.Raw { | ||
container: "wav"; | ||
} | ||
|
||
interface Mp3 extends Mp3OutputFormat.Raw { | ||
container: "mp3"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/serialization/resources/tts/types/RawBytesOutputFormat.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* 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; | ||
} | ||
} |
Oops, something went wrong.