@deepgram/sdk 5.0.0-alpha.1 → 5.0.0-alpha.3
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/README.md +44 -1
- package/dist/browser/index.global.js +8821 -0
- package/dist/cjs/BaseClient.js +3 -0
- package/dist/cjs/CustomClient.d.ts +9 -1
- package/dist/cjs/CustomClient.js +232 -21
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1Settings.d.ts +3 -43
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.ts +26 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.js +3 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.d.ts +28 -13
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.js +19 -17
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.d.ts +28 -13
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.js +19 -17
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.d.ts +115 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.js +57 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.d.ts +18 -3
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.js +2 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/index.js +2 -0
- package/dist/cjs/api/resources/listen/resources/v1/types/ListenV1Results.d.ts +3 -3
- package/dist/cjs/api/types/SpeakV1SampleRate.d.ts +1 -1
- package/dist/cjs/api/types/SpeakV1SampleRate.js +1 -1
- package/dist/cjs/core/websocket/ws.d.ts +0 -1
- package/dist/cjs/core/websocket/ws.js +9 -47
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/BaseClient.mjs +3 -0
- package/dist/esm/CustomClient.d.mts +9 -1
- package/dist/esm/CustomClient.mjs +232 -21
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1Settings.d.mts +3 -43
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.mts +26 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.mjs +2 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.d.mts +28 -13
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.mjs +19 -17
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.d.mts +28 -13
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.mjs +19 -17
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.d.mts +115 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.mjs +54 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.d.mts +18 -3
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.mjs +2 -0
- package/dist/esm/api/resources/agent/resources/v1/types/index.d.mts +2 -0
- package/dist/esm/api/resources/agent/resources/v1/types/index.mjs +2 -0
- package/dist/esm/api/resources/listen/resources/v1/types/ListenV1Results.d.mts +3 -3
- package/dist/esm/api/types/SpeakV1SampleRate.d.mts +1 -1
- package/dist/esm/api/types/SpeakV1SampleRate.mjs +1 -1
- package/dist/esm/core/websocket/ws.d.mts +0 -1
- package/dist/esm/core/websocket/ws.mjs +9 -47
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +1 -28
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
export var AgentV1SettingsAgentSpeakEndpointProvider;
|
|
3
3
|
(function (AgentV1SettingsAgentSpeakEndpointProvider) {
|
|
4
|
-
let
|
|
5
|
-
(function (
|
|
4
|
+
let Deepgram;
|
|
5
|
+
(function (Deepgram) {
|
|
6
6
|
/** Deepgram TTS model */
|
|
7
|
-
|
|
7
|
+
Deepgram.Model = {
|
|
8
8
|
AuraAsteriaEn: "aura-asteria-en",
|
|
9
9
|
AuraLunaEn: "aura-luna-en",
|
|
10
10
|
AuraStellaEn: "aura-stella-en",
|
|
@@ -69,33 +69,35 @@ export var AgentV1SettingsAgentSpeakEndpointProvider;
|
|
|
69
69
|
Aura2EstrellaEs: "aura-2-estrella-es",
|
|
70
70
|
Aura2JavierEs: "aura-2-javier-es",
|
|
71
71
|
};
|
|
72
|
-
})(
|
|
73
|
-
let
|
|
74
|
-
(function (
|
|
72
|
+
})(Deepgram = AgentV1SettingsAgentSpeakEndpointProvider.Deepgram || (AgentV1SettingsAgentSpeakEndpointProvider.Deepgram = {}));
|
|
73
|
+
let ElevenLabs;
|
|
74
|
+
(function (ElevenLabs) {
|
|
75
75
|
/** Eleven Labs model ID */
|
|
76
|
-
|
|
76
|
+
ElevenLabs.ModelId = {
|
|
77
77
|
ElevenTurboV25: "eleven_turbo_v2_5",
|
|
78
78
|
ElevenMonolingualV1: "eleven_monolingual_v1",
|
|
79
79
|
ElevenMultilingualV2: "eleven_multilingual_v2",
|
|
80
80
|
};
|
|
81
|
-
})(
|
|
82
|
-
let
|
|
83
|
-
(function (
|
|
81
|
+
})(ElevenLabs = AgentV1SettingsAgentSpeakEndpointProvider.ElevenLabs || (AgentV1SettingsAgentSpeakEndpointProvider.ElevenLabs = {}));
|
|
82
|
+
let Cartesia;
|
|
83
|
+
(function (Cartesia) {
|
|
84
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
85
|
+
Cartesia.Version = {};
|
|
84
86
|
/** Cartesia model ID */
|
|
85
|
-
|
|
87
|
+
Cartesia.ModelId = {
|
|
86
88
|
Sonic2: "sonic-2",
|
|
87
89
|
SonicMultilingual: "sonic-multilingual",
|
|
88
90
|
};
|
|
89
|
-
})(
|
|
90
|
-
let
|
|
91
|
-
(function (
|
|
91
|
+
})(Cartesia = AgentV1SettingsAgentSpeakEndpointProvider.Cartesia || (AgentV1SettingsAgentSpeakEndpointProvider.Cartesia = {}));
|
|
92
|
+
let OpenAi;
|
|
93
|
+
(function (OpenAi) {
|
|
92
94
|
/** OpenAI TTS model */
|
|
93
|
-
|
|
95
|
+
OpenAi.Model = {
|
|
94
96
|
Tts1: "tts-1",
|
|
95
97
|
Tts1Hd: "tts-1-hd",
|
|
96
98
|
};
|
|
97
99
|
/** OpenAI voice */
|
|
98
|
-
|
|
100
|
+
OpenAi.Voice = {
|
|
99
101
|
Alloy: "alloy",
|
|
100
102
|
Echo: "echo",
|
|
101
103
|
Fable: "fable",
|
|
@@ -103,7 +105,7 @@ export var AgentV1SettingsAgentSpeakEndpointProvider;
|
|
|
103
105
|
Nova: "nova",
|
|
104
106
|
Shimmer: "shimmer",
|
|
105
107
|
};
|
|
106
|
-
})(
|
|
108
|
+
})(OpenAi = AgentV1SettingsAgentSpeakEndpointProvider.OpenAi || (AgentV1SettingsAgentSpeakEndpointProvider.OpenAi = {}));
|
|
107
109
|
let AgentV1SettingsAgentSpeakEndpointProviderAwsPolly;
|
|
108
110
|
(function (AgentV1SettingsAgentSpeakEndpointProviderAwsPolly) {
|
|
109
111
|
/** AWS Polly voice name */
|
|
@@ -3,10 +3,12 @@ export type AgentV1SettingsAgentSpeakOneItemProvider = Deepgram.agent.AgentV1Set
|
|
|
3
3
|
export declare namespace AgentV1SettingsAgentSpeakOneItemProvider {
|
|
4
4
|
interface Deepgram {
|
|
5
5
|
type: "deepgram";
|
|
6
|
+
/** The REST API version for the Deepgram text-to-speech API */
|
|
7
|
+
version?: "v1";
|
|
6
8
|
/** Deepgram TTS model */
|
|
7
|
-
model:
|
|
9
|
+
model: Deepgram.Model;
|
|
8
10
|
}
|
|
9
|
-
namespace
|
|
11
|
+
namespace Deepgram {
|
|
10
12
|
/** Deepgram TTS model */
|
|
11
13
|
const Model: {
|
|
12
14
|
readonly AuraAsteriaEn: "aura-asteria-en";
|
|
@@ -77,12 +79,16 @@ export declare namespace AgentV1SettingsAgentSpeakOneItemProvider {
|
|
|
77
79
|
}
|
|
78
80
|
interface ElevenLabs {
|
|
79
81
|
type: "eleven_labs";
|
|
82
|
+
/** The REST API version for the Deepgram text-to-speech API */
|
|
83
|
+
version?: "v1";
|
|
80
84
|
/** Eleven Labs model ID */
|
|
81
|
-
model_id:
|
|
82
|
-
/**
|
|
85
|
+
model_id: ElevenLabs.ModelId;
|
|
86
|
+
/** Optional language to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the ElevenLabs API */
|
|
87
|
+
language?: string;
|
|
88
|
+
/** Use the `language` field instead. */
|
|
83
89
|
language_code?: string;
|
|
84
90
|
}
|
|
85
|
-
namespace
|
|
91
|
+
namespace ElevenLabs {
|
|
86
92
|
/** Eleven Labs model ID */
|
|
87
93
|
const ModelId: {
|
|
88
94
|
readonly ElevenTurboV25: "eleven_turbo_v2_5";
|
|
@@ -93,13 +99,18 @@ export declare namespace AgentV1SettingsAgentSpeakOneItemProvider {
|
|
|
93
99
|
}
|
|
94
100
|
interface Cartesia {
|
|
95
101
|
type: "cartesia";
|
|
102
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
103
|
+
version?: Cartesia.Version;
|
|
96
104
|
/** Cartesia model ID */
|
|
97
|
-
model_id:
|
|
98
|
-
voice:
|
|
105
|
+
model_id: Cartesia.ModelId;
|
|
106
|
+
voice: Cartesia.Voice;
|
|
99
107
|
/** Cartesia language code */
|
|
100
108
|
language?: string;
|
|
101
109
|
}
|
|
102
|
-
namespace
|
|
110
|
+
namespace Cartesia {
|
|
111
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
112
|
+
const Version: {};
|
|
113
|
+
type Version = (typeof Version)[keyof typeof Version];
|
|
103
114
|
/** Cartesia model ID */
|
|
104
115
|
const ModelId: {
|
|
105
116
|
readonly Sonic2: "sonic-2";
|
|
@@ -115,12 +126,14 @@ export declare namespace AgentV1SettingsAgentSpeakOneItemProvider {
|
|
|
115
126
|
}
|
|
116
127
|
interface OpenAi {
|
|
117
128
|
type: "open_ai";
|
|
129
|
+
/** The REST API version for the OpenAI text-to-speech API */
|
|
130
|
+
version?: "v1";
|
|
118
131
|
/** OpenAI TTS model */
|
|
119
|
-
model:
|
|
132
|
+
model: OpenAi.Model;
|
|
120
133
|
/** OpenAI voice */
|
|
121
|
-
voice:
|
|
134
|
+
voice: OpenAi.Voice;
|
|
122
135
|
}
|
|
123
|
-
namespace
|
|
136
|
+
namespace OpenAi {
|
|
124
137
|
/** OpenAI TTS model */
|
|
125
138
|
const Model: {
|
|
126
139
|
readonly Tts1: "tts-1";
|
|
@@ -142,8 +155,10 @@ export declare namespace AgentV1SettingsAgentSpeakOneItemProvider {
|
|
|
142
155
|
type: "aws_polly";
|
|
143
156
|
/** AWS Polly voice name */
|
|
144
157
|
voice: AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.Voice;
|
|
145
|
-
/** Language code
|
|
146
|
-
|
|
158
|
+
/** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the AWS Polly API */
|
|
159
|
+
language: string;
|
|
160
|
+
/** Use the `language` field instead. */
|
|
161
|
+
language_code?: string;
|
|
147
162
|
engine: AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.Engine;
|
|
148
163
|
credentials: AgentV1SettingsAgentSpeakOneItemProviderAwsPolly.Credentials;
|
|
149
164
|
}
|
package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
export var AgentV1SettingsAgentSpeakOneItemProvider;
|
|
3
3
|
(function (AgentV1SettingsAgentSpeakOneItemProvider) {
|
|
4
|
-
let
|
|
5
|
-
(function (
|
|
4
|
+
let Deepgram;
|
|
5
|
+
(function (Deepgram) {
|
|
6
6
|
/** Deepgram TTS model */
|
|
7
|
-
|
|
7
|
+
Deepgram.Model = {
|
|
8
8
|
AuraAsteriaEn: "aura-asteria-en",
|
|
9
9
|
AuraLunaEn: "aura-luna-en",
|
|
10
10
|
AuraStellaEn: "aura-stella-en",
|
|
@@ -69,33 +69,35 @@ export var AgentV1SettingsAgentSpeakOneItemProvider;
|
|
|
69
69
|
Aura2EstrellaEs: "aura-2-estrella-es",
|
|
70
70
|
Aura2JavierEs: "aura-2-javier-es",
|
|
71
71
|
};
|
|
72
|
-
})(
|
|
73
|
-
let
|
|
74
|
-
(function (
|
|
72
|
+
})(Deepgram = AgentV1SettingsAgentSpeakOneItemProvider.Deepgram || (AgentV1SettingsAgentSpeakOneItemProvider.Deepgram = {}));
|
|
73
|
+
let ElevenLabs;
|
|
74
|
+
(function (ElevenLabs) {
|
|
75
75
|
/** Eleven Labs model ID */
|
|
76
|
-
|
|
76
|
+
ElevenLabs.ModelId = {
|
|
77
77
|
ElevenTurboV25: "eleven_turbo_v2_5",
|
|
78
78
|
ElevenMonolingualV1: "eleven_monolingual_v1",
|
|
79
79
|
ElevenMultilingualV2: "eleven_multilingual_v2",
|
|
80
80
|
};
|
|
81
|
-
})(
|
|
82
|
-
let
|
|
83
|
-
(function (
|
|
81
|
+
})(ElevenLabs = AgentV1SettingsAgentSpeakOneItemProvider.ElevenLabs || (AgentV1SettingsAgentSpeakOneItemProvider.ElevenLabs = {}));
|
|
82
|
+
let Cartesia;
|
|
83
|
+
(function (Cartesia) {
|
|
84
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
85
|
+
Cartesia.Version = {};
|
|
84
86
|
/** Cartesia model ID */
|
|
85
|
-
|
|
87
|
+
Cartesia.ModelId = {
|
|
86
88
|
Sonic2: "sonic-2",
|
|
87
89
|
SonicMultilingual: "sonic-multilingual",
|
|
88
90
|
};
|
|
89
|
-
})(
|
|
90
|
-
let
|
|
91
|
-
(function (
|
|
91
|
+
})(Cartesia = AgentV1SettingsAgentSpeakOneItemProvider.Cartesia || (AgentV1SettingsAgentSpeakOneItemProvider.Cartesia = {}));
|
|
92
|
+
let OpenAi;
|
|
93
|
+
(function (OpenAi) {
|
|
92
94
|
/** OpenAI TTS model */
|
|
93
|
-
|
|
95
|
+
OpenAi.Model = {
|
|
94
96
|
Tts1: "tts-1",
|
|
95
97
|
Tts1Hd: "tts-1-hd",
|
|
96
98
|
};
|
|
97
99
|
/** OpenAI voice */
|
|
98
|
-
|
|
100
|
+
OpenAi.Voice = {
|
|
99
101
|
Alloy: "alloy",
|
|
100
102
|
Echo: "echo",
|
|
101
103
|
Fable: "fable",
|
|
@@ -103,7 +105,7 @@ export var AgentV1SettingsAgentSpeakOneItemProvider;
|
|
|
103
105
|
Nova: "nova",
|
|
104
106
|
Shimmer: "shimmer",
|
|
105
107
|
};
|
|
106
|
-
})(
|
|
108
|
+
})(OpenAi = AgentV1SettingsAgentSpeakOneItemProvider.OpenAi || (AgentV1SettingsAgentSpeakOneItemProvider.OpenAi = {}));
|
|
107
109
|
let AgentV1SettingsAgentSpeakOneItemProviderAwsPolly;
|
|
108
110
|
(function (AgentV1SettingsAgentSpeakOneItemProviderAwsPolly) {
|
|
109
111
|
/** AWS Polly voice name */
|
package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.d.mts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type * as Deepgram from "../../../../../index.mjs";
|
|
2
|
+
export type AgentV1SettingsAgentThinkProvider = Deepgram.agent.AgentV1SettingsAgentThinkProvider.OpenAi | Deepgram.agent.AgentV1SettingsAgentThinkProvider.AwsBedrock | Deepgram.agent.AgentV1SettingsAgentThinkProvider.Anthropic | Deepgram.agent.AgentV1SettingsAgentThinkProvider.Google | Deepgram.agent.AgentV1SettingsAgentThinkProvider.Groq;
|
|
3
|
+
export declare namespace AgentV1SettingsAgentThinkProvider {
|
|
4
|
+
interface OpenAi {
|
|
5
|
+
type: "open_ai";
|
|
6
|
+
/** The REST API version for the OpenAI text-to-speech API */
|
|
7
|
+
version?: "v1";
|
|
8
|
+
/** OpenAI TTS model */
|
|
9
|
+
model: OpenAi.Model;
|
|
10
|
+
/** OpenAI voice */
|
|
11
|
+
voice: OpenAi.Voice;
|
|
12
|
+
}
|
|
13
|
+
namespace OpenAi {
|
|
14
|
+
/** OpenAI TTS model */
|
|
15
|
+
const Model: {
|
|
16
|
+
readonly Tts1: "tts-1";
|
|
17
|
+
readonly Tts1Hd: "tts-1-hd";
|
|
18
|
+
};
|
|
19
|
+
type Model = (typeof Model)[keyof typeof Model];
|
|
20
|
+
/** OpenAI voice */
|
|
21
|
+
const Voice: {
|
|
22
|
+
readonly Alloy: "alloy";
|
|
23
|
+
readonly Echo: "echo";
|
|
24
|
+
readonly Fable: "fable";
|
|
25
|
+
readonly Onyx: "onyx";
|
|
26
|
+
readonly Nova: "nova";
|
|
27
|
+
readonly Shimmer: "shimmer";
|
|
28
|
+
};
|
|
29
|
+
type Voice = (typeof Voice)[keyof typeof Voice];
|
|
30
|
+
}
|
|
31
|
+
interface AwsBedrock {
|
|
32
|
+
type: "aws_bedrock";
|
|
33
|
+
/** AWS Bedrock model to use */
|
|
34
|
+
model: AgentV1SettingsAgentThinkProviderAwsBedrock.Model;
|
|
35
|
+
/** AWS Bedrock temperature (0-2) */
|
|
36
|
+
temperature?: number;
|
|
37
|
+
/** AWS credentials type (STS short-lived or IAM long-lived) */
|
|
38
|
+
credentials?: AgentV1SettingsAgentThinkProviderAwsBedrock.Credentials;
|
|
39
|
+
}
|
|
40
|
+
namespace AgentV1SettingsAgentThinkProviderAwsBedrock {
|
|
41
|
+
/** AWS Bedrock model to use */
|
|
42
|
+
const Model: {
|
|
43
|
+
readonly AnthropicClaude35Sonnet20240620V10: "anthropic/claude-3-5-sonnet-20240620-v1:0";
|
|
44
|
+
readonly AnthropicClaude35Haiku20240307V10: "anthropic/claude-3-5-haiku-20240307-v1:0";
|
|
45
|
+
};
|
|
46
|
+
type Model = (typeof Model)[keyof typeof Model];
|
|
47
|
+
/**
|
|
48
|
+
* AWS credentials type (STS short-lived or IAM long-lived)
|
|
49
|
+
*/
|
|
50
|
+
interface Credentials {
|
|
51
|
+
/** AWS credentials type (STS short-lived or IAM long-lived) */
|
|
52
|
+
type?: Credentials.Type;
|
|
53
|
+
/** AWS region */
|
|
54
|
+
region?: string;
|
|
55
|
+
/** AWS access key */
|
|
56
|
+
access_key_id?: string;
|
|
57
|
+
/** AWS secret access key */
|
|
58
|
+
secret_access_key?: string;
|
|
59
|
+
/** AWS session token (required for STS only) */
|
|
60
|
+
session_token?: string;
|
|
61
|
+
}
|
|
62
|
+
namespace Credentials {
|
|
63
|
+
/** AWS credentials type (STS short-lived or IAM long-lived) */
|
|
64
|
+
const Type: {
|
|
65
|
+
readonly Sts: "sts";
|
|
66
|
+
readonly Iam: "iam";
|
|
67
|
+
};
|
|
68
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
interface Anthropic {
|
|
72
|
+
type: "anthropic";
|
|
73
|
+
/** The REST API version for the Anthropic Messages API */
|
|
74
|
+
version?: "v1";
|
|
75
|
+
/** Anthropic model to use */
|
|
76
|
+
model: Anthropic.Model;
|
|
77
|
+
/** Anthropic temperature (0-1) */
|
|
78
|
+
temperature?: number;
|
|
79
|
+
}
|
|
80
|
+
namespace Anthropic {
|
|
81
|
+
/** Anthropic model to use */
|
|
82
|
+
const Model: {
|
|
83
|
+
readonly Claude35HaikuLatest: "claude-3-5-haiku-latest";
|
|
84
|
+
readonly ClaudeSonnet420250514: "claude-sonnet-4-20250514";
|
|
85
|
+
};
|
|
86
|
+
type Model = (typeof Model)[keyof typeof Model];
|
|
87
|
+
}
|
|
88
|
+
interface Google {
|
|
89
|
+
type: "google";
|
|
90
|
+
/** The REST API version for the Google generative language API */
|
|
91
|
+
version?: "v1beta";
|
|
92
|
+
/** Google model to use */
|
|
93
|
+
model: Google.Model;
|
|
94
|
+
/** Google temperature (0-2) */
|
|
95
|
+
temperature?: number;
|
|
96
|
+
}
|
|
97
|
+
namespace Google {
|
|
98
|
+
/** Google model to use */
|
|
99
|
+
const Model: {
|
|
100
|
+
readonly Gemini20Flash: "gemini-2.0-flash";
|
|
101
|
+
readonly Gemini20FlashLite: "gemini-2.0-flash-lite";
|
|
102
|
+
readonly Gemini25Flash: "gemini-2.5-flash";
|
|
103
|
+
};
|
|
104
|
+
type Model = (typeof Model)[keyof typeof Model];
|
|
105
|
+
}
|
|
106
|
+
interface Groq {
|
|
107
|
+
type: "groq";
|
|
108
|
+
/** The REST API version for the Groq's chat completions API (mostly OpenAI-compatible) */
|
|
109
|
+
version?: "v1";
|
|
110
|
+
/** Groq model to use */
|
|
111
|
+
model: "openai/gpt-oss-20b";
|
|
112
|
+
/** Groq temperature (0-2) */
|
|
113
|
+
temperature?: number;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var AgentV1SettingsAgentThinkProvider;
|
|
3
|
+
(function (AgentV1SettingsAgentThinkProvider) {
|
|
4
|
+
let OpenAi;
|
|
5
|
+
(function (OpenAi) {
|
|
6
|
+
/** OpenAI TTS model */
|
|
7
|
+
OpenAi.Model = {
|
|
8
|
+
Tts1: "tts-1",
|
|
9
|
+
Tts1Hd: "tts-1-hd",
|
|
10
|
+
};
|
|
11
|
+
/** OpenAI voice */
|
|
12
|
+
OpenAi.Voice = {
|
|
13
|
+
Alloy: "alloy",
|
|
14
|
+
Echo: "echo",
|
|
15
|
+
Fable: "fable",
|
|
16
|
+
Onyx: "onyx",
|
|
17
|
+
Nova: "nova",
|
|
18
|
+
Shimmer: "shimmer",
|
|
19
|
+
};
|
|
20
|
+
})(OpenAi = AgentV1SettingsAgentThinkProvider.OpenAi || (AgentV1SettingsAgentThinkProvider.OpenAi = {}));
|
|
21
|
+
let AgentV1SettingsAgentThinkProviderAwsBedrock;
|
|
22
|
+
(function (AgentV1SettingsAgentThinkProviderAwsBedrock) {
|
|
23
|
+
/** AWS Bedrock model to use */
|
|
24
|
+
AgentV1SettingsAgentThinkProviderAwsBedrock.Model = {
|
|
25
|
+
AnthropicClaude35Sonnet20240620V10: "anthropic/claude-3-5-sonnet-20240620-v1:0",
|
|
26
|
+
AnthropicClaude35Haiku20240307V10: "anthropic/claude-3-5-haiku-20240307-v1:0",
|
|
27
|
+
};
|
|
28
|
+
let Credentials;
|
|
29
|
+
(function (Credentials) {
|
|
30
|
+
/** AWS credentials type (STS short-lived or IAM long-lived) */
|
|
31
|
+
Credentials.Type = {
|
|
32
|
+
Sts: "sts",
|
|
33
|
+
Iam: "iam",
|
|
34
|
+
};
|
|
35
|
+
})(Credentials = AgentV1SettingsAgentThinkProviderAwsBedrock.Credentials || (AgentV1SettingsAgentThinkProviderAwsBedrock.Credentials = {}));
|
|
36
|
+
})(AgentV1SettingsAgentThinkProviderAwsBedrock = AgentV1SettingsAgentThinkProvider.AgentV1SettingsAgentThinkProviderAwsBedrock || (AgentV1SettingsAgentThinkProvider.AgentV1SettingsAgentThinkProviderAwsBedrock = {}));
|
|
37
|
+
let Anthropic;
|
|
38
|
+
(function (Anthropic) {
|
|
39
|
+
/** Anthropic model to use */
|
|
40
|
+
Anthropic.Model = {
|
|
41
|
+
Claude35HaikuLatest: "claude-3-5-haiku-latest",
|
|
42
|
+
ClaudeSonnet420250514: "claude-sonnet-4-20250514",
|
|
43
|
+
};
|
|
44
|
+
})(Anthropic = AgentV1SettingsAgentThinkProvider.Anthropic || (AgentV1SettingsAgentThinkProvider.Anthropic = {}));
|
|
45
|
+
let Google;
|
|
46
|
+
(function (Google) {
|
|
47
|
+
/** Google model to use */
|
|
48
|
+
Google.Model = {
|
|
49
|
+
Gemini20Flash: "gemini-2.0-flash",
|
|
50
|
+
Gemini20FlashLite: "gemini-2.0-flash-lite",
|
|
51
|
+
Gemini25Flash: "gemini-2.5-flash",
|
|
52
|
+
};
|
|
53
|
+
})(Google = AgentV1SettingsAgentThinkProvider.Google || (AgentV1SettingsAgentThinkProvider.Google = {}));
|
|
54
|
+
})(AgentV1SettingsAgentThinkProvider || (AgentV1SettingsAgentThinkProvider = {}));
|
package/dist/esm/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.d.mts
CHANGED
|
@@ -3,6 +3,8 @@ export type AgentV1UpdateSpeakSpeakProvider = Deepgram.agent.AgentV1UpdateSpeakS
|
|
|
3
3
|
export declare namespace AgentV1UpdateSpeakSpeakProvider {
|
|
4
4
|
interface Deepgram {
|
|
5
5
|
type: "deepgram";
|
|
6
|
+
/** The REST API version for the Deepgram text-to-speech API */
|
|
7
|
+
version?: "v1";
|
|
6
8
|
/** Deepgram TTS model */
|
|
7
9
|
model: AgentV1UpdateSpeakSpeakProviderDeepgram.Model;
|
|
8
10
|
}
|
|
@@ -77,9 +79,13 @@ export declare namespace AgentV1UpdateSpeakSpeakProvider {
|
|
|
77
79
|
}
|
|
78
80
|
interface ElevenLabs {
|
|
79
81
|
type: "eleven_labs";
|
|
82
|
+
/** The REST API version for the ElevenLabs text-to-speech API */
|
|
83
|
+
version?: "v1";
|
|
80
84
|
/** Eleven Labs model ID */
|
|
81
85
|
model_id: AgentV1UpdateSpeakSpeakProviderElevenLabs.ModelId;
|
|
82
|
-
/**
|
|
86
|
+
/** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the ElevenLabs API */
|
|
87
|
+
language?: string;
|
|
88
|
+
/** Use the `language` field instead. */
|
|
83
89
|
language_code?: string;
|
|
84
90
|
}
|
|
85
91
|
namespace AgentV1UpdateSpeakSpeakProviderElevenLabs {
|
|
@@ -93,6 +99,8 @@ export declare namespace AgentV1UpdateSpeakSpeakProvider {
|
|
|
93
99
|
}
|
|
94
100
|
interface Cartesia {
|
|
95
101
|
type: "cartesia";
|
|
102
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
103
|
+
version?: AgentV1UpdateSpeakSpeakProviderCartesia.Version;
|
|
96
104
|
/** Cartesia model ID */
|
|
97
105
|
model_id: AgentV1UpdateSpeakSpeakProviderCartesia.ModelId;
|
|
98
106
|
voice: AgentV1UpdateSpeakSpeakProviderCartesia.Voice;
|
|
@@ -100,6 +108,9 @@ export declare namespace AgentV1UpdateSpeakSpeakProvider {
|
|
|
100
108
|
language?: string;
|
|
101
109
|
}
|
|
102
110
|
namespace AgentV1UpdateSpeakSpeakProviderCartesia {
|
|
111
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
112
|
+
const Version: {};
|
|
113
|
+
type Version = (typeof Version)[keyof typeof Version];
|
|
103
114
|
/** Cartesia model ID */
|
|
104
115
|
const ModelId: {
|
|
105
116
|
readonly Sonic2: "sonic-2";
|
|
@@ -115,6 +126,8 @@ export declare namespace AgentV1UpdateSpeakSpeakProvider {
|
|
|
115
126
|
}
|
|
116
127
|
interface OpenAi {
|
|
117
128
|
type: "open_ai";
|
|
129
|
+
/** The REST API version for the OpenAI text-to-speech API */
|
|
130
|
+
version?: "v1";
|
|
118
131
|
/** OpenAI TTS model */
|
|
119
132
|
model: AgentV1UpdateSpeakSpeakProviderOpenAi.Model;
|
|
120
133
|
/** OpenAI voice */
|
|
@@ -142,8 +155,10 @@ export declare namespace AgentV1UpdateSpeakSpeakProvider {
|
|
|
142
155
|
type: "aws_polly";
|
|
143
156
|
/** AWS Polly voice name */
|
|
144
157
|
voice: AgentV1UpdateSpeakSpeakProviderAwsPolly.Voice;
|
|
145
|
-
/** Language code
|
|
146
|
-
|
|
158
|
+
/** Language code to use, e.g. 'en-US'. Corresponds to the `language_code` parameter in the AWS Polly API */
|
|
159
|
+
language: string;
|
|
160
|
+
/** Use the `language` field instead. */
|
|
161
|
+
language_code?: string;
|
|
147
162
|
engine: AgentV1UpdateSpeakSpeakProviderAwsPolly.Engine;
|
|
148
163
|
credentials: AgentV1UpdateSpeakSpeakProviderAwsPolly.Credentials;
|
|
149
164
|
}
|
|
@@ -81,6 +81,8 @@ export var AgentV1UpdateSpeakSpeakProvider;
|
|
|
81
81
|
})(AgentV1UpdateSpeakSpeakProviderElevenLabs = AgentV1UpdateSpeakSpeakProvider.AgentV1UpdateSpeakSpeakProviderElevenLabs || (AgentV1UpdateSpeakSpeakProvider.AgentV1UpdateSpeakSpeakProviderElevenLabs = {}));
|
|
82
82
|
let AgentV1UpdateSpeakSpeakProviderCartesia;
|
|
83
83
|
(function (AgentV1UpdateSpeakSpeakProviderCartesia) {
|
|
84
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
85
|
+
AgentV1UpdateSpeakSpeakProviderCartesia.Version = {};
|
|
84
86
|
/** Cartesia model ID */
|
|
85
87
|
AgentV1UpdateSpeakSpeakProviderCartesia.ModelId = {
|
|
86
88
|
Sonic2: "sonic-2",
|
|
@@ -12,8 +12,10 @@ export * from "./AgentV1PromptUpdated.mjs";
|
|
|
12
12
|
export * from "./AgentV1ReceiveFunctionCallResponse.mjs";
|
|
13
13
|
export * from "./AgentV1SendFunctionCallResponse.mjs";
|
|
14
14
|
export * from "./AgentV1Settings.mjs";
|
|
15
|
+
export * from "./AgentV1SettingsAgentListenProvider.mjs";
|
|
15
16
|
export * from "./AgentV1SettingsAgentSpeakEndpointProvider.mjs";
|
|
16
17
|
export * from "./AgentV1SettingsAgentSpeakOneItemProvider.mjs";
|
|
18
|
+
export * from "./AgentV1SettingsAgentThinkProvider.mjs";
|
|
17
19
|
export * from "./AgentV1SettingsApplied.mjs";
|
|
18
20
|
export * from "./AgentV1SpeakUpdated.mjs";
|
|
19
21
|
export * from "./AgentV1UpdatePrompt.mjs";
|
|
@@ -12,8 +12,10 @@ export * from "./AgentV1PromptUpdated.mjs";
|
|
|
12
12
|
export * from "./AgentV1ReceiveFunctionCallResponse.mjs";
|
|
13
13
|
export * from "./AgentV1SendFunctionCallResponse.mjs";
|
|
14
14
|
export * from "./AgentV1Settings.mjs";
|
|
15
|
+
export * from "./AgentV1SettingsAgentListenProvider.mjs";
|
|
15
16
|
export * from "./AgentV1SettingsAgentSpeakEndpointProvider.mjs";
|
|
16
17
|
export * from "./AgentV1SettingsAgentSpeakOneItemProvider.mjs";
|
|
18
|
+
export * from "./AgentV1SettingsAgentThinkProvider.mjs";
|
|
17
19
|
export * from "./AgentV1SettingsApplied.mjs";
|
|
18
20
|
export * from "./AgentV1SpeakUpdated.mjs";
|
|
19
21
|
export * from "./AgentV1UpdatePrompt.mjs";
|
|
@@ -28,7 +28,7 @@ export declare namespace ListenV1Results {
|
|
|
28
28
|
transcript: string;
|
|
29
29
|
/** The confidence of the transcription */
|
|
30
30
|
confidence: number;
|
|
31
|
-
languages
|
|
31
|
+
languages?: string[];
|
|
32
32
|
words: Item.Words.Item[];
|
|
33
33
|
}
|
|
34
34
|
namespace Item {
|
|
@@ -44,9 +44,9 @@ export declare namespace ListenV1Results {
|
|
|
44
44
|
/** The confidence of the word */
|
|
45
45
|
confidence: number;
|
|
46
46
|
/** The language of the word */
|
|
47
|
-
language
|
|
47
|
+
language?: string;
|
|
48
48
|
/** The punctuated word of the word */
|
|
49
|
-
punctuated_word
|
|
49
|
+
punctuated_word?: string;
|
|
50
50
|
/** The speaker of the word */
|
|
51
51
|
speaker?: number;
|
|
52
52
|
}
|
|
@@ -3,7 +3,7 @@ export declare const SpeakV1SampleRate: {
|
|
|
3
3
|
readonly EightThousand: "8000";
|
|
4
4
|
readonly SixteenThousand: "16000";
|
|
5
5
|
readonly TwentyFourThousand: "24000";
|
|
6
|
-
readonly
|
|
6
|
+
readonly ThirtyTwoThousand: "32000";
|
|
7
7
|
readonly FortyEightThousand: "48000";
|
|
8
8
|
};
|
|
9
9
|
export type SpeakV1SampleRate = (typeof SpeakV1SampleRate)[keyof typeof SpeakV1SampleRate];
|
|
@@ -3,14 +3,13 @@ import { RUNTIME } from "../runtime/index.mjs";
|
|
|
3
3
|
import { toQueryString } from "../url/qs.mjs";
|
|
4
4
|
import * as Events from "./events.mjs";
|
|
5
5
|
const getGlobalWebSocket = () => {
|
|
6
|
-
|
|
7
|
-
if (RUNTIME.type === "node") {
|
|
8
|
-
return NodeWebSocket;
|
|
9
|
-
}
|
|
10
|
-
else if (typeof WebSocket !== "undefined") {
|
|
6
|
+
if (typeof WebSocket !== "undefined") {
|
|
11
7
|
// @ts-ignore
|
|
12
8
|
return WebSocket;
|
|
13
9
|
}
|
|
10
|
+
else if (RUNTIME.type === "node") {
|
|
11
|
+
return NodeWebSocket;
|
|
12
|
+
}
|
|
14
13
|
return undefined;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
@@ -86,14 +85,12 @@ export class ReconnectingWebSocket {
|
|
|
86
85
|
};
|
|
87
86
|
this._handleError = (event) => {
|
|
88
87
|
this._debug("error event", event.message);
|
|
89
|
-
|
|
90
|
-
this._disconnect(1006, event.message === "TIMEOUT" ? "timeout" : undefined);
|
|
88
|
+
this._disconnect(undefined, event.message === "TIMEOUT" ? "timeout" : undefined);
|
|
91
89
|
if (this.onerror) {
|
|
92
90
|
this.onerror(event);
|
|
93
91
|
}
|
|
92
|
+
this._debug("exec error listeners");
|
|
94
93
|
this._listeners.error.forEach((listener) => this._callEventListener(event, listener));
|
|
95
|
-
// Ensure we can retry by setting _shouldReconnect to true
|
|
96
|
-
this._shouldReconnect = true;
|
|
97
94
|
this._connect();
|
|
98
95
|
};
|
|
99
96
|
this._handleClose = (event) => {
|
|
@@ -330,18 +327,7 @@ export class ReconnectingWebSocket {
|
|
|
330
327
|
}
|
|
331
328
|
const options = {};
|
|
332
329
|
if (this._headers) {
|
|
333
|
-
|
|
334
|
-
const stringHeaders = {};
|
|
335
|
-
for (const [key, value] of Object.entries(this._headers)) {
|
|
336
|
-
if (typeof value === "string") {
|
|
337
|
-
stringHeaders[key] = value;
|
|
338
|
-
}
|
|
339
|
-
else if (value != null) {
|
|
340
|
-
// Convert non-string values to strings
|
|
341
|
-
stringHeaders[key] = String(value);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
options.headers = stringHeaders;
|
|
330
|
+
options.headers = this._headers;
|
|
345
331
|
}
|
|
346
332
|
if (this._queryParameters && Object.keys(this._queryParameters).length > 0) {
|
|
347
333
|
const queryString = toQueryString(this._queryParameters, { arrayFormat: "repeat" });
|
|
@@ -395,14 +381,7 @@ export class ReconnectingWebSocket {
|
|
|
395
381
|
this._debug("removeListeners");
|
|
396
382
|
this._ws.removeEventListener("open", this._handleOpen);
|
|
397
383
|
this._ws.removeEventListener("close", this._handleClose);
|
|
398
|
-
|
|
399
|
-
// Remove the message listener we added with .on()
|
|
400
|
-
this._ws.off("message", this._nodeMessageHandler);
|
|
401
|
-
this._nodeMessageHandler = undefined;
|
|
402
|
-
}
|
|
403
|
-
else {
|
|
404
|
-
this._ws.removeEventListener("message", this._handleMessage);
|
|
405
|
-
}
|
|
384
|
+
this._ws.removeEventListener("message", this._handleMessage);
|
|
406
385
|
// @ts-ignore
|
|
407
386
|
this._ws.removeEventListener("error", this._handleError);
|
|
408
387
|
}
|
|
@@ -413,24 +392,7 @@ export class ReconnectingWebSocket {
|
|
|
413
392
|
this._debug("addListeners");
|
|
414
393
|
this._ws.addEventListener("open", this._handleOpen);
|
|
415
394
|
this._ws.addEventListener("close", this._handleClose);
|
|
416
|
-
|
|
417
|
-
if (RUNTIME.type === "node") {
|
|
418
|
-
// ws library emits data directly via .on(), not as MessageEvent
|
|
419
|
-
// Convert Buffer to string for text messages
|
|
420
|
-
this._nodeMessageHandler = (data, isBinary) => {
|
|
421
|
-
// Convert Buffer to string if it's a text message
|
|
422
|
-
let messageData = data;
|
|
423
|
-
if (!isBinary && Buffer.isBuffer(data)) {
|
|
424
|
-
messageData = data.toString("utf8");
|
|
425
|
-
}
|
|
426
|
-
const event = { data: messageData, type: "message", target: this._ws };
|
|
427
|
-
this._handleMessage(event);
|
|
428
|
-
};
|
|
429
|
-
this._ws.on("message", this._nodeMessageHandler);
|
|
430
|
-
}
|
|
431
|
-
else {
|
|
432
|
-
this._ws.addEventListener("message", this._handleMessage);
|
|
433
|
-
}
|
|
395
|
+
this._ws.addEventListener("message", this._handleMessage);
|
|
434
396
|
// @ts-ignore
|
|
435
397
|
this._ws.addEventListener("error", this._handleError);
|
|
436
398
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "0.0.228";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SDK_VERSION = "0.0.228";
|