@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
package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakEndpointProvider.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.AgentV1SettingsAgentSpeakEndpointProvider = void 0;
|
|
5
5
|
var AgentV1SettingsAgentSpeakEndpointProvider;
|
|
6
6
|
(function (AgentV1SettingsAgentSpeakEndpointProvider) {
|
|
7
|
-
let
|
|
8
|
-
(function (
|
|
7
|
+
let Deepgram;
|
|
8
|
+
(function (Deepgram) {
|
|
9
9
|
/** Deepgram TTS model */
|
|
10
|
-
|
|
10
|
+
Deepgram.Model = {
|
|
11
11
|
AuraAsteriaEn: "aura-asteria-en",
|
|
12
12
|
AuraLunaEn: "aura-luna-en",
|
|
13
13
|
AuraStellaEn: "aura-stella-en",
|
|
@@ -72,33 +72,35 @@ var AgentV1SettingsAgentSpeakEndpointProvider;
|
|
|
72
72
|
Aura2EstrellaEs: "aura-2-estrella-es",
|
|
73
73
|
Aura2JavierEs: "aura-2-javier-es",
|
|
74
74
|
};
|
|
75
|
-
})(
|
|
76
|
-
let
|
|
77
|
-
(function (
|
|
75
|
+
})(Deepgram = AgentV1SettingsAgentSpeakEndpointProvider.Deepgram || (AgentV1SettingsAgentSpeakEndpointProvider.Deepgram = {}));
|
|
76
|
+
let ElevenLabs;
|
|
77
|
+
(function (ElevenLabs) {
|
|
78
78
|
/** Eleven Labs model ID */
|
|
79
|
-
|
|
79
|
+
ElevenLabs.ModelId = {
|
|
80
80
|
ElevenTurboV25: "eleven_turbo_v2_5",
|
|
81
81
|
ElevenMonolingualV1: "eleven_monolingual_v1",
|
|
82
82
|
ElevenMultilingualV2: "eleven_multilingual_v2",
|
|
83
83
|
};
|
|
84
|
-
})(
|
|
85
|
-
let
|
|
86
|
-
(function (
|
|
84
|
+
})(ElevenLabs = AgentV1SettingsAgentSpeakEndpointProvider.ElevenLabs || (AgentV1SettingsAgentSpeakEndpointProvider.ElevenLabs = {}));
|
|
85
|
+
let Cartesia;
|
|
86
|
+
(function (Cartesia) {
|
|
87
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
88
|
+
Cartesia.Version = {};
|
|
87
89
|
/** Cartesia model ID */
|
|
88
|
-
|
|
90
|
+
Cartesia.ModelId = {
|
|
89
91
|
Sonic2: "sonic-2",
|
|
90
92
|
SonicMultilingual: "sonic-multilingual",
|
|
91
93
|
};
|
|
92
|
-
})(
|
|
93
|
-
let
|
|
94
|
-
(function (
|
|
94
|
+
})(Cartesia = AgentV1SettingsAgentSpeakEndpointProvider.Cartesia || (AgentV1SettingsAgentSpeakEndpointProvider.Cartesia = {}));
|
|
95
|
+
let OpenAi;
|
|
96
|
+
(function (OpenAi) {
|
|
95
97
|
/** OpenAI TTS model */
|
|
96
|
-
|
|
98
|
+
OpenAi.Model = {
|
|
97
99
|
Tts1: "tts-1",
|
|
98
100
|
Tts1Hd: "tts-1-hd",
|
|
99
101
|
};
|
|
100
102
|
/** OpenAI voice */
|
|
101
|
-
|
|
103
|
+
OpenAi.Voice = {
|
|
102
104
|
Alloy: "alloy",
|
|
103
105
|
Echo: "echo",
|
|
104
106
|
Fable: "fable",
|
|
@@ -106,7 +108,7 @@ var AgentV1SettingsAgentSpeakEndpointProvider;
|
|
|
106
108
|
Nova: "nova",
|
|
107
109
|
Shimmer: "shimmer",
|
|
108
110
|
};
|
|
109
|
-
})(
|
|
111
|
+
})(OpenAi = AgentV1SettingsAgentSpeakEndpointProvider.OpenAi || (AgentV1SettingsAgentSpeakEndpointProvider.OpenAi = {}));
|
|
110
112
|
let AgentV1SettingsAgentSpeakEndpointProviderAwsPolly;
|
|
111
113
|
(function (AgentV1SettingsAgentSpeakEndpointProviderAwsPolly) {
|
|
112
114
|
/** 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/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentSpeakOneItemProvider.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.AgentV1SettingsAgentSpeakOneItemProvider = void 0;
|
|
5
5
|
var AgentV1SettingsAgentSpeakOneItemProvider;
|
|
6
6
|
(function (AgentV1SettingsAgentSpeakOneItemProvider) {
|
|
7
|
-
let
|
|
8
|
-
(function (
|
|
7
|
+
let Deepgram;
|
|
8
|
+
(function (Deepgram) {
|
|
9
9
|
/** Deepgram TTS model */
|
|
10
|
-
|
|
10
|
+
Deepgram.Model = {
|
|
11
11
|
AuraAsteriaEn: "aura-asteria-en",
|
|
12
12
|
AuraLunaEn: "aura-luna-en",
|
|
13
13
|
AuraStellaEn: "aura-stella-en",
|
|
@@ -72,33 +72,35 @@ var AgentV1SettingsAgentSpeakOneItemProvider;
|
|
|
72
72
|
Aura2EstrellaEs: "aura-2-estrella-es",
|
|
73
73
|
Aura2JavierEs: "aura-2-javier-es",
|
|
74
74
|
};
|
|
75
|
-
})(
|
|
76
|
-
let
|
|
77
|
-
(function (
|
|
75
|
+
})(Deepgram = AgentV1SettingsAgentSpeakOneItemProvider.Deepgram || (AgentV1SettingsAgentSpeakOneItemProvider.Deepgram = {}));
|
|
76
|
+
let ElevenLabs;
|
|
77
|
+
(function (ElevenLabs) {
|
|
78
78
|
/** Eleven Labs model ID */
|
|
79
|
-
|
|
79
|
+
ElevenLabs.ModelId = {
|
|
80
80
|
ElevenTurboV25: "eleven_turbo_v2_5",
|
|
81
81
|
ElevenMonolingualV1: "eleven_monolingual_v1",
|
|
82
82
|
ElevenMultilingualV2: "eleven_multilingual_v2",
|
|
83
83
|
};
|
|
84
|
-
})(
|
|
85
|
-
let
|
|
86
|
-
(function (
|
|
84
|
+
})(ElevenLabs = AgentV1SettingsAgentSpeakOneItemProvider.ElevenLabs || (AgentV1SettingsAgentSpeakOneItemProvider.ElevenLabs = {}));
|
|
85
|
+
let Cartesia;
|
|
86
|
+
(function (Cartesia) {
|
|
87
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
88
|
+
Cartesia.Version = {};
|
|
87
89
|
/** Cartesia model ID */
|
|
88
|
-
|
|
90
|
+
Cartesia.ModelId = {
|
|
89
91
|
Sonic2: "sonic-2",
|
|
90
92
|
SonicMultilingual: "sonic-multilingual",
|
|
91
93
|
};
|
|
92
|
-
})(
|
|
93
|
-
let
|
|
94
|
-
(function (
|
|
94
|
+
})(Cartesia = AgentV1SettingsAgentSpeakOneItemProvider.Cartesia || (AgentV1SettingsAgentSpeakOneItemProvider.Cartesia = {}));
|
|
95
|
+
let OpenAi;
|
|
96
|
+
(function (OpenAi) {
|
|
95
97
|
/** OpenAI TTS model */
|
|
96
|
-
|
|
98
|
+
OpenAi.Model = {
|
|
97
99
|
Tts1: "tts-1",
|
|
98
100
|
Tts1Hd: "tts-1-hd",
|
|
99
101
|
};
|
|
100
102
|
/** OpenAI voice */
|
|
101
|
-
|
|
103
|
+
OpenAi.Voice = {
|
|
102
104
|
Alloy: "alloy",
|
|
103
105
|
Echo: "echo",
|
|
104
106
|
Fable: "fable",
|
|
@@ -106,7 +108,7 @@ var AgentV1SettingsAgentSpeakOneItemProvider;
|
|
|
106
108
|
Nova: "nova",
|
|
107
109
|
Shimmer: "shimmer",
|
|
108
110
|
};
|
|
109
|
-
})(
|
|
111
|
+
})(OpenAi = AgentV1SettingsAgentSpeakOneItemProvider.OpenAi || (AgentV1SettingsAgentSpeakOneItemProvider.OpenAi = {}));
|
|
110
112
|
let AgentV1SettingsAgentSpeakOneItemProviderAwsPolly;
|
|
111
113
|
(function (AgentV1SettingsAgentSpeakOneItemProviderAwsPolly) {
|
|
112
114
|
/** AWS Polly voice name */
|
package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentThinkProvider.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type * as Deepgram from "../../../../../index.js";
|
|
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,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AgentV1SettingsAgentThinkProvider = void 0;
|
|
5
|
+
var AgentV1SettingsAgentThinkProvider;
|
|
6
|
+
(function (AgentV1SettingsAgentThinkProvider) {
|
|
7
|
+
let OpenAi;
|
|
8
|
+
(function (OpenAi) {
|
|
9
|
+
/** OpenAI TTS model */
|
|
10
|
+
OpenAi.Model = {
|
|
11
|
+
Tts1: "tts-1",
|
|
12
|
+
Tts1Hd: "tts-1-hd",
|
|
13
|
+
};
|
|
14
|
+
/** OpenAI voice */
|
|
15
|
+
OpenAi.Voice = {
|
|
16
|
+
Alloy: "alloy",
|
|
17
|
+
Echo: "echo",
|
|
18
|
+
Fable: "fable",
|
|
19
|
+
Onyx: "onyx",
|
|
20
|
+
Nova: "nova",
|
|
21
|
+
Shimmer: "shimmer",
|
|
22
|
+
};
|
|
23
|
+
})(OpenAi = AgentV1SettingsAgentThinkProvider.OpenAi || (AgentV1SettingsAgentThinkProvider.OpenAi = {}));
|
|
24
|
+
let AgentV1SettingsAgentThinkProviderAwsBedrock;
|
|
25
|
+
(function (AgentV1SettingsAgentThinkProviderAwsBedrock) {
|
|
26
|
+
/** AWS Bedrock model to use */
|
|
27
|
+
AgentV1SettingsAgentThinkProviderAwsBedrock.Model = {
|
|
28
|
+
AnthropicClaude35Sonnet20240620V10: "anthropic/claude-3-5-sonnet-20240620-v1:0",
|
|
29
|
+
AnthropicClaude35Haiku20240307V10: "anthropic/claude-3-5-haiku-20240307-v1:0",
|
|
30
|
+
};
|
|
31
|
+
let Credentials;
|
|
32
|
+
(function (Credentials) {
|
|
33
|
+
/** AWS credentials type (STS short-lived or IAM long-lived) */
|
|
34
|
+
Credentials.Type = {
|
|
35
|
+
Sts: "sts",
|
|
36
|
+
Iam: "iam",
|
|
37
|
+
};
|
|
38
|
+
})(Credentials = AgentV1SettingsAgentThinkProviderAwsBedrock.Credentials || (AgentV1SettingsAgentThinkProviderAwsBedrock.Credentials = {}));
|
|
39
|
+
})(AgentV1SettingsAgentThinkProviderAwsBedrock = AgentV1SettingsAgentThinkProvider.AgentV1SettingsAgentThinkProviderAwsBedrock || (AgentV1SettingsAgentThinkProvider.AgentV1SettingsAgentThinkProviderAwsBedrock = {}));
|
|
40
|
+
let Anthropic;
|
|
41
|
+
(function (Anthropic) {
|
|
42
|
+
/** Anthropic model to use */
|
|
43
|
+
Anthropic.Model = {
|
|
44
|
+
Claude35HaikuLatest: "claude-3-5-haiku-latest",
|
|
45
|
+
ClaudeSonnet420250514: "claude-sonnet-4-20250514",
|
|
46
|
+
};
|
|
47
|
+
})(Anthropic = AgentV1SettingsAgentThinkProvider.Anthropic || (AgentV1SettingsAgentThinkProvider.Anthropic = {}));
|
|
48
|
+
let Google;
|
|
49
|
+
(function (Google) {
|
|
50
|
+
/** Google model to use */
|
|
51
|
+
Google.Model = {
|
|
52
|
+
Gemini20Flash: "gemini-2.0-flash",
|
|
53
|
+
Gemini20FlashLite: "gemini-2.0-flash-lite",
|
|
54
|
+
Gemini25Flash: "gemini-2.5-flash",
|
|
55
|
+
};
|
|
56
|
+
})(Google = AgentV1SettingsAgentThinkProvider.Google || (AgentV1SettingsAgentThinkProvider.Google = {}));
|
|
57
|
+
})(AgentV1SettingsAgentThinkProvider || (exports.AgentV1SettingsAgentThinkProvider = AgentV1SettingsAgentThinkProvider = {}));
|
package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1UpdateSpeakSpeakProvider.d.ts
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
|
}
|
|
@@ -84,6 +84,8 @@ var AgentV1UpdateSpeakSpeakProvider;
|
|
|
84
84
|
})(AgentV1UpdateSpeakSpeakProviderElevenLabs = AgentV1UpdateSpeakSpeakProvider.AgentV1UpdateSpeakSpeakProviderElevenLabs || (AgentV1UpdateSpeakSpeakProvider.AgentV1UpdateSpeakSpeakProviderElevenLabs = {}));
|
|
85
85
|
let AgentV1UpdateSpeakSpeakProviderCartesia;
|
|
86
86
|
(function (AgentV1UpdateSpeakSpeakProviderCartesia) {
|
|
87
|
+
/** The API version header for the Cartesia text-to-speech API */
|
|
88
|
+
AgentV1UpdateSpeakSpeakProviderCartesia.Version = {};
|
|
87
89
|
/** Cartesia model ID */
|
|
88
90
|
AgentV1UpdateSpeakSpeakProviderCartesia.ModelId = {
|
|
89
91
|
Sonic2: "sonic-2",
|
|
@@ -12,8 +12,10 @@ export * from "./AgentV1PromptUpdated.js";
|
|
|
12
12
|
export * from "./AgentV1ReceiveFunctionCallResponse.js";
|
|
13
13
|
export * from "./AgentV1SendFunctionCallResponse.js";
|
|
14
14
|
export * from "./AgentV1Settings.js";
|
|
15
|
+
export * from "./AgentV1SettingsAgentListenProvider.js";
|
|
15
16
|
export * from "./AgentV1SettingsAgentSpeakEndpointProvider.js";
|
|
16
17
|
export * from "./AgentV1SettingsAgentSpeakOneItemProvider.js";
|
|
18
|
+
export * from "./AgentV1SettingsAgentThinkProvider.js";
|
|
17
19
|
export * from "./AgentV1SettingsApplied.js";
|
|
18
20
|
export * from "./AgentV1SpeakUpdated.js";
|
|
19
21
|
export * from "./AgentV1UpdatePrompt.js";
|
|
@@ -28,8 +28,10 @@ __exportStar(require("./AgentV1PromptUpdated.js"), exports);
|
|
|
28
28
|
__exportStar(require("./AgentV1ReceiveFunctionCallResponse.js"), exports);
|
|
29
29
|
__exportStar(require("./AgentV1SendFunctionCallResponse.js"), exports);
|
|
30
30
|
__exportStar(require("./AgentV1Settings.js"), exports);
|
|
31
|
+
__exportStar(require("./AgentV1SettingsAgentListenProvider.js"), exports);
|
|
31
32
|
__exportStar(require("./AgentV1SettingsAgentSpeakEndpointProvider.js"), exports);
|
|
32
33
|
__exportStar(require("./AgentV1SettingsAgentSpeakOneItemProvider.js"), exports);
|
|
34
|
+
__exportStar(require("./AgentV1SettingsAgentThinkProvider.js"), exports);
|
|
33
35
|
__exportStar(require("./AgentV1SettingsApplied.js"), exports);
|
|
34
36
|
__exportStar(require("./AgentV1SpeakUpdated.js"), exports);
|
|
35
37
|
__exportStar(require("./AgentV1UpdatePrompt.js"), exports);
|
|
@@ -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];
|
|
@@ -39,14 +39,13 @@ const index_js_1 = require("../runtime/index.js");
|
|
|
39
39
|
const qs_js_1 = require("../url/qs.js");
|
|
40
40
|
const Events = __importStar(require("./events.js"));
|
|
41
41
|
const getGlobalWebSocket = () => {
|
|
42
|
-
|
|
43
|
-
if (index_js_1.RUNTIME.type === "node") {
|
|
44
|
-
return ws_1.WebSocket;
|
|
45
|
-
}
|
|
46
|
-
else if (typeof WebSocket !== "undefined") {
|
|
42
|
+
if (typeof WebSocket !== "undefined") {
|
|
47
43
|
// @ts-ignore
|
|
48
44
|
return WebSocket;
|
|
49
45
|
}
|
|
46
|
+
else if (index_js_1.RUNTIME.type === "node") {
|
|
47
|
+
return ws_1.WebSocket;
|
|
48
|
+
}
|
|
50
49
|
return undefined;
|
|
51
50
|
};
|
|
52
51
|
/**
|
|
@@ -122,14 +121,12 @@ class ReconnectingWebSocket {
|
|
|
122
121
|
};
|
|
123
122
|
this._handleError = (event) => {
|
|
124
123
|
this._debug("error event", event.message);
|
|
125
|
-
|
|
126
|
-
this._disconnect(1006, event.message === "TIMEOUT" ? "timeout" : undefined);
|
|
124
|
+
this._disconnect(undefined, event.message === "TIMEOUT" ? "timeout" : undefined);
|
|
127
125
|
if (this.onerror) {
|
|
128
126
|
this.onerror(event);
|
|
129
127
|
}
|
|
128
|
+
this._debug("exec error listeners");
|
|
130
129
|
this._listeners.error.forEach((listener) => this._callEventListener(event, listener));
|
|
131
|
-
// Ensure we can retry by setting _shouldReconnect to true
|
|
132
|
-
this._shouldReconnect = true;
|
|
133
130
|
this._connect();
|
|
134
131
|
};
|
|
135
132
|
this._handleClose = (event) => {
|
|
@@ -366,18 +363,7 @@ class ReconnectingWebSocket {
|
|
|
366
363
|
}
|
|
367
364
|
const options = {};
|
|
368
365
|
if (this._headers) {
|
|
369
|
-
|
|
370
|
-
const stringHeaders = {};
|
|
371
|
-
for (const [key, value] of Object.entries(this._headers)) {
|
|
372
|
-
if (typeof value === "string") {
|
|
373
|
-
stringHeaders[key] = value;
|
|
374
|
-
}
|
|
375
|
-
else if (value != null) {
|
|
376
|
-
// Convert non-string values to strings
|
|
377
|
-
stringHeaders[key] = String(value);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
options.headers = stringHeaders;
|
|
366
|
+
options.headers = this._headers;
|
|
381
367
|
}
|
|
382
368
|
if (this._queryParameters && Object.keys(this._queryParameters).length > 0) {
|
|
383
369
|
const queryString = (0, qs_js_1.toQueryString)(this._queryParameters, { arrayFormat: "repeat" });
|
|
@@ -431,14 +417,7 @@ class ReconnectingWebSocket {
|
|
|
431
417
|
this._debug("removeListeners");
|
|
432
418
|
this._ws.removeEventListener("open", this._handleOpen);
|
|
433
419
|
this._ws.removeEventListener("close", this._handleClose);
|
|
434
|
-
|
|
435
|
-
// Remove the message listener we added with .on()
|
|
436
|
-
this._ws.off("message", this._nodeMessageHandler);
|
|
437
|
-
this._nodeMessageHandler = undefined;
|
|
438
|
-
}
|
|
439
|
-
else {
|
|
440
|
-
this._ws.removeEventListener("message", this._handleMessage);
|
|
441
|
-
}
|
|
420
|
+
this._ws.removeEventListener("message", this._handleMessage);
|
|
442
421
|
// @ts-ignore
|
|
443
422
|
this._ws.removeEventListener("error", this._handleError);
|
|
444
423
|
}
|
|
@@ -449,24 +428,7 @@ class ReconnectingWebSocket {
|
|
|
449
428
|
this._debug("addListeners");
|
|
450
429
|
this._ws.addEventListener("open", this._handleOpen);
|
|
451
430
|
this._ws.addEventListener("close", this._handleClose);
|
|
452
|
-
|
|
453
|
-
if (index_js_1.RUNTIME.type === "node") {
|
|
454
|
-
// ws library emits data directly via .on(), not as MessageEvent
|
|
455
|
-
// Convert Buffer to string for text messages
|
|
456
|
-
this._nodeMessageHandler = (data, isBinary) => {
|
|
457
|
-
// Convert Buffer to string if it's a text message
|
|
458
|
-
let messageData = data;
|
|
459
|
-
if (!isBinary && Buffer.isBuffer(data)) {
|
|
460
|
-
messageData = data.toString("utf8");
|
|
461
|
-
}
|
|
462
|
-
const event = { data: messageData, type: "message", target: this._ws };
|
|
463
|
-
this._handleMessage(event);
|
|
464
|
-
};
|
|
465
|
-
this._ws.on("message", this._nodeMessageHandler);
|
|
466
|
-
}
|
|
467
|
-
else {
|
|
468
|
-
this._ws.addEventListener("message", this._handleMessage);
|
|
469
|
-
}
|
|
431
|
+
this._ws.addEventListener("message", this._handleMessage);
|
|
470
432
|
// @ts-ignore
|
|
471
433
|
this._ws.addEventListener("error", this._handleError);
|
|
472
434
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SDK_VERSION = "0.0.228";
|