From 1f2cbfba9fb942445aba276b5f0e807094eb15b1 Mon Sep 17 00:00:00 2001 From: eden Date: Thu, 6 Feb 2025 16:07:31 -0500 Subject: [PATCH] Update specs to reflect current Python SDK. --- fern/definition/tts.yml | 23 +++++++++++++++++++++-- fern/generators.yml | 7 +++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/fern/definition/tts.yml b/fern/definition/tts.yml index 45c4cb7..d623ad2 100644 --- a/fern/definition/tts.yml +++ b/fern/definition/tts.yml @@ -205,6 +205,13 @@ types: A unique identifier for the context. You can use any unique identifier, like a UUID or human ID. Some customers use unique identifiers from their own systems (such as conversation IDs) as context IDs. + + FlushID: + type: integer + docs: | + A unique identifier for the flush. You can use any unique identifier, like a UUID or human ID. + + Some customers use unique identifiers from their own systems (such as conversation IDs) as flush IDs. WebSocketBaseResponse: properties: @@ -216,6 +223,7 @@ types: discriminant: type union: chunk: WebSocketChunkResponse + flush_done: WebSocketFlushDoneResponse done: WebSocketDoneResponse timestamps: WebSocketTimestampsResponse error: WebSocketErrorResponse @@ -248,6 +256,8 @@ types: phoneme_timestamps: optional audio: optional context_id: optional + flush_id: optional + flush_done: optional WebSocketStreamOptions: properties: @@ -268,6 +278,12 @@ types: WebSocketDoneResponse: extends: WebSocketBaseResponse + WebSocketFlushDoneResponse: + extends: WebSocketBaseResponse + properties: + flush_id: FlushID + flush_done: boolean + CancelContextRequest: properties: context_id: @@ -284,7 +300,10 @@ types: type: string docs: | The ID of the model to use for the generation. See [Models](/build-with-sonic/models) for available models. - transcript: string + transcript: + type: unknown + docs: | + The transcript to generate speech for. This can be a string or an iterator over strings. voice: TTSRequestVoiceSpecifier language: optional output_format: WebSocketRawOutputFormat @@ -293,7 +312,7 @@ types: docs: | 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. - context_id: ContextID + context_id: optional continue: type: optional docs: | diff --git a/fern/generators.yml b/fern/generators.yml index 9c38928..93d4e4d 100644 --- a/fern/generators.yml +++ b/fern/generators.yml @@ -19,12 +19,15 @@ groups: filename: base_client.py exported_class_name: Cartesia exported_filename: client.py + use_typeddict_requests: true extra_dependencies: - websockets: "12.0" + aiohttp: ">=3.10.10" + iterators: ">=0.2.0" + websockets: ">=10.4" ts-sdk: generators: - name: fernapi/fern-typescript-node-sdk - version: 0.41.0 + version: 0.48.4 output: location: npm package-name: "@cartesia/cartesia-js"