@deepgram/sdk 5.1.0 → 5.3.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/dist/browser/index.global.js +74 -19
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.js +6 -0
- package/dist/cjs/CustomClient.js +11 -9
- package/dist/cjs/api/resources/agent/resources/v1/resources/settings/resources/think/resources/models/client/Client.js +1 -1
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1ConversationText.d.ts +4 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1InjectAgentMessage.d.ts +20 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1InjectAgentMessage.js +14 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1Settings.d.ts +22 -3
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1Settings.js +10 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.d.ts +13 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.js +8 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.ts +3 -23
- package/dist/cjs/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.js +7 -1
- package/dist/cjs/api/resources/agent/resources/v1/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/agent/resources/v1/types/index.js +1 -0
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/Client.js +4 -1
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/requests/ListenV1RequestUrl.d.ts +3 -0
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/requests/MediaTranscribeRequestOctetStream.d.ts +2 -0
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestDiarizeModel.d.ts +6 -0
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestDiarizeModel.js +9 -0
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/listen/resources/v1/resources/media/types/index.js +1 -0
- package/dist/cjs/api/resources/listen/resources/v2/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/listen/resources/v2/client/Client.js +15 -2
- package/dist/cjs/api/resources/listen/resources/v2/types/ListenV2ConfigureSuccess.d.ts +2 -0
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.js +1 -1
- package/dist/cjs/api/resources/speak/resources/v1/types/SpeakV1Metadata.d.ts +4 -2
- package/dist/cjs/api/types/CreateKeyV1Request.d.ts +2 -0
- package/dist/cjs/api/types/CreateKeyV1Request.js +3 -0
- package/dist/cjs/api/types/DeepgramListenProviderV1.d.ts +14 -0
- package/dist/cjs/api/types/DeepgramListenProviderV1.js +3 -0
- package/dist/cjs/api/types/DeepgramListenProviderV2.d.ts +18 -0
- package/dist/cjs/api/types/DeepgramListenProviderV2.js +3 -0
- package/dist/cjs/api/types/Groq.d.ts +13 -0
- package/dist/cjs/api/types/Groq.js +12 -0
- package/dist/cjs/api/types/ListProjectMembersV1Response.d.ts +4 -0
- package/dist/cjs/api/types/ListenV2LanguageHint.d.ts +7 -0
- package/dist/cjs/api/types/ListenV2LanguageHint.js +3 -0
- package/dist/cjs/api/types/OpenAiThinkProvider.d.ts +11 -0
- package/dist/cjs/api/types/OpenAiThinkProvider.js +8 -0
- package/dist/cjs/api/types/index.d.ts +4 -1
- package/dist/cjs/api/types/index.js +4 -1
- package/dist/cjs/environments.d.ts +4 -7
- package/dist/cjs/environments.js +1 -5
- package/dist/cjs/transport.d.ts +73 -0
- package/dist/cjs/transport.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.mjs +6 -0
- package/dist/esm/CustomClient.mjs +11 -9
- package/dist/esm/api/resources/agent/resources/v1/resources/settings/resources/think/resources/models/client/Client.mjs +1 -1
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1ConversationText.d.mts +4 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1InjectAgentMessage.d.mts +20 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1InjectAgentMessage.mjs +13 -1
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1Settings.d.mts +22 -3
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1Settings.mjs +10 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.d.mts +13 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentContextListenProvider.mjs +7 -0
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.mts +3 -23
- package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.mjs +7 -1
- package/dist/esm/api/resources/agent/resources/v1/types/index.d.mts +1 -0
- package/dist/esm/api/resources/agent/resources/v1/types/index.mjs +1 -0
- package/dist/esm/api/resources/listen/resources/v1/resources/media/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/listen/resources/v1/resources/media/client/Client.mjs +4 -1
- package/dist/esm/api/resources/listen/resources/v1/resources/media/client/requests/ListenV1RequestUrl.d.mts +3 -0
- package/dist/esm/api/resources/listen/resources/v1/resources/media/client/requests/MediaTranscribeRequestOctetStream.d.mts +2 -0
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestDiarizeModel.d.mts +6 -0
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/MediaTranscribeRequestDiarizeModel.mjs +6 -0
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/index.d.mts +1 -0
- package/dist/esm/api/resources/listen/resources/v1/resources/media/types/index.mjs +1 -0
- package/dist/esm/api/resources/listen/resources/v2/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/listen/resources/v2/client/Client.mjs +15 -2
- package/dist/esm/api/resources/listen/resources/v2/types/ListenV2ConfigureSuccess.d.mts +2 -0
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.mjs +1 -1
- package/dist/esm/api/resources/speak/resources/v1/types/SpeakV1Metadata.d.mts +4 -2
- package/dist/esm/api/types/CreateKeyV1Request.d.mts +2 -0
- package/dist/esm/api/types/CreateKeyV1Request.mjs +2 -0
- package/dist/esm/api/types/DeepgramListenProviderV1.d.mts +14 -0
- package/dist/esm/api/types/DeepgramListenProviderV1.mjs +2 -0
- package/dist/esm/api/types/DeepgramListenProviderV2.d.mts +18 -0
- package/dist/esm/api/types/DeepgramListenProviderV2.mjs +2 -0
- package/dist/esm/api/types/Groq.d.mts +13 -0
- package/dist/esm/api/types/Groq.mjs +11 -1
- package/dist/esm/api/types/ListProjectMembersV1Response.d.mts +4 -0
- package/dist/esm/api/types/ListenV2LanguageHint.d.mts +7 -0
- package/dist/esm/api/types/ListenV2LanguageHint.mjs +2 -0
- package/dist/esm/api/types/OpenAiThinkProvider.d.mts +11 -0
- package/dist/esm/api/types/OpenAiThinkProvider.mjs +8 -0
- package/dist/esm/api/types/index.d.mts +4 -1
- package/dist/esm/api/types/index.mjs +4 -1
- package/dist/esm/environments.d.mts +4 -7
- package/dist/esm/environments.mjs +1 -5
- package/dist/esm/transport.d.mts +73 -0
- package/dist/esm/transport.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +10 -10
- package/reference.md +2 -1
|
@@ -3,4 +3,24 @@ export interface AgentV1InjectAgentMessage {
|
|
|
3
3
|
type: "InjectAgentMessage";
|
|
4
4
|
/** The statement that the agent should say */
|
|
5
5
|
message: string;
|
|
6
|
+
/**
|
|
7
|
+
* Controls how the injection interacts with any in-progress user or agent turn.
|
|
8
|
+
*
|
|
9
|
+
* * `default` — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with `InjectionRefused`.
|
|
10
|
+
* * `queue` — The message is appended after any already-queued `ConversationText` without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately.
|
|
11
|
+
*/
|
|
12
|
+
behavior?: AgentV1InjectAgentMessage.Behavior | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace AgentV1InjectAgentMessage {
|
|
15
|
+
/**
|
|
16
|
+
* Controls how the injection interacts with any in-progress user or agent turn.
|
|
17
|
+
*
|
|
18
|
+
* * `default` — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with `InjectionRefused`.
|
|
19
|
+
* * `queue` — The message is appended after any already-queued `ConversationText` without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately.
|
|
20
|
+
*/
|
|
21
|
+
const Behavior: {
|
|
22
|
+
readonly Default: "default";
|
|
23
|
+
readonly Queue: "queue";
|
|
24
|
+
};
|
|
25
|
+
type Behavior = (typeof Behavior)[keyof typeof Behavior] | string;
|
|
6
26
|
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var AgentV1InjectAgentMessage;
|
|
3
|
+
(function (AgentV1InjectAgentMessage) {
|
|
4
|
+
/**
|
|
5
|
+
* Controls how the injection interacts with any in-progress user or agent turn.
|
|
6
|
+
*
|
|
7
|
+
* * `default` — The agent speaks only if neither the user nor the agent is mid-turn. If a turn is in progress, the server replies with `InjectionRefused`.
|
|
8
|
+
* * `queue` — The message is appended after any already-queued `ConversationText` without interrupting the current agent turn or think response. If nothing is queued, the message plays immediately.
|
|
9
|
+
*/
|
|
10
|
+
AgentV1InjectAgentMessage.Behavior = {
|
|
11
|
+
Default: "default",
|
|
12
|
+
Queue: "queue",
|
|
13
|
+
};
|
|
14
|
+
})(AgentV1InjectAgentMessage || (AgentV1InjectAgentMessage = {}));
|
|
@@ -59,8 +59,8 @@ export declare namespace AgentV1Settings {
|
|
|
59
59
|
sample_rate?: number | undefined;
|
|
60
60
|
/** Audio bitrate in bits per second */
|
|
61
61
|
bitrate?: number | undefined;
|
|
62
|
-
/** Audio container format.
|
|
63
|
-
container?:
|
|
62
|
+
/** Audio container format. */
|
|
63
|
+
container?: Output.Container | undefined;
|
|
64
64
|
}
|
|
65
65
|
namespace Output {
|
|
66
66
|
/** Audio encoding format for streaming TTS output */
|
|
@@ -68,8 +68,19 @@ export declare namespace AgentV1Settings {
|
|
|
68
68
|
readonly Linear16: "linear16";
|
|
69
69
|
readonly Mulaw: "mulaw";
|
|
70
70
|
readonly Alaw: "alaw";
|
|
71
|
+
readonly Mp3: "mp3";
|
|
72
|
+
readonly Opus: "opus";
|
|
73
|
+
readonly Flac: "flac";
|
|
74
|
+
readonly Aac: "aac";
|
|
71
75
|
};
|
|
72
76
|
type Encoding = (typeof Encoding)[keyof typeof Encoding] | string;
|
|
77
|
+
/** Audio container format. */
|
|
78
|
+
const Container: {
|
|
79
|
+
readonly None: "none";
|
|
80
|
+
readonly Wav: "wav";
|
|
81
|
+
readonly Ogg: "ogg";
|
|
82
|
+
};
|
|
83
|
+
type Container = (typeof Container)[keyof typeof Container] | string;
|
|
73
84
|
}
|
|
74
85
|
}
|
|
75
86
|
interface Agent {
|
|
@@ -121,9 +132,17 @@ export declare namespace AgentV1Settings {
|
|
|
121
132
|
}
|
|
122
133
|
}
|
|
123
134
|
interface Listen {
|
|
124
|
-
provider?: Deepgram.agent.
|
|
135
|
+
provider?: Deepgram.agent.AgentV1SettingsAgentContextListenProvider | undefined;
|
|
125
136
|
}
|
|
126
137
|
type Think = Deepgram.ThinkSettingsV1 | Deepgram.ThinkSettingsV1[];
|
|
127
138
|
type Speak = Deepgram.SpeakSettingsV1 | Deepgram.SpeakSettingsV1[];
|
|
128
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Opt-in alias for the agent-by-ID-string variant added by the 2026-05-06
|
|
142
|
+
* regen. The canonical `Agent` type is restored to the object-only
|
|
143
|
+
* interface for back-compat; use `AgentReference` if your code needs to
|
|
144
|
+
* accept either an `Agent` settings object or a string agent ID at the
|
|
145
|
+
* type level (e.g. when targeting the agent-builder ID flow).
|
|
146
|
+
*/
|
|
147
|
+
type AgentReference = AgentV1Settings.Agent | string;
|
|
129
148
|
}
|
|
@@ -27,6 +27,16 @@ export var AgentV1Settings;
|
|
|
27
27
|
Linear16: "linear16",
|
|
28
28
|
Mulaw: "mulaw",
|
|
29
29
|
Alaw: "alaw",
|
|
30
|
+
Mp3: "mp3",
|
|
31
|
+
Opus: "opus",
|
|
32
|
+
Flac: "flac",
|
|
33
|
+
Aac: "aac",
|
|
34
|
+
};
|
|
35
|
+
/** Audio container format. */
|
|
36
|
+
Output.Container = {
|
|
37
|
+
None: "none",
|
|
38
|
+
Wav: "wav",
|
|
39
|
+
Ogg: "ogg",
|
|
30
40
|
};
|
|
31
41
|
})(Output = Audio.Output || (Audio.Output = {}));
|
|
32
42
|
})(Audio = AgentV1Settings.Audio || (AgentV1Settings.Audio = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Deepgram from "../../../../../index.mjs";
|
|
2
|
+
export type AgentV1SettingsAgentContextListenProvider = Deepgram.agent.AgentV1SettingsAgentContextListenProvider.V1 | Deepgram.agent.AgentV1SettingsAgentContextListenProvider.V2;
|
|
3
|
+
export declare namespace AgentV1SettingsAgentContextListenProvider {
|
|
4
|
+
interface V1 extends Deepgram.DeepgramListenProviderV1 {
|
|
5
|
+
version: "v1";
|
|
6
|
+
}
|
|
7
|
+
interface V2 extends Deepgram.DeepgramListenProviderV2 {
|
|
8
|
+
version: "v2";
|
|
9
|
+
}
|
|
10
|
+
namespace AgentV1SettingsAgentContextListenProviderV2 {
|
|
11
|
+
type LanguageHint = Deepgram.DeepgramListenProviderV2.LanguageHint;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Backward-compat: the 2026-05-14 regen consolidated the listen-provider sub-types
|
|
2
|
+
// into top-level `DeepgramListenProviderV1` / `DeepgramListenProviderV2` and dropped
|
|
3
|
+
// the nested `AgentV1SettingsAgentContextListenProviderV2.LanguageHint` namespace
|
|
4
|
+
// path. We restore the nested namespace as an alias to `DeepgramListenProviderV2.LanguageHint`
|
|
5
|
+
// so existing imports of the deep path still resolve.
|
|
6
|
+
// Regression coverage in tests/unit/compat-aliases.test.ts.
|
|
7
|
+
export {};
|
package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.d.mts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
1
|
import type * as Deepgram from "../../../../../index.mjs";
|
|
2
|
-
export type AgentV1SettingsAgentListenProvider = Deepgram.agent.
|
|
2
|
+
export type AgentV1SettingsAgentListenProvider = Deepgram.agent.AgentV1SettingsAgentContextListenProvider;
|
|
3
3
|
export declare namespace AgentV1SettingsAgentListenProvider {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/** Provider type for speech-to-text */
|
|
7
|
-
type: "deepgram";
|
|
8
|
-
/** Model to use for speech to text using the V1 API (e.g. Nova-3, Nova-2) */
|
|
9
|
-
model?: string | undefined;
|
|
10
|
-
/** Language code to use for speech-to-text. Can be a BCP-47 language tag (e.g. `en`), or `multi` for code-switching transcription */
|
|
11
|
-
language?: string | undefined;
|
|
12
|
-
/** Prompt keyterm recognition to improve Keyword Recall Rate */
|
|
13
|
-
keyterms?: string[] | undefined;
|
|
14
|
-
/** Applies smart formatting to improve transcript readability */
|
|
15
|
-
smart_format?: boolean | undefined;
|
|
16
|
-
}
|
|
17
|
-
interface V2 {
|
|
18
|
-
version: "v2";
|
|
19
|
-
/** Provider type for speech-to-text */
|
|
20
|
-
type: "deepgram";
|
|
21
|
-
/** Model to use for speech to text using the V2 API (e.g. flux-general-en) */
|
|
22
|
-
model: string;
|
|
23
|
-
/** Prompt keyterm recognition to improve Keyword Recall Rate */
|
|
24
|
-
keyterms?: string[] | undefined;
|
|
25
|
-
}
|
|
4
|
+
type V1 = Deepgram.agent.AgentV1SettingsAgentContextListenProvider.V1;
|
|
5
|
+
type V2 = Deepgram.agent.AgentV1SettingsAgentContextListenProvider.V2;
|
|
26
6
|
}
|
package/dist/esm/api/resources/agent/resources/v1/types/AgentV1SettingsAgentListenProvider.mjs
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Backward-compat alias for the type renamed by the 2026-05-06 regen to
|
|
2
|
+
// `AgentV1SettingsAgentContextListenProvider`. The new V2 only adds an optional
|
|
3
|
+
// `language_hint` field, so this alias is purely additive: every literal that
|
|
4
|
+
// satisfied the old V2 still satisfies the new V2, and pinned-name callers
|
|
5
|
+
// (`const p: AgentV1SettingsAgentListenProvider = ...`) keep compiling without
|
|
6
|
+
// a cast. See AGENTS.md for the patch rationale; regression coverage in
|
|
7
|
+
// tests/unit/compat-aliases.test.ts.
|
|
2
8
|
export {};
|
|
@@ -13,6 +13,7 @@ export * from "./AgentV1PromptUpdated.mjs";
|
|
|
13
13
|
export * from "./AgentV1ReceiveFunctionCallResponse.mjs";
|
|
14
14
|
export * from "./AgentV1SendFunctionCallResponse.mjs";
|
|
15
15
|
export * from "./AgentV1Settings.mjs";
|
|
16
|
+
export * from "./AgentV1SettingsAgentContextListenProvider.mjs";
|
|
16
17
|
export * from "./AgentV1SettingsAgentListenProvider.mjs";
|
|
17
18
|
export * from "./AgentV1SettingsApplied.mjs";
|
|
18
19
|
export * from "./AgentV1SpeakUpdated.mjs";
|
|
@@ -13,6 +13,7 @@ export * from "./AgentV1PromptUpdated.mjs";
|
|
|
13
13
|
export * from "./AgentV1ReceiveFunctionCallResponse.mjs";
|
|
14
14
|
export * from "./AgentV1SendFunctionCallResponse.mjs";
|
|
15
15
|
export * from "./AgentV1Settings.mjs";
|
|
16
|
+
export * from "./AgentV1SettingsAgentContextListenProvider.mjs";
|
|
16
17
|
export * from "./AgentV1SettingsAgentListenProvider.mjs";
|
|
17
18
|
export * from "./AgentV1SettingsApplied.mjs";
|
|
18
19
|
export * from "./AgentV1SpeakUpdated.mjs";
|
|
@@ -55,6 +55,7 @@ export class MediaClient {
|
|
|
55
55
|
* detect_entities: true,
|
|
56
56
|
* detect_language: true,
|
|
57
57
|
* diarize: true,
|
|
58
|
+
* diarize_model: "latest",
|
|
58
59
|
* dictation: true,
|
|
59
60
|
* encoding: "linear16",
|
|
60
61
|
* filler_words: true,
|
|
@@ -85,7 +86,7 @@ export class MediaClient {
|
|
|
85
86
|
__transcribeUrl(request, requestOptions) {
|
|
86
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
87
88
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
88
|
-
const { callback, callback_method: callbackMethod, extra, sentiment, summarize, tag, topics, custom_topic: customTopic, custom_topic_mode: customTopicMode, intents, custom_intent: customIntent, custom_intent_mode: customIntentMode, detect_entities: detectEntities, detect_language: detectLanguage, diarize, dictation, encoding, filler_words: fillerWords, keyterm, keywords, language, measurements, model, multichannel, numerals, paragraphs, profanity_filter: profanityFilter, punctuate, redact, replace, search, smart_format: smartFormat, utterances, utt_split: uttSplit, version, mip_opt_out: mipOptOut } = request, _body = __rest(request, ["callback", "callback_method", "extra", "sentiment", "summarize", "tag", "topics", "custom_topic", "custom_topic_mode", "intents", "custom_intent", "custom_intent_mode", "detect_entities", "detect_language", "diarize", "dictation", "encoding", "filler_words", "keyterm", "keywords", "language", "measurements", "model", "multichannel", "numerals", "paragraphs", "profanity_filter", "punctuate", "redact", "replace", "search", "smart_format", "utterances", "utt_split", "version", "mip_opt_out"]);
|
|
89
|
+
const { callback, callback_method: callbackMethod, extra, sentiment, summarize, tag, topics, custom_topic: customTopic, custom_topic_mode: customTopicMode, intents, custom_intent: customIntent, custom_intent_mode: customIntentMode, detect_entities: detectEntities, detect_language: detectLanguage, diarize, diarize_model: diarizeModel, dictation, encoding, filler_words: fillerWords, keyterm, keywords, language, measurements, model, multichannel, numerals, paragraphs, profanity_filter: profanityFilter, punctuate, redact, replace, search, smart_format: smartFormat, utterances, utt_split: uttSplit, version, mip_opt_out: mipOptOut } = request, _body = __rest(request, ["callback", "callback_method", "extra", "sentiment", "summarize", "tag", "topics", "custom_topic", "custom_topic_mode", "intents", "custom_intent", "custom_intent_mode", "detect_entities", "detect_language", "diarize", "diarize_model", "dictation", "encoding", "filler_words", "keyterm", "keywords", "language", "measurements", "model", "multichannel", "numerals", "paragraphs", "profanity_filter", "punctuate", "redact", "replace", "search", "smart_format", "utterances", "utt_split", "version", "mip_opt_out"]);
|
|
89
90
|
const _queryParams = {
|
|
90
91
|
callback,
|
|
91
92
|
callback_method: callbackMethod != null ? callbackMethod : undefined,
|
|
@@ -102,6 +103,7 @@ export class MediaClient {
|
|
|
102
103
|
detect_entities: detectEntities,
|
|
103
104
|
detect_language: detectLanguage,
|
|
104
105
|
diarize,
|
|
106
|
+
diarize_model: diarizeModel != null ? diarizeModel : undefined,
|
|
105
107
|
dictation,
|
|
106
108
|
encoding: encoding != null ? encoding : undefined,
|
|
107
109
|
filler_words: fillerWords,
|
|
@@ -200,6 +202,7 @@ export class MediaClient {
|
|
|
200
202
|
detect_entities: request.detect_entities,
|
|
201
203
|
detect_language: request.detect_language,
|
|
202
204
|
diarize: request.diarize,
|
|
205
|
+
diarize_model: request.diarize_model != null ? request.diarize_model : undefined,
|
|
203
206
|
dictation: request.dictation,
|
|
204
207
|
encoding: request.encoding != null ? request.encoding : undefined,
|
|
205
208
|
filler_words: request.filler_words,
|
|
@@ -17,6 +17,7 @@ import type * as Deepgram from "../../../../../../../../index.mjs";
|
|
|
17
17
|
* detect_entities: true,
|
|
18
18
|
* detect_language: true,
|
|
19
19
|
* diarize: true,
|
|
20
|
+
* diarize_model: "latest",
|
|
20
21
|
* dictation: true,
|
|
21
22
|
* encoding: "linear16",
|
|
22
23
|
* filler_words: true,
|
|
@@ -72,6 +73,8 @@ export interface ListenV1RequestUrl {
|
|
|
72
73
|
detect_language?: boolean;
|
|
73
74
|
/** Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0 */
|
|
74
75
|
diarize?: boolean;
|
|
76
|
+
/** Select and enable a specific batch diarization model version. If specifying this parameter, you should not set the deprecated `diarize=true` parameter. Not accepted on streaming requests. */
|
|
77
|
+
diarize_model?: Deepgram.listen.v1.MediaTranscribeRequestDiarizeModel;
|
|
75
78
|
/** Dictation mode for controlling formatting with dictated speech */
|
|
76
79
|
dictation?: boolean;
|
|
77
80
|
/** Specify the expected encoding of your submitted audio */
|
|
@@ -34,6 +34,8 @@ export interface MediaTranscribeRequestOctetStream {
|
|
|
34
34
|
detect_language?: boolean;
|
|
35
35
|
/** Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0 */
|
|
36
36
|
diarize?: boolean;
|
|
37
|
+
/** Select and enable a specific batch diarization model version. If specifying this parameter, you should not set the deprecated `diarize=true` parameter. Not accepted on streaming requests. */
|
|
38
|
+
diarize_model?: Deepgram.listen.v1.MediaTranscribeRequestDiarizeModel;
|
|
37
39
|
/** Dictation mode for controlling formatting with dictated speech */
|
|
38
40
|
dictation?: boolean;
|
|
39
41
|
/** Specify the expected encoding of your submitted audio */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const MediaTranscribeRequestDiarizeModel: {
|
|
2
|
+
readonly Latest: "latest";
|
|
3
|
+
readonly V1: "v1";
|
|
4
|
+
readonly V2: "v2";
|
|
5
|
+
};
|
|
6
|
+
export type MediaTranscribeRequestDiarizeModel = (typeof MediaTranscribeRequestDiarizeModel)[keyof typeof MediaTranscribeRequestDiarizeModel] | string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./MediaTranscribeRequestCallbackMethod.mjs";
|
|
2
2
|
export * from "./MediaTranscribeRequestCustomIntentMode.mjs";
|
|
3
3
|
export * from "./MediaTranscribeRequestCustomTopicMode.mjs";
|
|
4
|
+
export * from "./MediaTranscribeRequestDiarizeModel.mjs";
|
|
4
5
|
export * from "./MediaTranscribeRequestEncoding.mjs";
|
|
5
6
|
export * from "./MediaTranscribeRequestModel.mjs";
|
|
6
7
|
export * from "./MediaTranscribeRequestSummarize.mjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./MediaTranscribeRequestCallbackMethod.mjs";
|
|
2
2
|
export * from "./MediaTranscribeRequestCustomIntentMode.mjs";
|
|
3
3
|
export * from "./MediaTranscribeRequestCustomTopicMode.mjs";
|
|
4
|
+
export * from "./MediaTranscribeRequestDiarizeModel.mjs";
|
|
4
5
|
export * from "./MediaTranscribeRequestEncoding.mjs";
|
|
5
6
|
export * from "./MediaTranscribeRequestModel.mjs";
|
|
6
7
|
export * from "./MediaTranscribeRequestSummarize.mjs";
|
|
@@ -12,6 +12,7 @@ export declare namespace V2Client {
|
|
|
12
12
|
eot_threshold?: Deepgram.ListenV2EotThreshold | undefined;
|
|
13
13
|
eot_timeout_ms?: Deepgram.ListenV2EotTimeoutMs | undefined;
|
|
14
14
|
keyterm?: Deepgram.ListenV2Keyterm;
|
|
15
|
+
language_hint?: Deepgram.ListenV2LanguageHint;
|
|
15
16
|
mip_opt_out?: Deepgram.ListenV2MipOptOut | undefined;
|
|
16
17
|
tag?: Deepgram.ListenV2Tag | undefined;
|
|
17
18
|
Authorization: string;
|
|
@@ -21,7 +21,7 @@ export class V2Client {
|
|
|
21
21
|
connect(args) {
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
var _a, _b, _c;
|
|
24
|
-
const { model, encoding, sample_rate: sampleRate, eager_eot_threshold: eagerEotThreshold, eot_threshold: eotThreshold, eot_timeout_ms: eotTimeoutMs, keyterm, mip_opt_out: mipOptOut, tag, protocols, queryParams, headers, debug, reconnectAttempts, connectionTimeoutInSeconds, abortSignal, } = args;
|
|
24
|
+
const { model, encoding, sample_rate: sampleRate, eager_eot_threshold: eagerEotThreshold, eot_threshold: eotThreshold, eot_timeout_ms: eotTimeoutMs, keyterm, language_hint: languageHint, mip_opt_out: mipOptOut, tag, protocols, queryParams, headers, debug, reconnectAttempts, connectionTimeoutInSeconds, abortSignal, } = args;
|
|
25
25
|
const _queryParams = {
|
|
26
26
|
model,
|
|
27
27
|
encoding: encoding != null ? encoding : undefined,
|
|
@@ -41,7 +41,20 @@ export class V2Client {
|
|
|
41
41
|
? eotTimeoutMs
|
|
42
42
|
: toJson(eotTimeoutMs)
|
|
43
43
|
: undefined,
|
|
44
|
-
keyterm:
|
|
44
|
+
keyterm: Array.isArray(keyterm)
|
|
45
|
+
? keyterm.map((item) => (typeof item === "string" ? item : toJson(item)))
|
|
46
|
+
: keyterm != null
|
|
47
|
+
? typeof keyterm === "string"
|
|
48
|
+
? keyterm
|
|
49
|
+
: toJson(keyterm)
|
|
50
|
+
: undefined,
|
|
51
|
+
language_hint: Array.isArray(languageHint)
|
|
52
|
+
? languageHint.map((item) => (typeof item === "string" ? item : toJson(item)))
|
|
53
|
+
: languageHint != null
|
|
54
|
+
? typeof languageHint === "string"
|
|
55
|
+
? languageHint
|
|
56
|
+
: toJson(languageHint)
|
|
57
|
+
: undefined,
|
|
45
58
|
mip_opt_out: mipOptOut != null ? (typeof mipOptOut === "string" ? mipOptOut : toJson(mipOptOut)) : undefined,
|
|
46
59
|
tag: tag != null ? (typeof tag === "string" ? tag : toJson(tag)) : undefined,
|
|
47
60
|
};
|
|
@@ -10,6 +10,8 @@ export interface ListenV2ConfigureSuccess {
|
|
|
10
10
|
*/
|
|
11
11
|
thresholds: ListenV2ConfigureSuccess.Thresholds;
|
|
12
12
|
keyterms: Deepgram.ListenV2Keyterm;
|
|
13
|
+
/** The currently active language hints. Only applicable to the flux-general-multi model. */
|
|
14
|
+
language_hints?: string[] | undefined;
|
|
13
15
|
/**
|
|
14
16
|
* Starts at `0` and increments for each message the server sends
|
|
15
17
|
* to the client. This includes messages of other types, like
|
|
@@ -30,7 +30,7 @@ export declare class KeysClient {
|
|
|
30
30
|
* Creates a new API key with specified settings for the project
|
|
31
31
|
*
|
|
32
32
|
* @param {string} project_id - The unique identifier of the project
|
|
33
|
-
* @param {Deepgram.
|
|
33
|
+
* @param {Deepgram.CreateKeyV1Request} [request]
|
|
34
34
|
* @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
35
|
*
|
|
36
36
|
* @throws {@link Deepgram.BadRequestError}
|
|
@@ -40,7 +40,7 @@ export declare class KeysClient {
|
|
|
40
40
|
* "key": "value"
|
|
41
41
|
* })
|
|
42
42
|
*/
|
|
43
|
-
create(project_id: string, request?: Deepgram.
|
|
43
|
+
create(project_id: string, request?: Deepgram.CreateKeyV1Request, requestOptions?: KeysClient.RequestOptions): core.HttpResponsePromise<Deepgram.CreateKeyV1Response>;
|
|
44
44
|
private __create;
|
|
45
45
|
/**
|
|
46
46
|
* Retrieves information about a specified API key
|
|
@@ -82,7 +82,7 @@ export class KeysClient {
|
|
|
82
82
|
* Creates a new API key with specified settings for the project
|
|
83
83
|
*
|
|
84
84
|
* @param {string} project_id - The unique identifier of the project
|
|
85
|
-
* @param {Deepgram.
|
|
85
|
+
* @param {Deepgram.CreateKeyV1Request} [request]
|
|
86
86
|
* @param {KeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
87
|
*
|
|
88
88
|
* @throws {@link Deepgram.BadRequestError}
|
|
@@ -5,8 +5,10 @@ export interface SpeakV1Metadata {
|
|
|
5
5
|
request_id: string;
|
|
6
6
|
/** Name of the model being used */
|
|
7
7
|
model_name: string;
|
|
8
|
-
/** Version of the model being used */
|
|
8
|
+
/** Version of the primary model being used */
|
|
9
9
|
model_version: string;
|
|
10
|
-
/** Unique identifier for the model */
|
|
10
|
+
/** Unique identifier for the primary model used */
|
|
11
11
|
model_uuid: string;
|
|
12
|
+
/** List of unique identifiers for any additional models used to serve the request */
|
|
13
|
+
additional_model_uuids?: string[] | undefined;
|
|
12
14
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface DeepgramListenProviderV1 {
|
|
2
|
+
/** Provider type for speech-to-text */
|
|
3
|
+
type: "deepgram";
|
|
4
|
+
/** Specifies usage of the V1 Deepgram speech-to-text API */
|
|
5
|
+
version?: "v1" | undefined;
|
|
6
|
+
/** Model to use for speech to text using the V1 API (e.g. Nova-3, Nova-2) */
|
|
7
|
+
model?: string | undefined;
|
|
8
|
+
/** Language code to use for speech-to-text. Can be a BCP-47 language tag (e.g. `en`), or `multi` for code-switching transcription */
|
|
9
|
+
language?: string | undefined;
|
|
10
|
+
/** Prompt keyterm recognition to improve Keyword Recall Rate */
|
|
11
|
+
keyterms?: string[] | undefined;
|
|
12
|
+
/** Applies smart formatting to improve transcript readability */
|
|
13
|
+
smart_format?: boolean | undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface DeepgramListenProviderV2 {
|
|
2
|
+
/** Provider type for speech-to-text */
|
|
3
|
+
type: "deepgram";
|
|
4
|
+
/** Specifies usage of the V2 Deepgram speech-to-text API (e.g. Flux) */
|
|
5
|
+
version?: "v2" | undefined;
|
|
6
|
+
/** Model to use for speech to text using the V2 API (e.g. flux-general-en, flux-general-multi) */
|
|
7
|
+
model: string;
|
|
8
|
+
/** One or more BCP-47 language codes to bias the model toward specific languages. Only supported when model is flux-general-multi. Without hints, the model auto-detects the spoken language. See the Language Prompting guide for details. */
|
|
9
|
+
language_hint?: DeepgramListenProviderV2.LanguageHint | undefined;
|
|
10
|
+
/** Prompt keyterm recognition to improve Keyword Recall Rate */
|
|
11
|
+
keyterms?: string[] | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace DeepgramListenProviderV2 {
|
|
14
|
+
/**
|
|
15
|
+
* One or more BCP-47 language codes to bias the model toward specific languages. Only supported when model is flux-general-multi. Without hints, the model auto-detects the spoken language. See the Language Prompting guide for details.
|
|
16
|
+
*/
|
|
17
|
+
type LanguageHint = string | string[];
|
|
18
|
+
}
|
|
@@ -6,4 +6,17 @@ export interface Groq {
|
|
|
6
6
|
model: "openai/gpt-oss-20b";
|
|
7
7
|
/** Groq temperature (0-2) */
|
|
8
8
|
temperature?: number | undefined;
|
|
9
|
+
/** OpenAI reasoning_effort */
|
|
10
|
+
reasoning_mode?: Groq.ReasoningMode | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace Groq {
|
|
13
|
+
/** OpenAI reasoning_effort */
|
|
14
|
+
const ReasoningMode: {
|
|
15
|
+
readonly None: "none";
|
|
16
|
+
readonly Minimal: "minimal";
|
|
17
|
+
readonly Low: "low";
|
|
18
|
+
readonly Medium: "medium";
|
|
19
|
+
readonly High: "high";
|
|
20
|
+
};
|
|
21
|
+
type ReasoningMode = (typeof ReasoningMode)[keyof typeof ReasoningMode] | string;
|
|
9
22
|
}
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var Groq;
|
|
3
|
+
(function (Groq) {
|
|
4
|
+
/** OpenAI reasoning_effort */
|
|
5
|
+
Groq.ReasoningMode = {
|
|
6
|
+
None: "none",
|
|
7
|
+
Minimal: "minimal",
|
|
8
|
+
Low: "low",
|
|
9
|
+
Medium: "medium",
|
|
10
|
+
High: "high",
|
|
11
|
+
};
|
|
12
|
+
})(Groq || (Groq = {}));
|
|
@@ -7,7 +7,11 @@ export declare namespace ListProjectMembersV1Response {
|
|
|
7
7
|
interface Item {
|
|
8
8
|
/** The unique identifier of the member */
|
|
9
9
|
member_id?: string | undefined;
|
|
10
|
+
/** The API scopes of the member */
|
|
11
|
+
scopes?: string[] | undefined;
|
|
10
12
|
email?: string | undefined;
|
|
13
|
+
first_name?: string | undefined;
|
|
14
|
+
last_name?: string | undefined;
|
|
11
15
|
}
|
|
12
16
|
}
|
|
13
17
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language hints constrain and prioritize language detection for the
|
|
3
|
+
* flux-general-multi model. Pass multiple language_hint query parameters
|
|
4
|
+
* to specify multiple language codes. Empty values are rejected.
|
|
5
|
+
* Only valid when model is flux-general-multi.
|
|
6
|
+
*/
|
|
7
|
+
export type ListenV2LanguageHint = string | string[];
|
|
@@ -6,6 +6,8 @@ export interface OpenAiThinkProvider {
|
|
|
6
6
|
model: OpenAiThinkProvider.Model;
|
|
7
7
|
/** OpenAI temperature (0-2) */
|
|
8
8
|
temperature?: number | undefined;
|
|
9
|
+
/** OpenAI reasoning_effort */
|
|
10
|
+
reasoning_mode?: OpenAiThinkProvider.ReasoningMode | undefined;
|
|
9
11
|
}
|
|
10
12
|
export declare namespace OpenAiThinkProvider {
|
|
11
13
|
/** OpenAI model to use */
|
|
@@ -20,4 +22,13 @@ export declare namespace OpenAiThinkProvider {
|
|
|
20
22
|
readonly Gpt4OMini: "gpt-4o-mini";
|
|
21
23
|
};
|
|
22
24
|
type Model = (typeof Model)[keyof typeof Model] | string;
|
|
25
|
+
/** OpenAI reasoning_effort */
|
|
26
|
+
const ReasoningMode: {
|
|
27
|
+
readonly None: "none";
|
|
28
|
+
readonly Minimal: "minimal";
|
|
29
|
+
readonly Low: "low";
|
|
30
|
+
readonly Medium: "medium";
|
|
31
|
+
readonly High: "high";
|
|
32
|
+
};
|
|
33
|
+
type ReasoningMode = (typeof ReasoningMode)[keyof typeof ReasoningMode] | string;
|
|
23
34
|
}
|
|
@@ -12,4 +12,12 @@ export var OpenAiThinkProvider;
|
|
|
12
12
|
Gpt4O: "gpt-4o",
|
|
13
13
|
Gpt4OMini: "gpt-4o-mini",
|
|
14
14
|
};
|
|
15
|
+
/** OpenAI reasoning_effort */
|
|
16
|
+
OpenAiThinkProvider.ReasoningMode = {
|
|
17
|
+
None: "none",
|
|
18
|
+
Minimal: "minimal",
|
|
19
|
+
Low: "low",
|
|
20
|
+
Medium: "medium",
|
|
21
|
+
High: "high",
|
|
22
|
+
};
|
|
15
23
|
})(OpenAiThinkProvider || (OpenAiThinkProvider = {}));
|
|
@@ -7,11 +7,13 @@ export * from "./AwsPollySpeakProvider.mjs";
|
|
|
7
7
|
export * from "./BillingBreakdownV1Response.mjs";
|
|
8
8
|
export * from "./Cartesia.mjs";
|
|
9
9
|
export * from "./CreateAgentConfigurationV1Response.mjs";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./CreateKeyV1Request.mjs";
|
|
11
11
|
export * from "./CreateKeyV1Response.mjs";
|
|
12
12
|
export * from "./CreateProjectDistributionCredentialsV1Response.mjs";
|
|
13
13
|
export * from "./CreateProjectInviteV1Response.mjs";
|
|
14
14
|
export * from "./Deepgram.mjs";
|
|
15
|
+
export * from "./DeepgramListenProviderV1.mjs";
|
|
16
|
+
export * from "./DeepgramListenProviderV2.mjs";
|
|
15
17
|
export * from "./DeleteAgentConfigurationV1Response.mjs";
|
|
16
18
|
export * from "./DeleteAgentVariableV1Response.mjs";
|
|
17
19
|
export * from "./DeleteProjectInviteV1Response.mjs";
|
|
@@ -79,6 +81,7 @@ export * from "./ListenV2Encoding.mjs";
|
|
|
79
81
|
export * from "./ListenV2EotThreshold.mjs";
|
|
80
82
|
export * from "./ListenV2EotTimeoutMs.mjs";
|
|
81
83
|
export * from "./ListenV2Keyterm.mjs";
|
|
84
|
+
export * from "./ListenV2LanguageHint.mjs";
|
|
82
85
|
export * from "./ListenV2MipOptOut.mjs";
|
|
83
86
|
export * from "./ListenV2Model.mjs";
|
|
84
87
|
export * from "./ListenV2SampleRate.mjs";
|
|
@@ -7,11 +7,13 @@ export * from "./AwsPollySpeakProvider.mjs";
|
|
|
7
7
|
export * from "./BillingBreakdownV1Response.mjs";
|
|
8
8
|
export * from "./Cartesia.mjs";
|
|
9
9
|
export * from "./CreateAgentConfigurationV1Response.mjs";
|
|
10
|
-
export * from "./
|
|
10
|
+
export * from "./CreateKeyV1Request.mjs";
|
|
11
11
|
export * from "./CreateKeyV1Response.mjs";
|
|
12
12
|
export * from "./CreateProjectDistributionCredentialsV1Response.mjs";
|
|
13
13
|
export * from "./CreateProjectInviteV1Response.mjs";
|
|
14
14
|
export * from "./Deepgram.mjs";
|
|
15
|
+
export * from "./DeepgramListenProviderV1.mjs";
|
|
16
|
+
export * from "./DeepgramListenProviderV2.mjs";
|
|
15
17
|
export * from "./DeleteAgentConfigurationV1Response.mjs";
|
|
16
18
|
export * from "./DeleteAgentVariableV1Response.mjs";
|
|
17
19
|
export * from "./DeleteProjectInviteV1Response.mjs";
|
|
@@ -79,6 +81,7 @@ export * from "./ListenV2Encoding.mjs";
|
|
|
79
81
|
export * from "./ListenV2EotThreshold.mjs";
|
|
80
82
|
export * from "./ListenV2EotTimeoutMs.mjs";
|
|
81
83
|
export * from "./ListenV2Keyterm.mjs";
|
|
84
|
+
export * from "./ListenV2LanguageHint.mjs";
|
|
82
85
|
export * from "./ListenV2MipOptOut.mjs";
|
|
83
86
|
export * from "./ListenV2Model.mjs";
|
|
84
87
|
export * from "./ListenV2SampleRate.mjs";
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
export interface DeepgramEnvironmentUrls {
|
|
2
2
|
base: string;
|
|
3
|
-
agent: string;
|
|
4
3
|
production: string;
|
|
4
|
+
agent: string;
|
|
5
|
+
agentRest: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const DeepgramEnvironment: {
|
|
7
8
|
readonly Production: {
|
|
8
9
|
readonly base: "https://api.deepgram.com";
|
|
9
|
-
readonly agent: "wss://agent.deepgram.com";
|
|
10
10
|
readonly production: "wss://api.deepgram.com";
|
|
11
|
-
};
|
|
12
|
-
readonly Agent: {
|
|
13
|
-
readonly base: "https://agent.deepgram.com";
|
|
14
11
|
readonly agent: "wss://agent.deepgram.com";
|
|
15
|
-
readonly
|
|
12
|
+
readonly agentRest: "https://agent.deepgram.com";
|
|
16
13
|
};
|
|
17
14
|
};
|
|
18
|
-
export type DeepgramEnvironment = typeof DeepgramEnvironment.Production
|
|
15
|
+
export type DeepgramEnvironment = typeof DeepgramEnvironment.Production;
|