agora-agents 2.10.0 → 2.11.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.
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
41
41
  const headers = (0, headers_js_1.mergeHeaders)({
42
42
  "X-Fern-Language": "JavaScript",
43
43
  "X-Fern-SDK-Name": "agora-agents",
44
- "X-Fern-SDK-Version": "v2.10.0",
45
- "User-Agent": "agora-agents/v2.10.0",
44
+ "X-Fern-SDK-Version": "v2.11.0",
45
+ "User-Agent": "agora-agents/v2.11.0",
46
46
  "X-Fern-Runtime": core.RUNTIME.type,
47
47
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
48
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -696,6 +696,7 @@ class Agent {
696
696
  const asrConfig = this._stt !== undefined || !allowMissingAsr
697
697
  ? this._resolveAsrConfig(turnDetectionConfig)
698
698
  : undefined;
699
+ // Preview TTS extends the production schema; narrow only at the generated wire boundary.
699
700
  const ttsConfig = this._tts;
700
701
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, base), { turn_detection: turnDetectionConfig }), (llmConfig && { llm: llmConfig })), (ttsConfig && { tts: ttsConfig })), (asrConfig && { asr: asrConfig }));
701
702
  }
@@ -31,6 +31,8 @@ export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPre
31
31
  export { AgentPresets, normalizePresetInput } from "./presets.js";
32
32
  export type { PreviewFeature, PreviewRoute } from "./preview/client.js";
33
33
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.js";
34
+ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./preview/gemini-tts.js";
35
+ export { GeminiTTS, GeminiTTSModels } from "./preview/gemini-tts.js";
34
36
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.js";
35
37
  export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.js";
36
38
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.js";
@@ -21,8 +21,8 @@
21
21
  */
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.normalizePresetInput = exports.AgentPresets = exports.redactSecrets = exports.redactHeadersForDebug = exports.REDACTED = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SilenceActionValues = exports.SalModeValues = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.Geofence = exports.FillerWordsSelectionRule = exports.DataChannel = exports.CredentialMode = exports.AudioScenario = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.toBaseAvatarConfig = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.AgentSession = exports.Agent = void 0;
24
- exports.VertexAILLM = exports.OpenAI = exports.Groq = exports.Gemini = exports.Dify = exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.LiveAvatarAvatar = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
- exports.XAiTTS = exports.TypecastTTS = exports.SmallestAITTS = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SmallestAISTT = exports.SarvamSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GeminiLive = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.AzureOpenAIRealtime = void 0;
24
+ exports.Groq = exports.Gemini = exports.Dify = exports.CustomLLM = exports.AzureOpenAI = exports.Anthropic = exports.AmazonBedrock = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpatiusAvatar = exports.SensetimeAvatar = exports.MiniMaxCNTTS = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.FengmingSTT = exports.DeepSeekLLM = exports.CosyVoiceTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.AliyunLLM = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.LiveAvatarAvatar = exports.HeyGenAvatar = exports.GenericAvatar = exports.AnamAvatar = exports.AkoolAvatar = exports.MAX_EXPIRY_SECONDS = exports.generateRtcToken = exports.generateConvoAIToken = exports.ExpiresIn = exports.GeminiTTSModels = exports.GeminiTTS = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = void 0;
25
+ exports.XAiTTS = exports.TypecastTTS = exports.SmallestAITTS = exports.SarvamTTS = exports.RimeTTS = exports.OpenAITTS = exports.MurfTTS = exports.MistralTTS = exports.MiniMaxTTS = exports.MicrosoftTTS = exports.HumeAITTS = exports.GradiumTTS = exports.GoogleTTS = exports.GenericTTS = exports.FishAudioTTS = exports.ElevenLabsTTS = exports.DeepgramTTS = exports.CartesiaTTS = exports.AmazonTTS = exports.XAiSTT = exports.SpeechmaticsSTT = exports.SmallestAISTT = exports.SarvamSTT = exports.OpenAISTT = exports.MicrosoftSTT = exports.GoogleSTT = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.DeepgramSTT = exports.AssemblyAISTT = exports.AresSTT = exports.AmazonSTT = exports.XaiGrok = exports.VertexAI = exports.QwenOmni = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GeminiLive = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.AzureOpenAIRealtime = exports.VertexAILLM = exports.OpenAI = void 0;
26
26
  // Core classes
27
27
  var Agent_js_1 = require("./Agent.js");
28
28
  Object.defineProperty(exports, "Agent", { enumerable: true, get: function () { return Agent_js_1.Agent; } });
@@ -85,6 +85,9 @@ Object.defineProperty(exports, "PREVIEW_FEATURE_HEADER", { enumerable: true, get
85
85
  Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: function () { return client_js_1.PreviewFeatures; } });
86
86
  Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
87
87
  Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
88
+ var gemini_tts_js_1 = require("./preview/gemini-tts.js");
89
+ Object.defineProperty(exports, "GeminiTTS", { enumerable: true, get: function () { return gemini_tts_js_1.GeminiTTS; } });
90
+ Object.defineProperty(exports, "GeminiTTSModels", { enumerable: true, get: function () { return gemini_tts_js_1.GeminiTTSModels; } });
88
91
  // Token generation
89
92
  var token_js_1 = require("./token.js");
90
93
  Object.defineProperty(exports, "ExpiresIn", { enumerable: true, get: function () { return token_js_1.ExpiresIn; } });
@@ -31,7 +31,7 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
31
31
  * preview endpoint.
32
32
  */
33
33
  export declare const PreviewFeatures: {
34
- /** @deprecated Gemini Live now uses the production endpoint. */
34
+ /** Gemini TTS preview gate; Gemini ASR and Live use production. */
35
35
  readonly GeminiLive: "gemini-live";
36
36
  /** @deprecated GPT Live now uses the production endpoint. */
37
37
  readonly LiveModels: "live-models";
@@ -52,7 +52,7 @@ export interface PreviewRoute {
52
52
  export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
53
53
  /** Build generated resource clients for one preview session. */
54
54
  export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
55
- export declare function requiredPreviewFeatures(_properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
55
+ export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
56
56
  /**
57
57
  * Normalizes the historical Gemini preview greeting field for production.
58
58
  * Kept under its old name so callers importing this compatibility helper do
@@ -45,7 +45,7 @@ exports.PREVIEW_FEATURE_HEADER = "agora-feature";
45
45
  * preview endpoint.
46
46
  */
47
47
  exports.PreviewFeatures = {
48
- /** @deprecated Gemini Live now uses the production endpoint. */
48
+ /** Gemini TTS preview gate; Gemini ASR and Live use production. */
49
49
  GeminiLive: "gemini-live",
50
50
  /** @deprecated GPT Live now uses the production endpoint. */
51
51
  LiveModels: "live-models",
@@ -74,8 +74,9 @@ function createPreviewRoute(client, features) {
74
74
  features: [...features],
75
75
  };
76
76
  }
77
- function requiredPreviewFeatures(_properties) {
78
- return [];
77
+ function requiredPreviewFeatures(properties) {
78
+ var _a;
79
+ return ((_a = properties.tts) === null || _a === void 0 ? void 0 : _a.vendor) === "gemini" ? [exports.PreviewFeatures.GeminiLive] : [];
79
80
  }
80
81
  const PRODUCTION_GEMINI_MLLM_MODELS = new Set([
81
82
  "models/gemini-3.8-live",
@@ -0,0 +1,31 @@
1
+ import { BaseTTS } from "../vendors/base.js";
2
+ /** Gemini 3.8 Flash TTS preview model. */
3
+ export declare const GeminiTTSModels: {
4
+ readonly Flash38: "gemini-3.8-flash-tts";
5
+ };
6
+ export type GeminiTTSModel = (typeof GeminiTTSModels)[keyof typeof GeminiTTSModels] | (string & {});
7
+ export interface GeminiTTSOptions {
8
+ apiKey: string;
9
+ /** Sent verbatim; defaults to Gemini 3.8 Flash TTS. */
10
+ model?: GeminiTTSModel;
11
+ /** Defaults to Puck. */
12
+ voice?: string;
13
+ /** Natural-language speaking instructions. Omitted unless supplied. */
14
+ style?: string;
15
+ }
16
+ /** Preview wire shape, kept separate from the generated production schema. */
17
+ export interface GeminiTTSConfig {
18
+ vendor: "gemini";
19
+ params: {
20
+ api_key: string;
21
+ model: string;
22
+ voice: string;
23
+ style?: string;
24
+ };
25
+ }
26
+ /** Preview-only TTS. AgentSession selects the gemini-live gate automatically. */
27
+ export declare class GeminiTTS extends BaseTTS {
28
+ private readonly options;
29
+ constructor(options: GeminiTTSOptions);
30
+ toConfig(): GeminiTTSConfig;
31
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeminiTTS = exports.GeminiTTSModels = void 0;
4
+ const base_js_1 = require("../vendors/base.js");
5
+ /** Gemini 3.8 Flash TTS preview model. */
6
+ exports.GeminiTTSModels = {
7
+ Flash38: "gemini-3.8-flash-tts",
8
+ };
9
+ /** Preview-only TTS. AgentSession selects the gemini-live gate automatically. */
10
+ class GeminiTTS extends base_js_1.BaseTTS {
11
+ constructor(options) {
12
+ super();
13
+ for (const field of ["apiKey", "model", "voice"]) {
14
+ const value = options[field];
15
+ if ((field === "apiKey" || value !== undefined) && (typeof value !== "string" || !value.trim())) {
16
+ throw new Error(`GeminiTTS requires ${field}`);
17
+ }
18
+ }
19
+ if (options.style !== undefined && typeof options.style !== "string") {
20
+ throw new Error("GeminiTTS style must be a string");
21
+ }
22
+ this.options = Object.assign({}, options);
23
+ }
24
+ toConfig() {
25
+ const { apiKey, model = exports.GeminiTTSModels.Flash38, voice = "Puck", style } = this.options;
26
+ return {
27
+ vendor: "gemini",
28
+ params: Object.assign({ api_key: apiKey, model, voice }, (style !== undefined && { style })),
29
+ };
30
+ }
31
+ }
32
+ exports.GeminiTTS = GeminiTTS;
@@ -10,5 +10,7 @@ export type { GeminiSTTModel, GeminiSTTOptions } from "../vendors/stt.js";
10
10
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.js";
11
11
  export type { PreviewFeature, PreviewRoute } from "./client.js";
12
12
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.js";
13
+ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./gemini-tts.js";
14
+ export { GeminiTTS, GeminiTTSModels } from "./gemini-tts.js";
13
15
  export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.js";
14
16
  export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.js";
@@ -6,7 +6,7 @@
6
6
  * the production vendor modules independently.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.applyPreviewShape = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.OpenAIGPTLive = void 0;
9
+ exports.GeminiThinkingLevels = exports.GeminiLiveModels = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.GeminiTTSModels = exports.GeminiTTS = exports.requiredPreviewFeatures = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = exports.PREVIEW_API_BASE_URL = exports.createPreviewRoute = exports.applyPreviewShape = exports.GeminiTranscriptionMode = exports.GeminiSTTModels = exports.GeminiSTT = exports.OpenAIGPTLive = void 0;
10
10
  var mllm_js_1 = require("../vendors/mllm.js");
11
11
  Object.defineProperty(exports, "OpenAIGPTLive", { enumerable: true, get: function () { return mllm_js_1.OpenAIGPTLive; } });
12
12
  var stt_js_1 = require("../vendors/stt.js");
@@ -21,6 +21,9 @@ Object.defineProperty(exports, "PREVIEW_FEATURE_HEADER", { enumerable: true, get
21
21
  Object.defineProperty(exports, "PreviewFeatures", { enumerable: true, get: function () { return client_js_1.PreviewFeatures; } });
22
22
  Object.defineProperty(exports, "previewRequestHeaders", { enumerable: true, get: function () { return client_js_1.previewRequestHeaders; } });
23
23
  Object.defineProperty(exports, "requiredPreviewFeatures", { enumerable: true, get: function () { return client_js_1.requiredPreviewFeatures; } });
24
+ var gemini_tts_js_1 = require("./gemini-tts.js");
25
+ Object.defineProperty(exports, "GeminiTTS", { enumerable: true, get: function () { return gemini_tts_js_1.GeminiTTS; } });
26
+ Object.defineProperty(exports, "GeminiTTSModels", { enumerable: true, get: function () { return gemini_tts_js_1.GeminiTTSModels; } });
24
27
  var vendors_js_1 = require("./vendors.js");
25
28
  Object.defineProperty(exports, "GEMINI_MLLM_DEFAULT_MODEL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_DEFAULT_MODEL; } });
26
29
  Object.defineProperty(exports, "GEMINI_MLLM_URL", { enumerable: true, get: function () { return vendors_js_1.GEMINI_MLLM_URL; } });
@@ -5,6 +5,7 @@
5
5
  import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType, GeminiAsrParams as GeminiAsrParamsType, GenericHttpTtsParams as GenericTtsParamsType, GenericHttpTts as GenericTtsType, GetAgentsResponse, GetHistoryAgentsResponse, GetTurnsAgentsResponse, GoogleTtsParams as GoogleTtsParamsType, GoogleTts as GoogleTtsType, GradiumTtsParams as GradiumTtsParamsType, GradiumTts as GradiumTtsType, HumeAiTtsParams as HumeAiTtsParamsType, HumeAiTts as HumeAiTtsType, ListAgentsResponse, Llm, LlmToolExecution as LlmToolExecutionType, LlmToolFunction as LlmToolFunctionType, LlmToolServer as LlmToolServerType, LlmTool as LlmToolType, McpServer as McpServerType, MicrosoftTtsParams as MicrosoftTtsParamsType, MicrosoftTts as MicrosoftTtsType, MinimaxTtsParams as MinimaxTtsParamsType, MinimaxTts as MinimaxTtsType, MistralTtsParams as MistralTtsParamsType, MistralTts as MistralTtsType, Mllm, MllmTurnDetection, MllmTurnDetection as MllmTurnDetectionNS, MurfTtsParams as MurfTtsParamsType, MurfTts as MurfTtsType, OpenAiTtsParams as OpenAiTtsParamsType, OpenAiTts as OpenAiTtsType, RimeTtsParams as RimeTtsParamsType, RimeTts as RimeTtsType, SarvamTtsParams as SarvamTtsParamsType, SarvamTts as SarvamTtsType, SmallestAiAsrParams as SmallestAiAsrParamsType, SmallestAiAsr as SmallestAiAsrType, SmallestAiTtsParams as SmallestAiTtsParamsType, SmallestAiTts as SmallestAiTtsType, SpatiusAvatarParams as SpatiusAvatarParamsType, SpeakAgentsRequest, StartAgentsRequest, Tts, TypecastTtsParams as TypecastTtsParamsType, TypecastTts as TypecastTtsType, UpdateAgentsRequest, XAiAsrParams as XAiAsrParamsType, XAiAsr as XAiAsrType, XAiTtsParams as XAiTtsParamsType, XAiTts as XAiTtsType } from "../api/index.js";
6
6
  import type { AgentThinkAgentManagementRequest } from "../api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.js";
7
7
  import type { PresetInput } from "./presets.js";
8
+ import type { GeminiTTSConfig } from "./preview/gemini-tts.js";
8
9
  /** LLM request style (openai, gemini, anthropic, dify) */
9
10
  export type LlmStyle = Llm.Style;
10
11
  /**
@@ -84,7 +85,7 @@ export type AsrConfig = SttConfig;
84
85
  /** Wire ASR vendor identifier (e.g. `"deepgram"`, `"fengming"`). */
85
86
  export type AsrVendorName = string;
86
87
  /** TTS (Text-to-Speech) configuration - discriminated union */
87
- export type TtsConfig = Tts;
88
+ export type TtsConfig = Tts | GeminiTTSConfig;
88
89
  /** Inline synchronous REST tool exposed to a standard text LLM. */
89
90
  export type LlmTool = LlmToolType;
90
91
  export type LlmToolExecution = LlmToolExecutionType;
@@ -3,6 +3,8 @@ export { AgoraClient } from "./AgoraPoolClient.js";
3
3
  export type { AgoraArea, AreaScope, GlobalArea } from "./agentkit/area.js";
4
4
  export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.js";
5
5
  export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.js";
6
+ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./agentkit/preview/gemini-tts.js";
7
+ export { GeminiTTS, GeminiTTSModels } from "./agentkit/preview/gemini-tts.js";
6
8
  export * as Agora from "./api/index.js";
7
9
  export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
8
10
  export { Area } from "./core/domain/index.js";
package/dist/cjs/index.js CHANGED
@@ -38,7 +38,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.GeminiLiveModels = exports.GeminiLive = exports.Gemini = exports.GEMINI_PREVIEW_MLLM_URL = exports.GEMINI_MLLM_URL = exports.GEMINI_MLLM_DEFAULT_MODEL = exports.FishAudioTTS = exports.FillerWordsSelectionRule = exports.FengmingSTT = exports.ExpiresIn = exports.ElevenLabsTTS = exports.Dify = exports.DeepSeekLLM = exports.DeepgramTTS = exports.DeepgramSTT = exports.DataChannel = exports.createPreviewRoute = exports.CustomLLM = exports.CredentialMode = exports.CosyVoiceTTS = exports.CartesiaTTS = exports.BytedanceTTS = exports.BytedanceLLM = exports.BytedanceDuplexTTS = exports.BaseTTS = exports.BaseSTT = exports.BaseMLLM = exports.BaseLLM = exports.BaseCNTTS = exports.BaseCNSTT = exports.BaseCNMLLM = exports.BaseCNLLM = exports.BaseCNAvatar = exports.BaseAvatar = exports.AzureOpenAIRealtime = exports.AzureOpenAI = exports.AudioScenario = exports.AssemblyAISTT = exports.AresSTT = exports.Anthropic = exports.AnamAvatar = exports.AmazonTTS = exports.AmazonSTT = exports.AmazonBedrock = exports.AliyunLLM = exports.AkoolAvatar = exports.AgentSession = exports.AgentPresets = exports.Agent = exports.AgoraClient = void 0;
40
40
  exports.PREVIEW_API_BASE_URL = exports.OpenAITTS = exports.OpenAISTT = exports.OpenAIRealtime = exports.OpenAIGPTLive = exports.OpenAI = exports.normalizePresetInput = exports.MurfTTS = exports.MllmTurnDetectionModeValues = exports.MllmTurnDetectionModeServerVad = exports.MllmTurnDetectionModeSemanticVad = exports.MllmTurnDetectionModeAgoraVad = exports.MistralTTS = exports.MiniMaxTTS = exports.MiniMaxCNTTS = exports.MicrosoftTTS = exports.MicrosoftSTT = exports.MicrosoftCNTTS = exports.MicrosoftCNSTT = exports.MAX_EXPIRY_SECONDS = exports.LiveAvatarAvatar = exports.isSpatiusAvatar = exports.isSensetimeAvatar = exports.isLiveAvatarAvatar = exports.isHeyGenAvatar = exports.isGenericAvatar = exports.isAvatarTokenManaged = exports.isAnamAvatar = exports.isAkoolAvatar = exports.InterruptionModeValues = exports.InterruptionModeStartOfSpeech = exports.InterruptionModeKeywords = exports.InterruptionDisabledStrategyIgnore = exports.InterruptionDisabledStrategyAppend = exports.InterruptionDisabledStrategy = exports.HumeAITTS = exports.HeyGenAvatar = exports.generateRtcToken = exports.generateConvoAIToken = exports.Groq = exports.GradiumTTS = exports.GoogleTTS = exports.GoogleSTT = exports.Geofence = exports.GenericTTS = exports.GenericAvatar = exports.GeminiTranscriptionMode = exports.GeminiThinkingLevels = exports.GeminiSTTModels = exports.GeminiSTT = void 0;
41
- exports.AgoraTimeoutError = exports.AgoraError = exports.AgoraEnvironment = exports.Area = exports.Agora = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TypecastTTS = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SmallestAITTS = exports.SmallestAISTT = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RimeTTS = exports.REDACTED = exports.QwenOmni = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = void 0;
41
+ exports.AgoraEnvironment = exports.Area = exports.Agora = exports.GeminiTTSModels = exports.GeminiTTS = exports.XfyunSTT = exports.XfyunDialectSTT = exports.XfyunBigModelSTT = exports.XaiGrok = exports.XAiTTS = exports.XAiSTT = exports.validateTtsSampleRate = exports.validateAvatarConfig = exports.VertexAILLM = exports.VertexAI = exports.toBaseAvatarConfig = exports.TypecastTTS = exports.TurnDetectionTypeValues = exports.ThinkOnThinkingActionInterrupt = exports.ThinkOnThinkingActionIgnore = exports.ThinkOnSpeakingActionInterrupt = exports.ThinkOnSpeakingActionIgnore = exports.ThinkOnListeningActionInterrupt = exports.ThinkOnListeningActionInject = exports.ThinkOnListeningActionIgnore = exports.TencentTTS = exports.TencentSTT = exports.TencentLLM = exports.StepFunTTS = exports.SpeechmaticsSTT = exports.SpeakPriorityValues = exports.SpeakPriorityInterrupt = exports.SpeakPriorityIgnore = exports.SpeakPriorityAppend = exports.SpatiusAvatar = exports.SmallestAITTS = exports.SmallestAISTT = exports.SilenceActionValues = exports.SensetimeAvatar = exports.SarvamTTS = exports.SarvamSTT = exports.SalModeValues = exports.redactSecrets = exports.redactHeadersForDebug = exports.RimeTTS = exports.REDACTED = exports.QwenOmni = exports.previewRequestHeaders = exports.PreviewFeatures = exports.PREVIEW_FEATURE_HEADER = void 0;
42
+ exports.AgoraTimeoutError = exports.AgoraError = void 0;
42
43
  var AgoraPoolClient_js_1 = require("./AgoraPoolClient.js");
43
44
  Object.defineProperty(exports, "AgoraClient", { enumerable: true, get: function () { return AgoraPoolClient_js_1.AgoraClient; } });
44
45
  // Agentkit layer exports - clean, ergonomic API
@@ -193,6 +194,9 @@ Object.defineProperty(exports, "XaiGrok", { enumerable: true, get: function () {
193
194
  Object.defineProperty(exports, "XfyunBigModelSTT", { enumerable: true, get: function () { return index_js_1.XfyunBigModelSTT; } });
194
195
  Object.defineProperty(exports, "XfyunDialectSTT", { enumerable: true, get: function () { return index_js_1.XfyunDialectSTT; } });
195
196
  Object.defineProperty(exports, "XfyunSTT", { enumerable: true, get: function () { return index_js_1.XfyunSTT; } });
197
+ var gemini_tts_js_1 = require("./agentkit/preview/gemini-tts.js");
198
+ Object.defineProperty(exports, "GeminiTTS", { enumerable: true, get: function () { return gemini_tts_js_1.GeminiTTS; } });
199
+ Object.defineProperty(exports, "GeminiTTSModels", { enumerable: true, get: function () { return gemini_tts_js_1.GeminiTTSModels; } });
196
200
  exports.Agora = __importStar(require("./api/index.js"));
197
201
  var index_js_2 = require("./core/domain/index.js");
198
202
  Object.defineProperty(exports, "Area", { enumerable: true, get: function () { return index_js_2.Area; } });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v2.10.0";
1
+ export declare const SDK_VERSION = "v2.11.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "v2.10.0";
4
+ exports.SDK_VERSION = "v2.11.0";
@@ -5,8 +5,8 @@ export function normalizeClientOptions(options) {
5
5
  const headers = mergeHeaders({
6
6
  "X-Fern-Language": "JavaScript",
7
7
  "X-Fern-SDK-Name": "agora-agents",
8
- "X-Fern-SDK-Version": "v2.10.0",
9
- "User-Agent": "agora-agents/v2.10.0",
8
+ "X-Fern-SDK-Version": "v2.11.0",
9
+ "User-Agent": "agora-agents/v2.11.0",
10
10
  "X-Fern-Runtime": core.RUNTIME.type,
11
11
  "X-Fern-Runtime-Version": core.RUNTIME.version,
12
12
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -693,6 +693,7 @@ export class Agent {
693
693
  const asrConfig = this._stt !== undefined || !allowMissingAsr
694
694
  ? this._resolveAsrConfig(turnDetectionConfig)
695
695
  : undefined;
696
+ // Preview TTS extends the production schema; narrow only at the generated wire boundary.
696
697
  const ttsConfig = this._tts;
697
698
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, base), { turn_detection: turnDetectionConfig }), (llmConfig && { llm: llmConfig })), (ttsConfig && { tts: ttsConfig })), (asrConfig && { asr: asrConfig }));
698
699
  }
@@ -31,6 +31,8 @@ export type { AgentPreset, AsrPreset, DeepgramPresetModel, LlmPreset, MiniMaxPre
31
31
  export { AgentPresets, normalizePresetInput } from "./presets.mjs";
32
32
  export type { PreviewFeature, PreviewRoute } from "./preview/client.mjs";
33
33
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
34
+ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./preview/gemini-tts.mjs";
35
+ export { GeminiTTS, GeminiTTSModels } from "./preview/gemini-tts.mjs";
34
36
  export type { AvatarVendor, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, LlmVendor, SttVendor, TtsVendor, } from "./region-vendors.mjs";
35
37
  export type { GenerateConvoAITokenOptions, GenerateTokenOptions, } from "./token.mjs";
36
38
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
@@ -27,6 +27,7 @@ export { AudioScenario, CredentialMode, DataChannel, FillerWordsSelectionRule, G
27
27
  export { REDACTED, redactHeadersForDebug, redactSecrets } from "./debug.mjs";
28
28
  export { AgentPresets, normalizePresetInput } from "./presets.mjs";
29
29
  export { createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./preview/client.mjs";
30
+ export { GeminiTTS, GeminiTTSModels } from "./preview/gemini-tts.mjs";
30
31
  // Token generation
31
32
  export { ExpiresIn, generateConvoAIToken, generateRtcToken, MAX_EXPIRY_SECONDS, } from "./token.mjs";
32
33
  // Avatar vendor classes
@@ -31,7 +31,7 @@ export declare const PREVIEW_FEATURE_HEADER = "agora-feature";
31
31
  * preview endpoint.
32
32
  */
33
33
  export declare const PreviewFeatures: {
34
- /** @deprecated Gemini Live now uses the production endpoint. */
34
+ /** Gemini TTS preview gate; Gemini ASR and Live use production. */
35
35
  readonly GeminiLive: "gemini-live";
36
36
  /** @deprecated GPT Live now uses the production endpoint. */
37
37
  readonly LiveModels: "live-models";
@@ -52,7 +52,7 @@ export interface PreviewRoute {
52
52
  export declare function previewRequestHeaders(features: readonly PreviewFeature[], headers?: Record<string, string>): Record<string, string>;
53
53
  /** Build generated resource clients for one preview session. */
54
54
  export declare function createPreviewRoute(client: AgoraClient, features: readonly PreviewFeature[]): PreviewRoute;
55
- export declare function requiredPreviewFeatures(_properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
55
+ export declare function requiredPreviewFeatures(properties: Agora.StartAgentsRequest.Properties): PreviewFeature[];
56
56
  /**
57
57
  * Normalizes the historical Gemini preview greeting field for production.
58
58
  * Kept under its old name so callers importing this compatibility helper do
@@ -38,7 +38,7 @@ export const PREVIEW_FEATURE_HEADER = "agora-feature";
38
38
  * preview endpoint.
39
39
  */
40
40
  export const PreviewFeatures = {
41
- /** @deprecated Gemini Live now uses the production endpoint. */
41
+ /** Gemini TTS preview gate; Gemini ASR and Live use production. */
42
42
  GeminiLive: "gemini-live",
43
43
  /** @deprecated GPT Live now uses the production endpoint. */
44
44
  LiveModels: "live-models",
@@ -67,8 +67,9 @@ export function createPreviewRoute(client, features) {
67
67
  features: [...features],
68
68
  };
69
69
  }
70
- export function requiredPreviewFeatures(_properties) {
71
- return [];
70
+ export function requiredPreviewFeatures(properties) {
71
+ var _a;
72
+ return ((_a = properties.tts) === null || _a === void 0 ? void 0 : _a.vendor) === "gemini" ? [PreviewFeatures.GeminiLive] : [];
72
73
  }
73
74
  const PRODUCTION_GEMINI_MLLM_MODELS = new Set([
74
75
  "models/gemini-3.8-live",
@@ -0,0 +1,31 @@
1
+ import { BaseTTS } from "../vendors/base.mjs";
2
+ /** Gemini 3.8 Flash TTS preview model. */
3
+ export declare const GeminiTTSModels: {
4
+ readonly Flash38: "gemini-3.8-flash-tts";
5
+ };
6
+ export type GeminiTTSModel = (typeof GeminiTTSModels)[keyof typeof GeminiTTSModels] | (string & {});
7
+ export interface GeminiTTSOptions {
8
+ apiKey: string;
9
+ /** Sent verbatim; defaults to Gemini 3.8 Flash TTS. */
10
+ model?: GeminiTTSModel;
11
+ /** Defaults to Puck. */
12
+ voice?: string;
13
+ /** Natural-language speaking instructions. Omitted unless supplied. */
14
+ style?: string;
15
+ }
16
+ /** Preview wire shape, kept separate from the generated production schema. */
17
+ export interface GeminiTTSConfig {
18
+ vendor: "gemini";
19
+ params: {
20
+ api_key: string;
21
+ model: string;
22
+ voice: string;
23
+ style?: string;
24
+ };
25
+ }
26
+ /** Preview-only TTS. AgentSession selects the gemini-live gate automatically. */
27
+ export declare class GeminiTTS extends BaseTTS {
28
+ private readonly options;
29
+ constructor(options: GeminiTTSOptions);
30
+ toConfig(): GeminiTTSConfig;
31
+ }
@@ -0,0 +1,28 @@
1
+ import { BaseTTS } from "../vendors/base.mjs";
2
+ /** Gemini 3.8 Flash TTS preview model. */
3
+ export const GeminiTTSModels = {
4
+ Flash38: "gemini-3.8-flash-tts",
5
+ };
6
+ /** Preview-only TTS. AgentSession selects the gemini-live gate automatically. */
7
+ export class GeminiTTS extends BaseTTS {
8
+ constructor(options) {
9
+ super();
10
+ for (const field of ["apiKey", "model", "voice"]) {
11
+ const value = options[field];
12
+ if ((field === "apiKey" || value !== undefined) && (typeof value !== "string" || !value.trim())) {
13
+ throw new Error(`GeminiTTS requires ${field}`);
14
+ }
15
+ }
16
+ if (options.style !== undefined && typeof options.style !== "string") {
17
+ throw new Error("GeminiTTS style must be a string");
18
+ }
19
+ this.options = Object.assign({}, options);
20
+ }
21
+ toConfig() {
22
+ const { apiKey, model = GeminiTTSModels.Flash38, voice = "Puck", style } = this.options;
23
+ return {
24
+ vendor: "gemini",
25
+ params: Object.assign({ api_key: apiKey, model, voice }, (style !== undefined && { style })),
26
+ };
27
+ }
28
+ }
@@ -10,5 +10,7 @@ export type { GeminiSTTModel, GeminiSTTOptions } from "../vendors/stt.mjs";
10
10
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.mjs";
11
11
  export type { PreviewFeature, PreviewRoute } from "./client.mjs";
12
12
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
13
+ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./gemini-tts.mjs";
14
+ export { GeminiTTS, GeminiTTSModels } from "./gemini-tts.mjs";
13
15
  export type { GeminiLiveModel, GeminiLiveVoice, GeminiPreviewVoice, GeminiThinkingLevel, } from "./vendors.mjs";
14
16
  export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
@@ -7,4 +7,5 @@
7
7
  export { OpenAIGPTLive } from "../vendors/mllm.mjs";
8
8
  export { GeminiSTT, GeminiSTTModels, GeminiTranscriptionMode } from "../vendors/stt.mjs";
9
9
  export { applyPreviewShape, createPreviewRoute, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, requiredPreviewFeatures, } from "./client.mjs";
10
+ export { GeminiTTS, GeminiTTSModels } from "./gemini-tts.mjs";
10
11
  export { GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, GeminiLiveModels, GeminiThinkingLevels, } from "./vendors.mjs";
@@ -5,6 +5,7 @@
5
5
  import type { AgentThinkAgentManagementResponse, AmazonTtsParams as AmazonTtsParamsType, AmazonTts as AmazonTtsType, Asr, AsrLanguage, CartesiaTtsParams as CartesiaTtsParamsType, CartesiaTts as CartesiaTtsType, ElevenLabsTtsParams as ElevenLabsTtsParamsType, ElevenLabsTts as ElevenLabsTtsType, FishAudioTtsParams as FishAudioTtsParamsType, FishAudioTts as FishAudioTtsType, GeminiAsrParams as GeminiAsrParamsType, GenericHttpTtsParams as GenericTtsParamsType, GenericHttpTts as GenericTtsType, GetAgentsResponse, GetHistoryAgentsResponse, GetTurnsAgentsResponse, GoogleTtsParams as GoogleTtsParamsType, GoogleTts as GoogleTtsType, GradiumTtsParams as GradiumTtsParamsType, GradiumTts as GradiumTtsType, HumeAiTtsParams as HumeAiTtsParamsType, HumeAiTts as HumeAiTtsType, ListAgentsResponse, Llm, LlmToolExecution as LlmToolExecutionType, LlmToolFunction as LlmToolFunctionType, LlmToolServer as LlmToolServerType, LlmTool as LlmToolType, McpServer as McpServerType, MicrosoftTtsParams as MicrosoftTtsParamsType, MicrosoftTts as MicrosoftTtsType, MinimaxTtsParams as MinimaxTtsParamsType, MinimaxTts as MinimaxTtsType, MistralTtsParams as MistralTtsParamsType, MistralTts as MistralTtsType, Mllm, MllmTurnDetection, MllmTurnDetection as MllmTurnDetectionNS, MurfTtsParams as MurfTtsParamsType, MurfTts as MurfTtsType, OpenAiTtsParams as OpenAiTtsParamsType, OpenAiTts as OpenAiTtsType, RimeTtsParams as RimeTtsParamsType, RimeTts as RimeTtsType, SarvamTtsParams as SarvamTtsParamsType, SarvamTts as SarvamTtsType, SmallestAiAsrParams as SmallestAiAsrParamsType, SmallestAiAsr as SmallestAiAsrType, SmallestAiTtsParams as SmallestAiTtsParamsType, SmallestAiTts as SmallestAiTtsType, SpatiusAvatarParams as SpatiusAvatarParamsType, SpeakAgentsRequest, StartAgentsRequest, Tts, TypecastTtsParams as TypecastTtsParamsType, TypecastTts as TypecastTtsType, UpdateAgentsRequest, XAiAsrParams as XAiAsrParamsType, XAiAsr as XAiAsrType, XAiTtsParams as XAiTtsParamsType, XAiTts as XAiTtsType } from "../api/index.mjs";
6
6
  import type { AgentThinkAgentManagementRequest } from "../api/resources/agentManagement/client/requests/AgentThinkAgentManagementRequest.mjs";
7
7
  import type { PresetInput } from "./presets.mjs";
8
+ import type { GeminiTTSConfig } from "./preview/gemini-tts.mjs";
8
9
  /** LLM request style (openai, gemini, anthropic, dify) */
9
10
  export type LlmStyle = Llm.Style;
10
11
  /**
@@ -84,7 +85,7 @@ export type AsrConfig = SttConfig;
84
85
  /** Wire ASR vendor identifier (e.g. `"deepgram"`, `"fengming"`). */
85
86
  export type AsrVendorName = string;
86
87
  /** TTS (Text-to-Speech) configuration - discriminated union */
87
- export type TtsConfig = Tts;
88
+ export type TtsConfig = Tts | GeminiTTSConfig;
88
89
  /** Inline synchronous REST tool exposed to a standard text LLM. */
89
90
  export type LlmTool = LlmToolType;
90
91
  export type LlmToolExecution = LlmToolExecutionType;
@@ -3,6 +3,8 @@ export { AgoraClient } from "./AgoraPoolClient.mjs";
3
3
  export type { AgoraArea, AreaScope, GlobalArea } from "./agentkit/area.mjs";
4
4
  export type { AdvancedFeatures, AgentConfig, AgentConfigUpdate, AgentOptions, AgentPreset, AgentSessionEvent, AgentSessionEventHandler, AgentSessionOptions, AgentsClient, AkoolAvatarConfig, AkoolAvatarOptions, AkoolSampleRate, AliyunLLMOptions, AmazonBedrockOptions, AmazonSTTOptions, AmazonTTSOptions, AmazonTts, AmazonTtsParams, AnamAvatarConfig, AnamAvatarOptions, AnthropicOptions, AresSTTOptions, AsrConfig, AsrPreset, AsrVendorName, AssemblyAISTTOptions, AvatarConfig, AvatarVendor, AvatarWireVendor, AzureOpenAIOptions, AzureOpenAIRealtimeOptions, AzureOpenAIRealtimeParams, BaseMllmOptions, BytedanceDuplexTTSOptions, BytedanceLLMOptions, BytedanceTTSOptions, CartesiaSampleRate, CartesiaTTSOptions, CartesiaTts, CartesiaTtsParams, CNAvatarVendor, CNLlmVendor, CNMllmVendor, CNSttVendor, CNTtsVendor, ConversationHistory, ConversationRole, ConversationSessionTurn, ConversationTurn, ConversationTurns, CustomLLMOptions, DeepgramSTTOptions, DeepgramTTSOptions, DeepSeekLLMOptions, DifyOptions, Eagerness, ElevenLabsSampleRate, ElevenLabsTTSOptions, ElevenLabsTts, ElevenLabsTtsParams, EndOfSpeechConfig, EndOfSpeechMode, EndOfSpeechSemanticConfig, EndOfSpeechVadConfig, FarewellConfig, FengmingSTTOptions, FillerWordsConfig, FillerWordsContent, FillerWordsContentGeneratedConfig, FillerWordsContentSelectionRule, FillerWordsContentStaticConfig, FillerWordsGeneratedLlmProvider, FillerWordsTrigger, FillerWordsTriggerFixedTimeConfig, FishAudioTTSOptions, FishAudioTts, FishAudioTtsParams, GeminiAsrParams, GeminiLiveModel, GeminiLiveOptions, GeminiLiveVoice, GeminiOptions, GeminiPreviewVoice, GeminiSTTModel, GeminiSTTOptions, GeminiThinkingLevel, GenerateConvoAITokenOptions, GenerateTokenOptions, GenericAvatarConfig, GenericAvatarOptions, GenericTTSOptions, GenericTts, GenericTtsParams, GeofenceArea, GeofenceConfig, GeofenceExcludeArea, GetTurnsOptions, GlobalAvatarVendor, GlobalLlmVendor, GlobalMllmVendor, GlobalSttVendor, GlobalTtsVendor, GoogleSTTOptions, GoogleTTSOptions, GoogleTts, GoogleTtsParams, GradiumTTSOptions, GradiumTts, GradiumTtsParams, GroqOptions, HeyGenAvatarConfig, HeyGenAvatarOptions, HeyGenSampleRate, HumeAITTSOptions, HumeAiTts, HumeAiTtsParams, InterruptionConfig, InterruptionMode, InterruptMode, Labels, LiveAvatarAvatarConfig, LiveAvatarAvatarOptions, LiveAvatarSampleRate, LlmConfig, LlmGreetingConfigs, LlmGreetingConfigsMode, LlmPreset, LlmStyle, LlmTool, LlmToolExecution, LlmToolFunction, LlmToolServer, LlmVendor, McpServer, McpServersItem, MicrosoftCNSampleRate, MicrosoftCNSTTOptions, MicrosoftCNTTSOptions, MicrosoftSampleRate, MicrosoftSTTOptions, MicrosoftTTSOptions, MicrosoftTts, MicrosoftTtsParams, MiniMaxCNTTSOptions, MiniMaxTTSOptions, MinimaxTts, MinimaxTtsParams, MistralTTSOptions, MistralTts, MistralTtsParams, MllmConfig, MllmTurnDetectionConfig, MllmTurnDetectionMode, MllmVendor, MurfTTSOptions, MurfTts, MurfTtsParams, OpenAIGPTLiveOptions, OpenAIOptions, OpenAIRealtimeOptions, OpenAISTTOptions, OpenAITTSOptions, OpenAiTts, OpenAiTtsParams, ParametersAudioScenario, ParametersDataChannel, PresetCategory, PresetInput, PreviewFeature, PreviewRoute, QwenOmniOptions, RimeTTSOptions, RimeTts, RimeTtsParams, RtcConfig, SalConfig, SalMode, SampleRate, SarvamSTTOptions, SarvamTTSOptions, SarvamTts, SarvamTtsParams, SayOptions, SensetimeAvatarConfig, SensetimeAvatarOptions, SessionInfo, SessionListResponse, SessionOptions, SessionParams, SessionParamsInput, SessionStatus, SessionSummary, SilenceAction, SilenceConfig, SmallestAISTTOptions, SmallestAITTSOptions, SmallestAiAsr, SmallestAiAsrParams, SmallestAiTts, SmallestAiTtsParams, SpatiusAvatarConfig, SpatiusAvatarOptions, SpatiusAvatarParams, SpeakPriority, SpeechmaticsSTTOptions, StartOfSpeechConfig, StartOfSpeechDisabledConfig, StartOfSpeechDisabledConfigStrategy, StartOfSpeechKeywordsConfig, StartOfSpeechMode, StartOfSpeechVadConfig, StepFunTTSOptions, StrictAvatarConfig, SttConfig, SttVendor, TencentLLMOptions, TencentSTTOptions, TencentTTSOptions, ThinkOnListeningAction, ThinkOnSpeakingAction, ThinkOnThinkingAction, ThinkOptions, ThinkResponse, TtsConfig, TtsPreset, TtsVendor, TurnDetectionConfig, TurnDetectionLanguage, TurnDetectionNestedConfig, TurnDetectionType, TypecastTTSOptions, TypecastTts, TypecastTtsParams, VertexAILLMOptions, VertexAIOptions, XAiAsr, XAiAsrParams, XAiSTTOptions, XAiTTSOptions, XAiTts, XAiTtsParams, XaiGrokOptions, XfyunBigModelSTTOptions, XfyunDialectSTTOptions, XfyunSTTOptions, } from "./agentkit/index.mjs";
5
5
  export { Agent, AgentPresets, AgentSession, AkoolAvatar, AliyunLLM, AmazonBedrock, AmazonSTT, AmazonTTS, AnamAvatar, Anthropic, AresSTT, AssemblyAISTT, AudioScenario, AzureOpenAI, AzureOpenAIRealtime, BaseAvatar, BaseCNAvatar, BaseCNLLM, BaseCNMLLM, BaseCNSTT, BaseCNTTS, BaseLLM, BaseMLLM, BaseSTT, BaseTTS, BytedanceDuplexTTS, BytedanceLLM, BytedanceTTS, CartesiaTTS, CosyVoiceTTS, CredentialMode, CustomLLM, createPreviewRoute, DataChannel, DeepgramSTT, DeepgramTTS, DeepSeekLLM, Dify, ElevenLabsTTS, ExpiresIn, FengmingSTT, FillerWordsSelectionRule, FishAudioTTS, GEMINI_MLLM_DEFAULT_MODEL, GEMINI_MLLM_URL, GEMINI_PREVIEW_MLLM_URL, Gemini, GeminiLive, GeminiLiveModels, GeminiSTT, GeminiSTTModels, GeminiThinkingLevels, GeminiTranscriptionMode, GenericAvatar, GenericTTS, Geofence, GoogleSTT, GoogleTTS, GradiumTTS, Groq, generateConvoAIToken, generateRtcToken, HeyGenAvatar, HumeAITTS, InterruptionDisabledStrategy, InterruptionDisabledStrategyAppend, InterruptionDisabledStrategyIgnore, InterruptionModeKeywords, InterruptionModeStartOfSpeech, InterruptionModeValues, isAkoolAvatar, isAnamAvatar, isAvatarTokenManaged, isGenericAvatar, isHeyGenAvatar, isLiveAvatarAvatar, isSensetimeAvatar, isSpatiusAvatar, LiveAvatarAvatar, MAX_EXPIRY_SECONDS, MicrosoftCNSTT, MicrosoftCNTTS, MicrosoftSTT, MicrosoftTTS, MiniMaxCNTTS, MiniMaxTTS, MistralTTS, MllmTurnDetectionModeAgoraVad, MllmTurnDetectionModeSemanticVad, MllmTurnDetectionModeServerVad, MllmTurnDetectionModeValues, MurfTTS, normalizePresetInput, OpenAI, OpenAIGPTLive, OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues, SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.mjs";
6
+ export type { GeminiTTSConfig, GeminiTTSModel, GeminiTTSOptions } from "./agentkit/preview/gemini-tts.mjs";
7
+ export { GeminiTTS, GeminiTTSModels } from "./agentkit/preview/gemini-tts.mjs";
6
8
  export * as Agora from "./api/index.mjs";
7
9
  export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
8
10
  export { Area } from "./core/domain/index.mjs";
@@ -13,6 +13,7 @@ OpenAI, OpenAIGPTLive,
13
13
  OpenAIRealtime, OpenAISTT, OpenAITTS, PREVIEW_API_BASE_URL, PREVIEW_FEATURE_HEADER, PreviewFeatures, previewRequestHeaders, QwenOmni, REDACTED, RimeTTS, redactHeadersForDebug, redactSecrets, SalModeValues, SarvamSTT, SarvamTTS, SensetimeAvatar, SilenceActionValues, SmallestAISTT, SmallestAITTS, SpatiusAvatar, SpeakPriorityAppend, SpeakPriorityIgnore, SpeakPriorityInterrupt, SpeakPriorityValues,
14
14
  // STT vendors
15
15
  SpeechmaticsSTT, StepFunTTS, TencentLLM, TencentSTT, TencentTTS, ThinkOnListeningActionIgnore, ThinkOnListeningActionInject, ThinkOnListeningActionInterrupt, ThinkOnSpeakingActionIgnore, ThinkOnSpeakingActionInterrupt, ThinkOnThinkingActionIgnore, ThinkOnThinkingActionInterrupt, TurnDetectionTypeValues, TypecastTTS, toBaseAvatarConfig, VertexAI, VertexAILLM, validateAvatarConfig, validateTtsSampleRate, XAiSTT, XAiTTS, XaiGrok, XfyunBigModelSTT, XfyunDialectSTT, XfyunSTT, } from "./agentkit/index.mjs";
16
+ export { GeminiTTS, GeminiTTSModels } from "./agentkit/preview/gemini-tts.mjs";
16
17
  export * as Agora from "./api/index.mjs";
17
18
  export { Area } from "./core/domain/index.mjs";
18
19
  export { AgoraEnvironment } from "./environments.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "v2.10.0";
1
+ export declare const SDK_VERSION = "v2.11.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "v2.10.0";
1
+ export const SDK_VERSION = "v2.11.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agora-agents",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "private": false,
5
5
  "repository": "github:AgoraIO/agora-agents-ts",
6
6
  "type": "commonjs",