Skip to content

Commit

Permalink
Update specs to reflect current Python SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
eyw520 committed Feb 6, 2025
1 parent f7e4f08 commit 1f2cbfb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
23 changes: 21 additions & 2 deletions fern/definition/tts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -216,6 +223,7 @@ types:
discriminant: type
union:
chunk: WebSocketChunkResponse
flush_done: WebSocketFlushDoneResponse
done: WebSocketDoneResponse
timestamps: WebSocketTimestampsResponse
error: WebSocketErrorResponse
Expand Down Expand Up @@ -248,6 +256,8 @@ types:
phoneme_timestamps: optional<PhonemeTimestamps>
audio: optional<unknown>
context_id: optional<ContextID>
flush_id: optional<FlushID>
flush_done: optional<boolean>

WebSocketStreamOptions:
properties:
Expand All @@ -268,6 +278,12 @@ types:
WebSocketDoneResponse:
extends: WebSocketBaseResponse

WebSocketFlushDoneResponse:
extends: WebSocketBaseResponse
properties:
flush_id: FlushID
flush_done: boolean

CancelContextRequest:
properties:
context_id:
Expand All @@ -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<SupportedLanguage>
output_format: WebSocketRawOutputFormat
Expand All @@ -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<ContextID>
continue:
type: optional<boolean>
docs: |
Expand Down
7 changes: 5 additions & 2 deletions fern/generators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1f2cbfb

Please sign in to comment.