@cartesia/cartesia-js 3.2.0-b2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/backcompat/tts-wrapper.d.mts +1 -1
- package/backcompat/tts-wrapper.d.mts.map +1 -1
- package/backcompat/tts-wrapper.d.ts +1 -1
- package/backcompat/tts-wrapper.d.ts.map +1 -1
- package/backcompat/tts-wrapper.js +13 -9
- package/backcompat/tts-wrapper.js.map +1 -1
- package/backcompat/tts-wrapper.mjs +13 -9
- package/backcompat/tts-wrapper.mjs.map +1 -1
- package/backcompat/voice-changer-wrapper.d.mts +1 -1
- package/backcompat/voice-changer-wrapper.d.mts.map +1 -1
- package/backcompat/voice-changer-wrapper.d.ts +1 -1
- package/backcompat/voice-changer-wrapper.d.ts.map +1 -1
- package/backcompat/voice-changer-wrapper.js +11 -3
- package/backcompat/voice-changer-wrapper.js.map +1 -1
- package/backcompat/voice-changer-wrapper.mjs +11 -3
- package/backcompat/voice-changer-wrapper.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/stt/{turn-detecting/turn-detecting.d.mts → auto-finalize/auto-finalize.d.mts} +34 -61
- package/resources/stt/auto-finalize/auto-finalize.d.mts.map +1 -0
- package/resources/stt/{turn-detecting/turn-detecting.d.ts → auto-finalize/auto-finalize.d.ts} +34 -61
- package/resources/stt/auto-finalize/auto-finalize.d.ts.map +1 -0
- package/resources/stt/auto-finalize/auto-finalize.js +35 -0
- package/resources/stt/auto-finalize/auto-finalize.js.map +1 -0
- package/resources/stt/auto-finalize/auto-finalize.mjs +31 -0
- package/resources/stt/auto-finalize/auto-finalize.mjs.map +1 -0
- package/resources/stt/auto-finalize/index.d.mts +4 -0
- package/resources/stt/auto-finalize/index.d.mts.map +1 -0
- package/resources/stt/auto-finalize/index.d.ts +4 -0
- package/resources/stt/auto-finalize/index.d.ts.map +1 -0
- package/resources/stt/auto-finalize/index.js +7 -0
- package/resources/stt/auto-finalize/index.js.map +1 -0
- package/resources/stt/{external-vad → auto-finalize}/index.mjs +1 -1
- package/resources/stt/auto-finalize/index.mjs.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/internal-base.d.mts +12 -12
- package/resources/stt/auto-finalize/internal-base.d.mts.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/internal-base.d.ts +12 -12
- package/resources/stt/auto-finalize/internal-base.d.ts.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/internal-base.js +3 -3
- package/resources/stt/auto-finalize/internal-base.js.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/internal-base.mjs +1 -1
- package/resources/stt/auto-finalize/internal-base.mjs.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/ws-base.d.mts +16 -16
- package/resources/stt/auto-finalize/ws-base.d.mts.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/ws-base.d.ts +16 -16
- package/resources/stt/auto-finalize/ws-base.d.ts.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/ws-base.js +3 -3
- package/resources/stt/auto-finalize/ws-base.js.map +1 -0
- package/resources/stt/{turn-detecting → auto-finalize}/ws-base.mjs +2 -2
- package/resources/stt/auto-finalize/ws-base.mjs.map +1 -0
- package/resources/stt/auto-finalize/ws.d.mts +14 -0
- package/resources/stt/auto-finalize/ws.d.mts.map +1 -0
- package/resources/stt/auto-finalize/ws.d.ts +14 -0
- package/resources/stt/auto-finalize/ws.d.ts.map +1 -0
- package/resources/stt/{external-vad → auto-finalize}/ws.js +4 -4
- package/resources/stt/auto-finalize/ws.js.map +1 -0
- package/resources/stt/{external-vad → auto-finalize}/ws.mjs +3 -3
- package/resources/stt/auto-finalize/ws.mjs.map +1 -0
- package/resources/stt/auto-finalize.d.mts +2 -0
- package/resources/stt/auto-finalize.d.mts.map +1 -0
- package/resources/stt/auto-finalize.d.ts +2 -0
- package/resources/stt/auto-finalize.d.ts.map +1 -0
- package/resources/stt/{external-vad.js → auto-finalize.js} +2 -2
- package/resources/stt/auto-finalize.js.map +1 -0
- package/resources/stt/{external-vad.mjs → auto-finalize.mjs} +2 -2
- package/resources/stt/auto-finalize.mjs.map +1 -0
- package/resources/stt/index.d.mts +2 -2
- package/resources/stt/index.d.mts.map +1 -1
- package/resources/stt/index.d.ts +2 -2
- package/resources/stt/index.d.ts.map +1 -1
- package/resources/stt/index.js +5 -5
- package/resources/stt/index.js.map +1 -1
- package/resources/stt/index.mjs +2 -2
- package/resources/stt/index.mjs.map +1 -1
- package/resources/stt/manual-finalize/index.d.mts +4 -0
- package/resources/stt/manual-finalize/index.d.mts.map +1 -0
- package/resources/stt/manual-finalize/index.d.ts +4 -0
- package/resources/stt/manual-finalize/index.d.ts.map +1 -0
- package/resources/stt/manual-finalize/index.js +7 -0
- package/resources/stt/manual-finalize/index.js.map +1 -0
- package/resources/stt/manual-finalize/index.mjs +3 -0
- package/resources/stt/manual-finalize/index.mjs.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/internal-base.d.mts +12 -12
- package/resources/stt/manual-finalize/internal-base.d.mts.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/internal-base.d.ts +12 -12
- package/resources/stt/manual-finalize/internal-base.d.ts.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/internal-base.js +3 -3
- package/resources/stt/manual-finalize/internal-base.js.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/internal-base.mjs +1 -1
- package/resources/stt/manual-finalize/internal-base.mjs.map +1 -0
- package/resources/stt/manual-finalize/manual-finalize.d.mts +153 -0
- package/resources/stt/manual-finalize/manual-finalize.d.mts.map +1 -0
- package/resources/stt/manual-finalize/manual-finalize.d.ts +153 -0
- package/resources/stt/manual-finalize/manual-finalize.d.ts.map +1 -0
- package/resources/stt/manual-finalize/manual-finalize.js +33 -0
- package/resources/stt/manual-finalize/manual-finalize.js.map +1 -0
- package/resources/stt/manual-finalize/manual-finalize.mjs +29 -0
- package/resources/stt/manual-finalize/manual-finalize.mjs.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/ws-base.d.mts +16 -17
- package/resources/stt/manual-finalize/ws-base.d.mts.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/ws-base.d.ts +16 -17
- package/resources/stt/manual-finalize/ws-base.d.ts.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/ws-base.js +3 -3
- package/resources/stt/manual-finalize/ws-base.js.map +1 -0
- package/resources/stt/{external-vad → manual-finalize}/ws-base.mjs +2 -2
- package/resources/stt/manual-finalize/ws-base.mjs.map +1 -0
- package/resources/stt/manual-finalize/ws.d.mts +14 -0
- package/resources/stt/manual-finalize/ws.d.mts.map +1 -0
- package/resources/stt/manual-finalize/ws.d.ts +14 -0
- package/resources/stt/manual-finalize/ws.d.ts.map +1 -0
- package/resources/stt/{turn-detecting → manual-finalize}/ws.js +4 -4
- package/resources/stt/manual-finalize/ws.js.map +1 -0
- package/resources/stt/{turn-detecting → manual-finalize}/ws.mjs +3 -3
- package/resources/stt/manual-finalize/ws.mjs.map +1 -0
- package/resources/stt/manual-finalize.d.mts +2 -0
- package/resources/stt/manual-finalize.d.mts.map +1 -0
- package/resources/stt/manual-finalize.d.ts +2 -0
- package/resources/stt/manual-finalize.d.ts.map +1 -0
- package/resources/stt/{turn-detecting.js → manual-finalize.js} +2 -2
- package/resources/stt/manual-finalize.js.map +1 -0
- package/resources/stt/manual-finalize.mjs +3 -0
- package/resources/stt/manual-finalize.mjs.map +1 -0
- package/resources/stt/stt.d.mts +37 -40
- package/resources/stt/stt.d.mts.map +1 -1
- package/resources/stt/stt.d.ts +37 -40
- package/resources/stt/stt.d.ts.map +1 -1
- package/resources/stt/stt.js +9 -13
- package/resources/stt/stt.js.map +1 -1
- package/resources/stt/stt.mjs +9 -13
- package/resources/stt/stt.mjs.map +1 -1
- package/src/backcompat/tts-wrapper.ts +21 -10
- package/src/backcompat/voice-changer-wrapper.ts +15 -3
- package/src/resources/stt/{turn-detecting/turn-detecting.ts → auto-finalize/auto-finalize.ts} +52 -85
- package/src/resources/stt/auto-finalize/index.ts +17 -0
- package/src/resources/stt/{turn-detecting → auto-finalize}/internal-base.ts +13 -13
- package/src/resources/stt/{turn-detecting → auto-finalize}/ws-base.ts +34 -34
- package/src/resources/stt/{external-vad → auto-finalize}/ws.ts +7 -7
- package/src/resources/stt/{external-vad.ts → auto-finalize.ts} +1 -1
- package/src/resources/stt/index.ts +22 -25
- package/src/resources/stt/manual-finalize/index.ts +14 -0
- package/src/resources/stt/{external-vad → manual-finalize}/internal-base.ts +16 -13
- package/src/resources/stt/manual-finalize/manual-finalize.ts +193 -0
- package/src/resources/stt/{external-vad → manual-finalize}/ws-base.ts +41 -35
- package/src/resources/stt/{turn-detecting → manual-finalize}/ws.ts +9 -9
- package/src/resources/stt/{turn-detecting.ts → manual-finalize.ts} +1 -1
- package/src/resources/stt/stt.ts +80 -86
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/stt/external-vad/external-vad.d.mts +0 -188
- package/resources/stt/external-vad/external-vad.d.mts.map +0 -1
- package/resources/stt/external-vad/external-vad.d.ts +0 -188
- package/resources/stt/external-vad/external-vad.d.ts.map +0 -1
- package/resources/stt/external-vad/external-vad.js +0 -30
- package/resources/stt/external-vad/external-vad.js.map +0 -1
- package/resources/stt/external-vad/external-vad.mjs +0 -26
- package/resources/stt/external-vad/external-vad.mjs.map +0 -1
- package/resources/stt/external-vad/index.d.mts +0 -4
- package/resources/stt/external-vad/index.d.mts.map +0 -1
- package/resources/stt/external-vad/index.d.ts +0 -4
- package/resources/stt/external-vad/index.d.ts.map +0 -1
- package/resources/stt/external-vad/index.js +0 -7
- package/resources/stt/external-vad/index.js.map +0 -1
- package/resources/stt/external-vad/index.mjs.map +0 -1
- package/resources/stt/external-vad/internal-base.d.mts.map +0 -1
- package/resources/stt/external-vad/internal-base.d.ts.map +0 -1
- package/resources/stt/external-vad/internal-base.js.map +0 -1
- package/resources/stt/external-vad/internal-base.mjs.map +0 -1
- package/resources/stt/external-vad/ws-base.d.mts.map +0 -1
- package/resources/stt/external-vad/ws-base.d.ts.map +0 -1
- package/resources/stt/external-vad/ws-base.js.map +0 -1
- package/resources/stt/external-vad/ws-base.mjs.map +0 -1
- package/resources/stt/external-vad/ws.d.mts +0 -14
- package/resources/stt/external-vad/ws.d.mts.map +0 -1
- package/resources/stt/external-vad/ws.d.ts +0 -14
- package/resources/stt/external-vad/ws.d.ts.map +0 -1
- package/resources/stt/external-vad/ws.js.map +0 -1
- package/resources/stt/external-vad/ws.mjs.map +0 -1
- package/resources/stt/external-vad.d.mts +0 -2
- package/resources/stt/external-vad.d.mts.map +0 -1
- package/resources/stt/external-vad.d.ts +0 -2
- package/resources/stt/external-vad.d.ts.map +0 -1
- package/resources/stt/external-vad.js.map +0 -1
- package/resources/stt/external-vad.mjs.map +0 -1
- package/resources/stt/turn-detecting/index.d.mts +0 -4
- package/resources/stt/turn-detecting/index.d.mts.map +0 -1
- package/resources/stt/turn-detecting/index.d.ts +0 -4
- package/resources/stt/turn-detecting/index.d.ts.map +0 -1
- package/resources/stt/turn-detecting/index.js +0 -7
- package/resources/stt/turn-detecting/index.js.map +0 -1
- package/resources/stt/turn-detecting/index.mjs +0 -3
- package/resources/stt/turn-detecting/index.mjs.map +0 -1
- package/resources/stt/turn-detecting/internal-base.d.mts.map +0 -1
- package/resources/stt/turn-detecting/internal-base.d.ts.map +0 -1
- package/resources/stt/turn-detecting/internal-base.js.map +0 -1
- package/resources/stt/turn-detecting/internal-base.mjs.map +0 -1
- package/resources/stt/turn-detecting/turn-detecting.d.mts.map +0 -1
- package/resources/stt/turn-detecting/turn-detecting.d.ts.map +0 -1
- package/resources/stt/turn-detecting/turn-detecting.js +0 -33
- package/resources/stt/turn-detecting/turn-detecting.js.map +0 -1
- package/resources/stt/turn-detecting/turn-detecting.mjs +0 -29
- package/resources/stt/turn-detecting/turn-detecting.mjs.map +0 -1
- package/resources/stt/turn-detecting/ws-base.d.mts.map +0 -1
- package/resources/stt/turn-detecting/ws-base.d.ts.map +0 -1
- package/resources/stt/turn-detecting/ws-base.js.map +0 -1
- package/resources/stt/turn-detecting/ws-base.mjs.map +0 -1
- package/resources/stt/turn-detecting/ws.d.mts +0 -14
- package/resources/stt/turn-detecting/ws.d.mts.map +0 -1
- package/resources/stt/turn-detecting/ws.d.ts +0 -14
- package/resources/stt/turn-detecting/ws.d.ts.map +0 -1
- package/resources/stt/turn-detecting/ws.js.map +0 -1
- package/resources/stt/turn-detecting/ws.mjs.map +0 -1
- package/resources/stt/turn-detecting.d.mts +0 -2
- package/resources/stt/turn-detecting.d.mts.map +0 -1
- package/resources/stt/turn-detecting.d.ts +0 -2
- package/resources/stt/turn-detecting.d.ts.map +0 -1
- package/resources/stt/turn-detecting.js.map +0 -1
- package/resources/stt/turn-detecting.mjs +0 -3
- package/resources/stt/turn-detecting.mjs.map +0 -1
- package/src/resources/stt/external-vad/external-vad.ts +0 -235
- package/src/resources/stt/external-vad/index.ts +0 -15
- package/src/resources/stt/turn-detecting/index.ts +0 -19
package/resources/stt/{turn-detecting/turn-detecting.d.mts → auto-finalize/auto-finalize.d.mts}
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.mjs";
|
|
2
2
|
import * as STTAPI from "../stt.mjs";
|
|
3
|
-
import {
|
|
4
|
-
export declare class
|
|
3
|
+
import { AutoFinalizeWS, type AutoFinalizeWSClientOptions, type AutoFinalizeWSParameters } from "./ws.mjs";
|
|
4
|
+
export declare class AutoFinalize extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Realtime Speech-to-Text with user turn detection.
|
|
7
7
|
*
|
|
8
8
|
* This is the recommended STT method for building voice agents.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* - Send audio in chunks (e.g. 100 ms) using `ws.sendRaw()`
|
|
12
|
+
* - Send JSON commands using `ws.send()`
|
|
13
|
+
* - See [examples](https://github.com/cartesia-ai/cartesia-js/tree/main/examples) for reference
|
|
11
14
|
*
|
|
12
15
|
* Supports:
|
|
13
16
|
* - Streaming transcription
|
|
@@ -15,39 +18,19 @@ export declare class TurnDetecting extends APIResource {
|
|
|
15
18
|
* - Eager end-of-turn prediction (`turn.eager_end`, `turn.resume`)
|
|
16
19
|
* - Long-lived connections that reuse a live network connection for low latency
|
|
17
20
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* See [Turns](https://docs.cartesia.ai/use-the-api/stt/turns/turns) for details on handling turn events.
|
|
24
|
-
*/
|
|
25
|
-
websocket(parameters: TurnDetectingWSParameters, options?: TurnDetectingWSClientOptions | null | undefined): TurnDetectingWS;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Models that support realtime speech-to-text with turn-detection. This mode
|
|
29
|
-
* detects when the user is speaking and emits turn events. See
|
|
30
|
-
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
31
|
-
* all options.
|
|
32
|
-
*/
|
|
33
|
-
export type STTRealtimeTurnDetectingModel = 'ink-2' | (string & {});
|
|
34
|
-
/**
|
|
35
|
-
* Sent as a JSON-encoded WebSocket text frame to close the session cleanly. All
|
|
36
|
-
* buffered audio will be processed by the model into events before the connection
|
|
37
|
-
* closes.
|
|
38
|
-
*/
|
|
39
|
-
export interface STTTurnsCloseCommand {
|
|
40
|
-
/**
|
|
41
|
-
* Command type. Send this as a JSON-encoded WebSocket text frame to close the
|
|
42
|
-
* session.
|
|
21
|
+
* See also:
|
|
22
|
+
* - [API Reference](https://docs.cartesia.ai/api-reference/stt/turns/websocket)
|
|
23
|
+
* - [Turn Events](https://docs.cartesia.ai/use-the-api/stt/turns/turns)
|
|
24
|
+
* - [Common Pitfalls](https://docs.cartesia.ai/use-the-api/stt/common-pitfalls)
|
|
25
|
+
* - [Concurrency Limits and Timeouts](https://docs.cartesia.ai/use-the-api/concurrency-limits-and-timeouts)
|
|
43
26
|
*/
|
|
44
|
-
|
|
27
|
+
websocket(parameters: AutoFinalizeWSParameters, options?: AutoFinalizeWSClientOptions | null | undefined): AutoFinalizeWS;
|
|
45
28
|
}
|
|
46
29
|
/**
|
|
47
30
|
* Fires once when the WebSocket connection is established. You do not need to wait
|
|
48
31
|
* for this event before sending audio.
|
|
49
32
|
*/
|
|
50
|
-
export interface
|
|
33
|
+
export interface STTAutoFinalizeConnected {
|
|
51
34
|
/**
|
|
52
35
|
* Unique identifier for this connection.
|
|
53
36
|
*/
|
|
@@ -57,10 +40,17 @@ export interface STTTurnsConnected {
|
|
|
57
40
|
*/
|
|
58
41
|
type: 'connected';
|
|
59
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Models that support realtime speech-to-text (auto finalize). This mode detects
|
|
45
|
+
* when the user is speaking and emits turn events. See
|
|
46
|
+
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
47
|
+
* all options.
|
|
48
|
+
*/
|
|
49
|
+
export type STTAutoFinalizeModel = 'ink-2' | (string & {});
|
|
60
50
|
/**
|
|
61
51
|
* [PREVIEW] Fires when the model predicts that the user might be done speaking.
|
|
62
52
|
*/
|
|
63
|
-
export interface
|
|
53
|
+
export interface STTAutoFinalizeTurnEagerEnd {
|
|
64
54
|
/**
|
|
65
55
|
* Unique identifier for this connection. Does not change between turns.
|
|
66
56
|
*/
|
|
@@ -77,7 +67,7 @@ export interface STTTurnsTurnEagerEnd {
|
|
|
77
67
|
/**
|
|
78
68
|
* Marks the end of a user turn.
|
|
79
69
|
*/
|
|
80
|
-
export interface
|
|
70
|
+
export interface STTAutoFinalizeTurnEnd {
|
|
81
71
|
/**
|
|
82
72
|
* Unique identifier for this connection. Does not change between turns.
|
|
83
73
|
*/
|
|
@@ -94,7 +84,7 @@ export interface STTTurnsTurnEnd {
|
|
|
94
84
|
/**
|
|
95
85
|
* [PREVIEW] Fires after `turn.eager_end` if the user turn has not actually ended.
|
|
96
86
|
*/
|
|
97
|
-
export interface
|
|
87
|
+
export interface STTAutoFinalizeTurnResume {
|
|
98
88
|
/**
|
|
99
89
|
* Unique identifier for this connection. Does not change between turns.
|
|
100
90
|
*/
|
|
@@ -108,7 +98,7 @@ export interface STTTurnsTurnResume {
|
|
|
108
98
|
* Marks the start of a user turn. Fires quickly after the user begins speaking.
|
|
109
99
|
* This event can be used to interrupt your agent to avoid talking over the user.
|
|
110
100
|
*/
|
|
111
|
-
export interface
|
|
101
|
+
export interface STTAutoFinalizeTurnStart {
|
|
112
102
|
/**
|
|
113
103
|
* Unique identifier for this connection. Does not change between turns.
|
|
114
104
|
*/
|
|
@@ -121,7 +111,7 @@ export interface STTTurnsTurnStart {
|
|
|
121
111
|
/**
|
|
122
112
|
* Fires repeatedly as the model transcribes the current user turn.
|
|
123
113
|
*/
|
|
124
|
-
export interface
|
|
114
|
+
export interface STTAutoFinalizeTurnUpdate {
|
|
125
115
|
/**
|
|
126
116
|
* Unique identifier for this connection. Does not change between turns.
|
|
127
117
|
*/
|
|
@@ -136,29 +126,12 @@ export interface STTTurnsTurnUpdate {
|
|
|
136
126
|
*/
|
|
137
127
|
type: 'turn.update';
|
|
138
128
|
}
|
|
139
|
-
export interface STTTurnsWebsocketQueryParams {
|
|
140
|
-
/**
|
|
141
|
-
* The encoding format for audio data sent to the STT WebSocket.
|
|
142
|
-
*/
|
|
143
|
-
encoding: STTAPI.STTEncoding;
|
|
144
|
-
/**
|
|
145
|
-
* Models that support realtime speech-to-text with turn-detection. This mode
|
|
146
|
-
* detects when the user is speaking and emits turn events. See
|
|
147
|
-
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
148
|
-
* all options.
|
|
149
|
-
*/
|
|
150
|
-
model: STTRealtimeTurnDetectingModel;
|
|
151
|
-
/**
|
|
152
|
-
* Sample rate in Hz.
|
|
153
|
-
*/
|
|
154
|
-
sample_rate: number;
|
|
155
|
-
}
|
|
156
129
|
/**
|
|
157
130
|
* Sent as a JSON-encoded WebSocket text frame to close the session cleanly. All
|
|
158
131
|
* buffered audio will be processed by the model into events before the connection
|
|
159
132
|
* closes.
|
|
160
133
|
*/
|
|
161
|
-
export interface
|
|
134
|
+
export interface STTAutoFinalizeWebsocketRequest {
|
|
162
135
|
/**
|
|
163
136
|
* Command type. Send this as a JSON-encoded WebSocket text frame to close the
|
|
164
137
|
* session.
|
|
@@ -170,25 +143,25 @@ export interface STTTurnsWebsocketRequest {
|
|
|
170
143
|
* between message variants. All emitted text is final — the model does not revise
|
|
171
144
|
* previous output. The `transcript` field is cumulative within a turn.
|
|
172
145
|
*/
|
|
173
|
-
export type
|
|
174
|
-
export interface
|
|
146
|
+
export type STTAutoFinalizeWebsocketResponse = STTAutoFinalizeConnected | STTAutoFinalizeTurnStart | STTAutoFinalizeTurnUpdate | STTAutoFinalizeTurnEagerEnd | STTAutoFinalizeTurnResume | STTAutoFinalizeTurnEnd | STTAPI.STTErrorResponse;
|
|
147
|
+
export interface AutoFinalizeWebsocketParams {
|
|
175
148
|
/**
|
|
176
149
|
* The encoding format for audio data sent to the STT WebSocket.
|
|
177
150
|
*/
|
|
178
151
|
encoding: STTAPI.STTEncoding;
|
|
179
152
|
/**
|
|
180
|
-
* Models that support realtime speech-to-text
|
|
181
|
-
*
|
|
153
|
+
* Models that support realtime speech-to-text (auto finalize). This mode detects
|
|
154
|
+
* when the user is speaking and emits turn events. See
|
|
182
155
|
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
183
156
|
* all options.
|
|
184
157
|
*/
|
|
185
|
-
model:
|
|
158
|
+
model: STTAutoFinalizeModel;
|
|
186
159
|
/**
|
|
187
160
|
* Sample rate in Hz.
|
|
188
161
|
*/
|
|
189
162
|
sample_rate: number;
|
|
190
163
|
}
|
|
191
|
-
export declare namespace
|
|
192
|
-
export { type
|
|
164
|
+
export declare namespace AutoFinalize {
|
|
165
|
+
export { type STTAutoFinalizeConnected as STTAutoFinalizeConnected, type STTAutoFinalizeModel as STTAutoFinalizeModel, type STTAutoFinalizeTurnEagerEnd as STTAutoFinalizeTurnEagerEnd, type STTAutoFinalizeTurnEnd as STTAutoFinalizeTurnEnd, type STTAutoFinalizeTurnResume as STTAutoFinalizeTurnResume, type STTAutoFinalizeTurnStart as STTAutoFinalizeTurnStart, type STTAutoFinalizeTurnUpdate as STTAutoFinalizeTurnUpdate, type STTAutoFinalizeWebsocketRequest as STTAutoFinalizeWebsocketRequest, type STTAutoFinalizeWebsocketResponse as STTAutoFinalizeWebsocketResponse, type AutoFinalizeWebsocketParams as AutoFinalizeWebsocketParams, };
|
|
193
166
|
}
|
|
194
|
-
//# sourceMappingURL=
|
|
167
|
+
//# sourceMappingURL=auto-finalize.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-finalize.d.mts","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/auto-finalize.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,MAAM,mBAAe;AACjC,OAAO,EAAE,cAAc,EAAE,KAAK,2BAA2B,EAAE,KAAK,wBAAwB,EAAE,iBAAa;AAEvG,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CACP,UAAU,EAAE,wBAAwB,EACpC,OAAO,CAAC,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,GACvD,cAAc;CAGlB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GACxC,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,GACzB,2BAA2B,GAC3B,yBAAyB,GACzB,sBAAsB,GACtB,MAAM,CAAC,gBAAgB,CAAC;AAE5B,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,KAAK,EAAE,oBAAoB,CAAC;IAE5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
package/resources/stt/{turn-detecting/turn-detecting.d.ts → auto-finalize/auto-finalize.d.ts}
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { APIResource } from "../../../core/resource.js";
|
|
2
2
|
import * as STTAPI from "../stt.js";
|
|
3
|
-
import {
|
|
4
|
-
export declare class
|
|
3
|
+
import { AutoFinalizeWS, type AutoFinalizeWSClientOptions, type AutoFinalizeWSParameters } from "./ws.js";
|
|
4
|
+
export declare class AutoFinalize extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Realtime Speech-to-Text with user turn detection.
|
|
7
7
|
*
|
|
8
8
|
* This is the recommended STT method for building voice agents.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* - Send audio in chunks (e.g. 100 ms) using `ws.sendRaw()`
|
|
12
|
+
* - Send JSON commands using `ws.send()`
|
|
13
|
+
* - See [examples](https://github.com/cartesia-ai/cartesia-js/tree/main/examples) for reference
|
|
11
14
|
*
|
|
12
15
|
* Supports:
|
|
13
16
|
* - Streaming transcription
|
|
@@ -15,39 +18,19 @@ export declare class TurnDetecting extends APIResource {
|
|
|
15
18
|
* - Eager end-of-turn prediction (`turn.eager_end`, `turn.resume`)
|
|
16
19
|
* - Long-lived connections that reuse a live network connection for low latency
|
|
17
20
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* See [Turns](https://docs.cartesia.ai/use-the-api/stt/turns/turns) for details on handling turn events.
|
|
24
|
-
*/
|
|
25
|
-
websocket(parameters: TurnDetectingWSParameters, options?: TurnDetectingWSClientOptions | null | undefined): TurnDetectingWS;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Models that support realtime speech-to-text with turn-detection. This mode
|
|
29
|
-
* detects when the user is speaking and emits turn events. See
|
|
30
|
-
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
31
|
-
* all options.
|
|
32
|
-
*/
|
|
33
|
-
export type STTRealtimeTurnDetectingModel = 'ink-2' | (string & {});
|
|
34
|
-
/**
|
|
35
|
-
* Sent as a JSON-encoded WebSocket text frame to close the session cleanly. All
|
|
36
|
-
* buffered audio will be processed by the model into events before the connection
|
|
37
|
-
* closes.
|
|
38
|
-
*/
|
|
39
|
-
export interface STTTurnsCloseCommand {
|
|
40
|
-
/**
|
|
41
|
-
* Command type. Send this as a JSON-encoded WebSocket text frame to close the
|
|
42
|
-
* session.
|
|
21
|
+
* See also:
|
|
22
|
+
* - [API Reference](https://docs.cartesia.ai/api-reference/stt/turns/websocket)
|
|
23
|
+
* - [Turn Events](https://docs.cartesia.ai/use-the-api/stt/turns/turns)
|
|
24
|
+
* - [Common Pitfalls](https://docs.cartesia.ai/use-the-api/stt/common-pitfalls)
|
|
25
|
+
* - [Concurrency Limits and Timeouts](https://docs.cartesia.ai/use-the-api/concurrency-limits-and-timeouts)
|
|
43
26
|
*/
|
|
44
|
-
|
|
27
|
+
websocket(parameters: AutoFinalizeWSParameters, options?: AutoFinalizeWSClientOptions | null | undefined): AutoFinalizeWS;
|
|
45
28
|
}
|
|
46
29
|
/**
|
|
47
30
|
* Fires once when the WebSocket connection is established. You do not need to wait
|
|
48
31
|
* for this event before sending audio.
|
|
49
32
|
*/
|
|
50
|
-
export interface
|
|
33
|
+
export interface STTAutoFinalizeConnected {
|
|
51
34
|
/**
|
|
52
35
|
* Unique identifier for this connection.
|
|
53
36
|
*/
|
|
@@ -57,10 +40,17 @@ export interface STTTurnsConnected {
|
|
|
57
40
|
*/
|
|
58
41
|
type: 'connected';
|
|
59
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Models that support realtime speech-to-text (auto finalize). This mode detects
|
|
45
|
+
* when the user is speaking and emits turn events. See
|
|
46
|
+
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
47
|
+
* all options.
|
|
48
|
+
*/
|
|
49
|
+
export type STTAutoFinalizeModel = 'ink-2' | (string & {});
|
|
60
50
|
/**
|
|
61
51
|
* [PREVIEW] Fires when the model predicts that the user might be done speaking.
|
|
62
52
|
*/
|
|
63
|
-
export interface
|
|
53
|
+
export interface STTAutoFinalizeTurnEagerEnd {
|
|
64
54
|
/**
|
|
65
55
|
* Unique identifier for this connection. Does not change between turns.
|
|
66
56
|
*/
|
|
@@ -77,7 +67,7 @@ export interface STTTurnsTurnEagerEnd {
|
|
|
77
67
|
/**
|
|
78
68
|
* Marks the end of a user turn.
|
|
79
69
|
*/
|
|
80
|
-
export interface
|
|
70
|
+
export interface STTAutoFinalizeTurnEnd {
|
|
81
71
|
/**
|
|
82
72
|
* Unique identifier for this connection. Does not change between turns.
|
|
83
73
|
*/
|
|
@@ -94,7 +84,7 @@ export interface STTTurnsTurnEnd {
|
|
|
94
84
|
/**
|
|
95
85
|
* [PREVIEW] Fires after `turn.eager_end` if the user turn has not actually ended.
|
|
96
86
|
*/
|
|
97
|
-
export interface
|
|
87
|
+
export interface STTAutoFinalizeTurnResume {
|
|
98
88
|
/**
|
|
99
89
|
* Unique identifier for this connection. Does not change between turns.
|
|
100
90
|
*/
|
|
@@ -108,7 +98,7 @@ export interface STTTurnsTurnResume {
|
|
|
108
98
|
* Marks the start of a user turn. Fires quickly after the user begins speaking.
|
|
109
99
|
* This event can be used to interrupt your agent to avoid talking over the user.
|
|
110
100
|
*/
|
|
111
|
-
export interface
|
|
101
|
+
export interface STTAutoFinalizeTurnStart {
|
|
112
102
|
/**
|
|
113
103
|
* Unique identifier for this connection. Does not change between turns.
|
|
114
104
|
*/
|
|
@@ -121,7 +111,7 @@ export interface STTTurnsTurnStart {
|
|
|
121
111
|
/**
|
|
122
112
|
* Fires repeatedly as the model transcribes the current user turn.
|
|
123
113
|
*/
|
|
124
|
-
export interface
|
|
114
|
+
export interface STTAutoFinalizeTurnUpdate {
|
|
125
115
|
/**
|
|
126
116
|
* Unique identifier for this connection. Does not change between turns.
|
|
127
117
|
*/
|
|
@@ -136,29 +126,12 @@ export interface STTTurnsTurnUpdate {
|
|
|
136
126
|
*/
|
|
137
127
|
type: 'turn.update';
|
|
138
128
|
}
|
|
139
|
-
export interface STTTurnsWebsocketQueryParams {
|
|
140
|
-
/**
|
|
141
|
-
* The encoding format for audio data sent to the STT WebSocket.
|
|
142
|
-
*/
|
|
143
|
-
encoding: STTAPI.STTEncoding;
|
|
144
|
-
/**
|
|
145
|
-
* Models that support realtime speech-to-text with turn-detection. This mode
|
|
146
|
-
* detects when the user is speaking and emits turn events. See
|
|
147
|
-
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
148
|
-
* all options.
|
|
149
|
-
*/
|
|
150
|
-
model: STTRealtimeTurnDetectingModel;
|
|
151
|
-
/**
|
|
152
|
-
* Sample rate in Hz.
|
|
153
|
-
*/
|
|
154
|
-
sample_rate: number;
|
|
155
|
-
}
|
|
156
129
|
/**
|
|
157
130
|
* Sent as a JSON-encoded WebSocket text frame to close the session cleanly. All
|
|
158
131
|
* buffered audio will be processed by the model into events before the connection
|
|
159
132
|
* closes.
|
|
160
133
|
*/
|
|
161
|
-
export interface
|
|
134
|
+
export interface STTAutoFinalizeWebsocketRequest {
|
|
162
135
|
/**
|
|
163
136
|
* Command type. Send this as a JSON-encoded WebSocket text frame to close the
|
|
164
137
|
* session.
|
|
@@ -170,25 +143,25 @@ export interface STTTurnsWebsocketRequest {
|
|
|
170
143
|
* between message variants. All emitted text is final — the model does not revise
|
|
171
144
|
* previous output. The `transcript` field is cumulative within a turn.
|
|
172
145
|
*/
|
|
173
|
-
export type
|
|
174
|
-
export interface
|
|
146
|
+
export type STTAutoFinalizeWebsocketResponse = STTAutoFinalizeConnected | STTAutoFinalizeTurnStart | STTAutoFinalizeTurnUpdate | STTAutoFinalizeTurnEagerEnd | STTAutoFinalizeTurnResume | STTAutoFinalizeTurnEnd | STTAPI.STTErrorResponse;
|
|
147
|
+
export interface AutoFinalizeWebsocketParams {
|
|
175
148
|
/**
|
|
176
149
|
* The encoding format for audio data sent to the STT WebSocket.
|
|
177
150
|
*/
|
|
178
151
|
encoding: STTAPI.STTEncoding;
|
|
179
152
|
/**
|
|
180
|
-
* Models that support realtime speech-to-text
|
|
181
|
-
*
|
|
153
|
+
* Models that support realtime speech-to-text (auto finalize). This mode detects
|
|
154
|
+
* when the user is speaking and emits turn events. See
|
|
182
155
|
* [the docs](https://docs.cartesia.ai/build-with-cartesia/stt-models/latest) for
|
|
183
156
|
* all options.
|
|
184
157
|
*/
|
|
185
|
-
model:
|
|
158
|
+
model: STTAutoFinalizeModel;
|
|
186
159
|
/**
|
|
187
160
|
* Sample rate in Hz.
|
|
188
161
|
*/
|
|
189
162
|
sample_rate: number;
|
|
190
163
|
}
|
|
191
|
-
export declare namespace
|
|
192
|
-
export { type
|
|
164
|
+
export declare namespace AutoFinalize {
|
|
165
|
+
export { type STTAutoFinalizeConnected as STTAutoFinalizeConnected, type STTAutoFinalizeModel as STTAutoFinalizeModel, type STTAutoFinalizeTurnEagerEnd as STTAutoFinalizeTurnEagerEnd, type STTAutoFinalizeTurnEnd as STTAutoFinalizeTurnEnd, type STTAutoFinalizeTurnResume as STTAutoFinalizeTurnResume, type STTAutoFinalizeTurnStart as STTAutoFinalizeTurnStart, type STTAutoFinalizeTurnUpdate as STTAutoFinalizeTurnUpdate, type STTAutoFinalizeWebsocketRequest as STTAutoFinalizeWebsocketRequest, type STTAutoFinalizeWebsocketResponse as STTAutoFinalizeWebsocketResponse, type AutoFinalizeWebsocketParams as AutoFinalizeWebsocketParams, };
|
|
193
166
|
}
|
|
194
|
-
//# sourceMappingURL=
|
|
167
|
+
//# sourceMappingURL=auto-finalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-finalize.d.ts","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/auto-finalize.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,MAAM,kBAAe;AACjC,OAAO,EAAE,cAAc,EAAE,KAAK,2BAA2B,EAAE,KAAK,wBAAwB,EAAE,gBAAa;AAEvG,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CACP,UAAU,EAAE,wBAAwB,EACpC,OAAO,CAAC,EAAE,2BAA2B,GAAG,IAAI,GAAG,SAAS,GACvD,cAAc;CAGlB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,gCAAgC,GACxC,wBAAwB,GACxB,wBAAwB,GACxB,yBAAyB,GACzB,2BAA2B,GAC3B,yBAAyB,GACzB,sBAAsB,GACtB,MAAM,CAAC,gBAAgB,CAAC;AAE5B,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,KAAK,EAAE,oBAAoB,CAAC;IAE5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AutoFinalize = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const ws_1 = require("./ws.js");
|
|
7
|
+
class AutoFinalize extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Realtime Speech-to-Text with user turn detection.
|
|
10
|
+
*
|
|
11
|
+
* This is the recommended STT method for building voice agents.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* - Send audio in chunks (e.g. 100 ms) using `ws.sendRaw()`
|
|
15
|
+
* - Send JSON commands using `ws.send()`
|
|
16
|
+
* - See [examples](https://github.com/cartesia-ai/cartesia-js/tree/main/examples) for reference
|
|
17
|
+
*
|
|
18
|
+
* Supports:
|
|
19
|
+
* - Streaming transcription
|
|
20
|
+
* - Native turn detection (`turn.start`, `turn.update`, `turn.end`)
|
|
21
|
+
* - Eager end-of-turn prediction (`turn.eager_end`, `turn.resume`)
|
|
22
|
+
* - Long-lived connections that reuse a live network connection for low latency
|
|
23
|
+
*
|
|
24
|
+
* See also:
|
|
25
|
+
* - [API Reference](https://docs.cartesia.ai/api-reference/stt/turns/websocket)
|
|
26
|
+
* - [Turn Events](https://docs.cartesia.ai/use-the-api/stt/turns/turns)
|
|
27
|
+
* - [Common Pitfalls](https://docs.cartesia.ai/use-the-api/stt/common-pitfalls)
|
|
28
|
+
* - [Concurrency Limits and Timeouts](https://docs.cartesia.ai/use-the-api/concurrency-limits-and-timeouts)
|
|
29
|
+
*/
|
|
30
|
+
websocket(parameters, options) {
|
|
31
|
+
return new ws_1.AutoFinalizeWS(this._client, parameters, options);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AutoFinalize = AutoFinalize;
|
|
35
|
+
//# sourceMappingURL=auto-finalize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-finalize.js","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/auto-finalize.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,gCAAuG;AAEvG,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CACP,UAAoC,EACpC,OAAwD;QAExD,OAAO,IAAI,mBAAc,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF;AA7BD,oCA6BC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import { AutoFinalizeWS } from "./ws.mjs";
|
|
4
|
+
export class AutoFinalize extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Realtime Speech-to-Text with user turn detection.
|
|
7
|
+
*
|
|
8
|
+
* This is the recommended STT method for building voice agents.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* - Send audio in chunks (e.g. 100 ms) using `ws.sendRaw()`
|
|
12
|
+
* - Send JSON commands using `ws.send()`
|
|
13
|
+
* - See [examples](https://github.com/cartesia-ai/cartesia-js/tree/main/examples) for reference
|
|
14
|
+
*
|
|
15
|
+
* Supports:
|
|
16
|
+
* - Streaming transcription
|
|
17
|
+
* - Native turn detection (`turn.start`, `turn.update`, `turn.end`)
|
|
18
|
+
* - Eager end-of-turn prediction (`turn.eager_end`, `turn.resume`)
|
|
19
|
+
* - Long-lived connections that reuse a live network connection for low latency
|
|
20
|
+
*
|
|
21
|
+
* See also:
|
|
22
|
+
* - [API Reference](https://docs.cartesia.ai/api-reference/stt/turns/websocket)
|
|
23
|
+
* - [Turn Events](https://docs.cartesia.ai/use-the-api/stt/turns/turns)
|
|
24
|
+
* - [Common Pitfalls](https://docs.cartesia.ai/use-the-api/stt/common-pitfalls)
|
|
25
|
+
* - [Concurrency Limits and Timeouts](https://docs.cartesia.ai/use-the-api/concurrency-limits-and-timeouts)
|
|
26
|
+
*/
|
|
27
|
+
websocket(parameters, options) {
|
|
28
|
+
return new AutoFinalizeWS(this._client, parameters, options);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=auto-finalize.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-finalize.mjs","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/auto-finalize.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,cAAc,EAAmE,iBAAa;AAEvG,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CACP,UAAoC,EACpC,OAAwD;QAExD,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AutoFinalize, type STTAutoFinalizeConnected, type STTAutoFinalizeModel, type STTAutoFinalizeTurnEagerEnd, type STTAutoFinalizeTurnEnd, type STTAutoFinalizeTurnResume, type STTAutoFinalizeTurnStart, type STTAutoFinalizeTurnUpdate, type STTAutoFinalizeWebsocketRequest, type STTAutoFinalizeWebsocketResponse, type AutoFinalizeWebsocketParams, } from "./auto-finalize.mjs";
|
|
2
|
+
export { type AutoFinalizeWSClientOptions } from "./ws.mjs";
|
|
3
|
+
export { type AutoFinalizeWSReconnectOptions, type AutoFinalizeWSParameters } from "./ws-base.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,GACjC,4BAAwB;AACzB,OAAO,EAAE,KAAK,2BAA2B,EAAE,iBAAa;AACxD,OAAO,EAAE,KAAK,8BAA8B,EAAE,KAAK,wBAAwB,EAAE,sBAAkB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AutoFinalize, type STTAutoFinalizeConnected, type STTAutoFinalizeModel, type STTAutoFinalizeTurnEagerEnd, type STTAutoFinalizeTurnEnd, type STTAutoFinalizeTurnResume, type STTAutoFinalizeTurnStart, type STTAutoFinalizeTurnUpdate, type STTAutoFinalizeWebsocketRequest, type STTAutoFinalizeWebsocketResponse, type AutoFinalizeWebsocketParams, } from "./auto-finalize.js";
|
|
2
|
+
export { type AutoFinalizeWSClientOptions } from "./ws.js";
|
|
3
|
+
export { type AutoFinalizeWSReconnectOptions, type AutoFinalizeWSParameters } from "./ws-base.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,2BAA2B,GACjC,2BAAwB;AACzB,OAAO,EAAE,KAAK,2BAA2B,EAAE,gBAAa;AACxD,OAAO,EAAE,KAAK,8BAA8B,EAAE,KAAK,wBAAwB,EAAE,qBAAkB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AutoFinalize = void 0;
|
|
5
|
+
var auto_finalize_1 = require("./auto-finalize.js");
|
|
6
|
+
Object.defineProperty(exports, "AutoFinalize", { enumerable: true, get: function () { return auto_finalize_1.AutoFinalize; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oDAYyB;AAXvB,6GAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,YAAY,GAWb,4BAAwB"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import * as STTAPI from "../stt.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as AutoFinalizeAPI from "./auto-finalize.mjs";
|
|
3
3
|
import { Cartesia } from "../../../client.mjs";
|
|
4
4
|
import { EventEmitter } from "../../../core/EventEmitter.mjs";
|
|
5
5
|
import { CartesiaError } from "../../../core/error.mjs";
|
|
6
6
|
import type { RawWebSocketData, ReconnectingEvent, UnsentMessage } from "../../../internal/ws.mjs";
|
|
7
|
-
import {
|
|
8
|
-
export type
|
|
7
|
+
import { AutoFinalizeWSParameters } from "./ws-base.mjs";
|
|
8
|
+
export type AutoFinalizeStreamMessage = {
|
|
9
9
|
type: 'connecting' | 'open' | 'closing';
|
|
10
10
|
} | {
|
|
11
11
|
type: 'close';
|
|
12
12
|
code: number;
|
|
13
13
|
reason: string;
|
|
14
|
-
unsent: UnsentMessage<
|
|
14
|
+
unsent: UnsentMessage<AutoFinalizeAPI.STTAutoFinalizeWebsocketRequest>[];
|
|
15
15
|
} | {
|
|
16
16
|
type: 'reconnecting';
|
|
17
|
-
reconnect: ReconnectingEvent<
|
|
17
|
+
reconnect: ReconnectingEvent<AutoFinalizeWSParameters>;
|
|
18
18
|
} | {
|
|
19
19
|
type: 'reconnected';
|
|
20
20
|
} | {
|
|
21
21
|
type: 'message';
|
|
22
|
-
message:
|
|
22
|
+
message: AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse;
|
|
23
23
|
} | {
|
|
24
24
|
type: 'raw';
|
|
25
25
|
data: RawWebSocketData;
|
|
@@ -38,22 +38,22 @@ type Simplify<T> = {
|
|
|
38
38
|
[KeyType in keyof T]: T[KeyType];
|
|
39
39
|
} & {};
|
|
40
40
|
type WebSocketEvents = Simplify<{
|
|
41
|
-
event: (event:
|
|
41
|
+
event: (event: AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse) => void;
|
|
42
42
|
raw: (data: RawWebSocketData) => void;
|
|
43
43
|
error: (error: WebSocketError) => void;
|
|
44
|
-
close: (code: number, reason: string, unsent: UnsentMessage<
|
|
45
|
-
reconnecting: (event: ReconnectingEvent<
|
|
44
|
+
close: (code: number, reason: string, unsent: UnsentMessage<AutoFinalizeAPI.STTAutoFinalizeWebsocketRequest>[]) => void;
|
|
45
|
+
reconnecting: (event: ReconnectingEvent<AutoFinalizeWSParameters>) => void;
|
|
46
46
|
reconnected: () => void;
|
|
47
47
|
} & {
|
|
48
|
-
[EventType in Exclude<NonNullable<
|
|
48
|
+
[EventType in Exclude<NonNullable<AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse['type']>, 'error'>]: (event: Extract<AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse, {
|
|
49
49
|
type?: EventType;
|
|
50
50
|
}>) => unknown;
|
|
51
51
|
}>;
|
|
52
|
-
export declare abstract class
|
|
52
|
+
export declare abstract class AutoFinalizeEmitter extends EventEmitter<WebSocketEvents> {
|
|
53
53
|
/**
|
|
54
54
|
* Send an event to the API.
|
|
55
55
|
*/
|
|
56
|
-
abstract send(event:
|
|
56
|
+
abstract send(event: AutoFinalizeAPI.STTAutoFinalizeWebsocketRequest): void;
|
|
57
57
|
/**
|
|
58
58
|
* Send raw data over the WebSocket without JSON serialization.
|
|
59
59
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-base.d.mts","sourceRoot":"","sources":["../../../src/resources/stt/auto-finalize/internal-base.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import * as STTAPI from "../stt.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as AutoFinalizeAPI from "./auto-finalize.js";
|
|
3
3
|
import { Cartesia } from "../../../client.js";
|
|
4
4
|
import { EventEmitter } from "../../../core/EventEmitter.js";
|
|
5
5
|
import { CartesiaError } from "../../../core/error.js";
|
|
6
6
|
import type { RawWebSocketData, ReconnectingEvent, UnsentMessage } from "../../../internal/ws.js";
|
|
7
|
-
import {
|
|
8
|
-
export type
|
|
7
|
+
import { AutoFinalizeWSParameters } from "./ws-base.js";
|
|
8
|
+
export type AutoFinalizeStreamMessage = {
|
|
9
9
|
type: 'connecting' | 'open' | 'closing';
|
|
10
10
|
} | {
|
|
11
11
|
type: 'close';
|
|
12
12
|
code: number;
|
|
13
13
|
reason: string;
|
|
14
|
-
unsent: UnsentMessage<
|
|
14
|
+
unsent: UnsentMessage<AutoFinalizeAPI.STTAutoFinalizeWebsocketRequest>[];
|
|
15
15
|
} | {
|
|
16
16
|
type: 'reconnecting';
|
|
17
|
-
reconnect: ReconnectingEvent<
|
|
17
|
+
reconnect: ReconnectingEvent<AutoFinalizeWSParameters>;
|
|
18
18
|
} | {
|
|
19
19
|
type: 'reconnected';
|
|
20
20
|
} | {
|
|
21
21
|
type: 'message';
|
|
22
|
-
message:
|
|
22
|
+
message: AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse;
|
|
23
23
|
} | {
|
|
24
24
|
type: 'raw';
|
|
25
25
|
data: RawWebSocketData;
|
|
@@ -38,22 +38,22 @@ type Simplify<T> = {
|
|
|
38
38
|
[KeyType in keyof T]: T[KeyType];
|
|
39
39
|
} & {};
|
|
40
40
|
type WebSocketEvents = Simplify<{
|
|
41
|
-
event: (event:
|
|
41
|
+
event: (event: AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse) => void;
|
|
42
42
|
raw: (data: RawWebSocketData) => void;
|
|
43
43
|
error: (error: WebSocketError) => void;
|
|
44
|
-
close: (code: number, reason: string, unsent: UnsentMessage<
|
|
45
|
-
reconnecting: (event: ReconnectingEvent<
|
|
44
|
+
close: (code: number, reason: string, unsent: UnsentMessage<AutoFinalizeAPI.STTAutoFinalizeWebsocketRequest>[]) => void;
|
|
45
|
+
reconnecting: (event: ReconnectingEvent<AutoFinalizeWSParameters>) => void;
|
|
46
46
|
reconnected: () => void;
|
|
47
47
|
} & {
|
|
48
|
-
[EventType in Exclude<NonNullable<
|
|
48
|
+
[EventType in Exclude<NonNullable<AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse['type']>, 'error'>]: (event: Extract<AutoFinalizeAPI.STTAutoFinalizeWebsocketResponse, {
|
|
49
49
|
type?: EventType;
|
|
50
50
|
}>) => unknown;
|
|
51
51
|
}>;
|
|
52
|
-
export declare abstract class
|
|
52
|
+
export declare abstract class AutoFinalizeEmitter extends EventEmitter<WebSocketEvents> {
|
|
53
53
|
/**
|
|
54
54
|
* Send an event to the API.
|
|
55
55
|
*/
|
|
56
|
-
abstract send(event:
|
|
56
|
+
abstract send(event: AutoFinalizeAPI.STTAutoFinalizeWebsocketRequest): void;
|
|
57
57
|
/**
|
|
58
58
|
* Send raw data over the WebSocket without JSON serialization.
|
|
59
59
|
*/
|