@livekit/agents-plugin-google 1.0.0-next.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/LICENSE +201 -0
- package/README.md +89 -0
- package/dist/beta/gemini_tts.cjs +239 -0
- package/dist/beta/gemini_tts.cjs.map +1 -0
- package/dist/beta/gemini_tts.d.cts +47 -0
- package/dist/beta/gemini_tts.d.ts +47 -0
- package/dist/beta/gemini_tts.d.ts.map +1 -0
- package/dist/beta/gemini_tts.js +221 -0
- package/dist/beta/gemini_tts.js.map +1 -0
- package/dist/beta/gemini_tts.test.cjs +9 -0
- package/dist/beta/gemini_tts.test.cjs.map +1 -0
- package/dist/beta/gemini_tts.test.d.cts +2 -0
- package/dist/beta/gemini_tts.test.d.ts +2 -0
- package/dist/beta/gemini_tts.test.d.ts.map +1 -0
- package/dist/beta/gemini_tts.test.js +8 -0
- package/dist/beta/gemini_tts.test.js.map +1 -0
- package/dist/beta/index.cjs +42 -0
- package/dist/beta/index.cjs.map +1 -0
- package/dist/beta/index.d.cts +3 -0
- package/dist/beta/index.d.ts +3 -0
- package/dist/beta/index.d.ts.map +1 -0
- package/dist/beta/index.js +7 -0
- package/dist/beta/index.js.map +1 -0
- package/dist/beta/realtime/api_proto.cjs +17 -0
- package/dist/beta/realtime/api_proto.cjs.map +1 -0
- package/dist/beta/realtime/api_proto.d.cts +26 -0
- package/dist/beta/realtime/api_proto.d.ts +26 -0
- package/dist/beta/realtime/api_proto.d.ts.map +1 -0
- package/dist/beta/realtime/api_proto.js +1 -0
- package/dist/beta/realtime/api_proto.js.map +1 -0
- package/dist/beta/realtime/index.cjs +29 -0
- package/dist/beta/realtime/index.cjs.map +1 -0
- package/dist/beta/realtime/index.d.cts +3 -0
- package/dist/beta/realtime/index.d.ts +3 -0
- package/dist/beta/realtime/index.d.ts.map +1 -0
- package/dist/beta/realtime/index.js +5 -0
- package/dist/beta/realtime/index.js.map +1 -0
- package/dist/beta/realtime/realtime_api.cjs +993 -0
- package/dist/beta/realtime/realtime_api.cjs.map +1 -0
- package/dist/beta/realtime/realtime_api.d.cts +267 -0
- package/dist/beta/realtime/realtime_api.d.ts +267 -0
- package/dist/beta/realtime/realtime_api.d.ts.map +1 -0
- package/dist/beta/realtime/realtime_api.js +974 -0
- package/dist/beta/realtime/realtime_api.js.map +1 -0
- package/dist/index.cjs +58 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/llm.cjs +381 -0
- package/dist/llm.cjs.map +1 -0
- package/dist/llm.d.cts +82 -0
- package/dist/llm.d.ts +82 -0
- package/dist/llm.d.ts.map +1 -0
- package/dist/llm.js +362 -0
- package/dist/llm.js.map +1 -0
- package/dist/llm.test.cjs +8 -0
- package/dist/llm.test.cjs.map +1 -0
- package/dist/llm.test.d.cts +2 -0
- package/dist/llm.test.d.ts +2 -0
- package/dist/llm.test.d.ts.map +1 -0
- package/dist/llm.test.js +7 -0
- package/dist/llm.test.js.map +1 -0
- package/dist/models.cjs +17 -0
- package/dist/models.cjs.map +1 -0
- package/dist/models.d.cts +5 -0
- package/dist/models.d.ts +5 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +1 -0
- package/dist/models.js.map +1 -0
- package/dist/tools.cjs +17 -0
- package/dist/tools.cjs.map +1 -0
- package/dist/tools.d.cts +3 -0
- package/dist/tools.d.ts +3 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +1 -0
- package/dist/tools.js.map +1 -0
- package/dist/utils.cjs +137 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +14 -0
- package/dist/utils.d.ts +14 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +112 -0
- package/dist/utils.js.map +1 -0
- package/package.json +56 -0
- package/src/beta/gemini_tts.test.ts +11 -0
- package/src/beta/gemini_tts.ts +309 -0
- package/src/beta/index.ts +6 -0
- package/src/beta/realtime/api_proto.ts +41 -0
- package/src/beta/realtime/index.ts +5 -0
- package/src/beta/realtime/realtime_api.ts +1440 -0
- package/src/index.ts +20 -0
- package/src/llm.test.ts +10 -0
- package/src/llm.ts +463 -0
- package/src/models.ts +100 -0
- package/src/tools.ts +6 -0
- package/src/utils.ts +157 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { GoogleGenAI } from "@google/genai";
|
|
2
|
+
import {
|
|
3
|
+
APIConnectionError,
|
|
4
|
+
APIStatusError,
|
|
5
|
+
AudioByteStream,
|
|
6
|
+
isAPIError,
|
|
7
|
+
shortuuid,
|
|
8
|
+
tts
|
|
9
|
+
} from "@livekit/agents";
|
|
10
|
+
const DEFAULT_MODEL = "gemini-2.5-flash-preview-tts";
|
|
11
|
+
const DEFAULT_VOICE = "Kore";
|
|
12
|
+
const DEFAULT_SAMPLE_RATE = 24e3;
|
|
13
|
+
const NUM_CHANNELS = 1;
|
|
14
|
+
const DEFAULT_INSTRUCTIONS = "Say the text with a proper tone, don't omit or add any words";
|
|
15
|
+
class TTS extends tts.TTS {
|
|
16
|
+
#opts;
|
|
17
|
+
#client;
|
|
18
|
+
label = "google.gemini.TTS";
|
|
19
|
+
/**
|
|
20
|
+
* Create a new instance of Gemini TTS.
|
|
21
|
+
*
|
|
22
|
+
* Environment Requirements:
|
|
23
|
+
* - For VertexAI: Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of the service account key file.
|
|
24
|
+
* - For Google Gemini API: Set the `apiKey` argument or the `GOOGLE_API_KEY` environment variable.
|
|
25
|
+
*
|
|
26
|
+
* @param opts - Configuration options for Gemini TTS
|
|
27
|
+
*/
|
|
28
|
+
constructor({
|
|
29
|
+
model = DEFAULT_MODEL,
|
|
30
|
+
voiceName = DEFAULT_VOICE,
|
|
31
|
+
apiKey,
|
|
32
|
+
vertexai,
|
|
33
|
+
project,
|
|
34
|
+
location,
|
|
35
|
+
instructions
|
|
36
|
+
} = {}) {
|
|
37
|
+
super(DEFAULT_SAMPLE_RATE, NUM_CHANNELS, { streaming: false });
|
|
38
|
+
const gcpProject = project || process.env.GOOGLE_CLOUD_PROJECT;
|
|
39
|
+
const gcpLocation = location || process.env.GOOGLE_CLOUD_LOCATION || "us-central1";
|
|
40
|
+
const useVertexai = vertexai ?? process.env.GOOGLE_GENAI_USE_VERTEXAI === "true";
|
|
41
|
+
const geminiApiKey = apiKey || process.env.GOOGLE_API_KEY;
|
|
42
|
+
let finalProject = gcpProject;
|
|
43
|
+
let finalLocation = gcpLocation;
|
|
44
|
+
let finalApiKey = geminiApiKey;
|
|
45
|
+
if (useVertexai) {
|
|
46
|
+
if (!finalProject) {
|
|
47
|
+
throw new APIConnectionError({
|
|
48
|
+
message: "Project ID is required for Vertex AI. Set via project option or GOOGLE_CLOUD_PROJECT environment variable"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
finalApiKey = void 0;
|
|
52
|
+
} else {
|
|
53
|
+
finalProject = void 0;
|
|
54
|
+
finalLocation = void 0;
|
|
55
|
+
if (!finalApiKey) {
|
|
56
|
+
throw new APIConnectionError({
|
|
57
|
+
message: "API key is required for Google API either via apiKey or GOOGLE_API_KEY environment variable"
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
this.#opts = {
|
|
62
|
+
model,
|
|
63
|
+
voiceName,
|
|
64
|
+
vertexai: useVertexai,
|
|
65
|
+
project: finalProject,
|
|
66
|
+
location: finalLocation,
|
|
67
|
+
instructions: instructions ?? DEFAULT_INSTRUCTIONS
|
|
68
|
+
};
|
|
69
|
+
const clientOptions = useVertexai ? {
|
|
70
|
+
vertexai: true,
|
|
71
|
+
project: finalProject,
|
|
72
|
+
location: finalLocation
|
|
73
|
+
} : {
|
|
74
|
+
apiKey: finalApiKey
|
|
75
|
+
};
|
|
76
|
+
this.#client = new GoogleGenAI(clientOptions);
|
|
77
|
+
}
|
|
78
|
+
synthesize(text) {
|
|
79
|
+
return new ChunkedStream(text, this);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Update the TTS options.
|
|
83
|
+
*
|
|
84
|
+
* @param opts - Options to update
|
|
85
|
+
*/
|
|
86
|
+
updateOptions(opts) {
|
|
87
|
+
if (opts.voiceName !== void 0) {
|
|
88
|
+
this.#opts.voiceName = opts.voiceName;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
stream() {
|
|
92
|
+
throw new Error("Streaming is not supported on Gemini TTS");
|
|
93
|
+
}
|
|
94
|
+
get opts() {
|
|
95
|
+
return this.#opts;
|
|
96
|
+
}
|
|
97
|
+
get client() {
|
|
98
|
+
return this.#client;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
class ChunkedStream extends tts.ChunkedStream {
|
|
102
|
+
#tts;
|
|
103
|
+
label = "google.gemini.ChunkedStream";
|
|
104
|
+
constructor(inputText, tts2) {
|
|
105
|
+
super(inputText, tts2);
|
|
106
|
+
this.#tts = tts2;
|
|
107
|
+
}
|
|
108
|
+
async run() {
|
|
109
|
+
const requestId = shortuuid();
|
|
110
|
+
const bstream = new AudioByteStream(this.#tts.sampleRate, this.#tts.numChannels);
|
|
111
|
+
const config = {
|
|
112
|
+
responseModalities: ["AUDIO"],
|
|
113
|
+
speechConfig: {
|
|
114
|
+
voiceConfig: {
|
|
115
|
+
prebuiltVoiceConfig: {
|
|
116
|
+
voiceName: this.#tts.opts.voiceName
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
let inputText = this.inputText;
|
|
122
|
+
if (this.#tts.opts.instructions) {
|
|
123
|
+
inputText = `${this.#tts.opts.instructions}:
|
|
124
|
+
"${inputText}"`;
|
|
125
|
+
}
|
|
126
|
+
const contents = [
|
|
127
|
+
{
|
|
128
|
+
role: "user",
|
|
129
|
+
parts: [{ text: inputText }]
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
const responseStream = await this.#tts.client.models.generateContentStream({
|
|
133
|
+
model: this.#tts.opts.model,
|
|
134
|
+
contents,
|
|
135
|
+
config
|
|
136
|
+
});
|
|
137
|
+
try {
|
|
138
|
+
for await (const response of responseStream) {
|
|
139
|
+
await this.#processResponse(response, bstream, requestId);
|
|
140
|
+
}
|
|
141
|
+
} catch (error) {
|
|
142
|
+
if (isAPIError(error)) throw error;
|
|
143
|
+
const err = error;
|
|
144
|
+
if (err.code && err.code >= 400 && err.code < 500) {
|
|
145
|
+
if (err.code === 429) {
|
|
146
|
+
throw new APIStatusError({
|
|
147
|
+
message: `Gemini TTS: Rate limit error - ${err.message || "Unknown error"}`,
|
|
148
|
+
options: {
|
|
149
|
+
statusCode: 429,
|
|
150
|
+
retryable: true
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
} else {
|
|
154
|
+
throw new APIStatusError({
|
|
155
|
+
message: `Gemini TTS: Client error (${err.code}) - ${err.message || "Unknown error"}`,
|
|
156
|
+
options: {
|
|
157
|
+
statusCode: err.code,
|
|
158
|
+
retryable: false
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
if (err.code && err.code >= 500) {
|
|
164
|
+
throw new APIStatusError({
|
|
165
|
+
message: `Gemini TTS: Server error (${err.code}) - ${err.message || "Unknown error"}`,
|
|
166
|
+
options: {
|
|
167
|
+
statusCode: err.code,
|
|
168
|
+
retryable: true
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
throw new APIConnectionError({
|
|
173
|
+
message: `Gemini TTS: Connection error - ${err.message || "Unknown error"}`,
|
|
174
|
+
options: { retryable: true }
|
|
175
|
+
});
|
|
176
|
+
} finally {
|
|
177
|
+
this.queue.close();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async #processResponse(response, bstream, requestId) {
|
|
181
|
+
var _a, _b, _c;
|
|
182
|
+
if (!response.candidates || response.candidates.length === 0) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const candidate = response.candidates[0];
|
|
186
|
+
if (!candidate || !((_a = candidate.content) == null ? void 0 : _a.parts)) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
let lastFrame;
|
|
190
|
+
const sendLastFrame = (final) => {
|
|
191
|
+
if (lastFrame) {
|
|
192
|
+
this.queue.put({
|
|
193
|
+
requestId,
|
|
194
|
+
frame: lastFrame,
|
|
195
|
+
segmentId: requestId,
|
|
196
|
+
final
|
|
197
|
+
});
|
|
198
|
+
lastFrame = void 0;
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
for (const part of candidate.content.parts) {
|
|
202
|
+
if (((_b = part.inlineData) == null ? void 0 : _b.data) && ((_c = part.inlineData.mimeType) == null ? void 0 : _c.startsWith("audio/"))) {
|
|
203
|
+
const audioBuffer = Buffer.from(part.inlineData.data, "base64");
|
|
204
|
+
for (const frame of bstream.write(audioBuffer)) {
|
|
205
|
+
sendLastFrame(false);
|
|
206
|
+
lastFrame = frame;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
for (const frame of bstream.flush()) {
|
|
211
|
+
sendLastFrame(false);
|
|
212
|
+
lastFrame = frame;
|
|
213
|
+
}
|
|
214
|
+
sendLastFrame(true);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
export {
|
|
218
|
+
ChunkedStream,
|
|
219
|
+
TTS
|
|
220
|
+
};
|
|
221
|
+
//# sourceMappingURL=gemini_tts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/beta/gemini_tts.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type * as types from '@google/genai';\nimport { GoogleGenAI } from '@google/genai';\nimport {\n APIConnectionError,\n APIStatusError,\n AudioByteStream,\n isAPIError,\n shortuuid,\n tts,\n} from '@livekit/agents';\nimport type { AudioFrame } from '@livekit/rtc-node';\n\nexport type GeminiTTSModels = 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts';\n\nexport type GeminiVoices =\n | 'Zephyr'\n | 'Puck'\n | 'Charon'\n | 'Kore'\n | 'Fenrir'\n | 'Leda'\n | 'Orus'\n | 'Aoede'\n | 'Callirrhoe'\n | 'Autonoe'\n | 'Enceladus'\n | 'Iapetus'\n | 'Umbriel'\n | 'Algieba'\n | 'Despina'\n | 'Erinome'\n | 'Algenib'\n | 'Rasalgethi'\n | 'Laomedeia'\n | 'Achernar'\n | 'Alnilam'\n | 'Schedar'\n | 'Gacrux'\n | 'Pulcherrima'\n | 'Achird'\n | 'Zubenelgenubi'\n | 'Vindemiatrix'\n | 'Sadachbia'\n | 'Sadaltager'\n | 'Sulafat';\n\nconst DEFAULT_MODEL: GeminiTTSModels = 'gemini-2.5-flash-preview-tts';\nconst DEFAULT_VOICE: GeminiVoices = 'Kore';\nconst DEFAULT_SAMPLE_RATE = 24000; // not configurable\nconst NUM_CHANNELS = 1;\nconst DEFAULT_INSTRUCTIONS = \"Say the text with a proper tone, don't omit or add any words\";\n\nexport interface TTSOptions {\n model: GeminiTTSModels | string;\n voiceName: GeminiVoices | string;\n vertexai: boolean;\n project?: string;\n location?: string;\n instructions?: string;\n}\n\nexport class TTS extends tts.TTS {\n #opts: TTSOptions;\n #client: GoogleGenAI;\n label = 'google.gemini.TTS';\n\n /**\n * Create a new instance of Gemini TTS.\n *\n * Environment Requirements:\n * - For VertexAI: Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of the service account key file.\n * - For Google Gemini API: Set the `apiKey` argument or the `GOOGLE_API_KEY` environment variable.\n *\n * @param opts - Configuration options for Gemini TTS\n */\n constructor({\n model = DEFAULT_MODEL,\n voiceName = DEFAULT_VOICE,\n apiKey,\n vertexai,\n project,\n location,\n instructions,\n }: Partial<TTSOptions & { apiKey: string }> = {}) {\n super(DEFAULT_SAMPLE_RATE, NUM_CHANNELS, { streaming: false });\n\n const gcpProject: string | undefined = project || process.env.GOOGLE_CLOUD_PROJECT;\n const gcpLocation: string | undefined =\n location || process.env.GOOGLE_CLOUD_LOCATION || 'us-central1';\n const useVertexai = vertexai ?? process.env.GOOGLE_GENAI_USE_VERTEXAI === 'true';\n const geminiApiKey = apiKey || process.env.GOOGLE_API_KEY;\n\n let finalProject: string | undefined = gcpProject;\n let finalLocation: string | undefined = gcpLocation;\n let finalApiKey: string | undefined = geminiApiKey;\n\n if (useVertexai) {\n if (!finalProject) {\n throw new APIConnectionError({\n message:\n 'Project ID is required for Vertex AI. Set via project option or GOOGLE_CLOUD_PROJECT environment variable',\n });\n }\n finalApiKey = undefined;\n } else {\n finalProject = undefined;\n finalLocation = undefined;\n if (!finalApiKey) {\n throw new APIConnectionError({\n message:\n 'API key is required for Google API either via apiKey or GOOGLE_API_KEY environment variable',\n });\n }\n }\n\n this.#opts = {\n model,\n voiceName,\n vertexai: useVertexai,\n project: finalProject,\n location: finalLocation,\n instructions: instructions ?? DEFAULT_INSTRUCTIONS,\n };\n\n const clientOptions: types.GoogleGenAIOptions = useVertexai\n ? {\n vertexai: true,\n project: finalProject,\n location: finalLocation,\n }\n : {\n apiKey: finalApiKey,\n };\n\n this.#client = new GoogleGenAI(clientOptions);\n }\n\n synthesize(text: string): ChunkedStream {\n return new ChunkedStream(text, this);\n }\n\n /**\n * Update the TTS options.\n *\n * @param opts - Options to update\n */\n updateOptions(opts: { voiceName?: GeminiVoices | string }) {\n if (opts.voiceName !== undefined) {\n this.#opts.voiceName = opts.voiceName;\n }\n }\n\n stream(): tts.SynthesizeStream {\n throw new Error('Streaming is not supported on Gemini TTS');\n }\n\n get opts(): TTSOptions {\n return this.#opts;\n }\n\n get client(): GoogleGenAI {\n return this.#client;\n }\n}\n\nexport class ChunkedStream extends tts.ChunkedStream {\n #tts: TTS;\n label = 'google.gemini.ChunkedStream';\n\n constructor(inputText: string, tts: TTS) {\n super(inputText, tts);\n this.#tts = tts;\n }\n\n protected async run() {\n const requestId = shortuuid();\n const bstream = new AudioByteStream(this.#tts.sampleRate, this.#tts.numChannels);\n\n const config: types.GenerateContentConfig = {\n responseModalities: ['AUDIO'],\n speechConfig: {\n voiceConfig: {\n prebuiltVoiceConfig: {\n voiceName: this.#tts.opts.voiceName,\n },\n },\n },\n };\n\n let inputText = this.inputText;\n if (this.#tts.opts.instructions) {\n inputText = `${this.#tts.opts.instructions}:\\n\"${inputText}\"`;\n }\n\n const contents: types.Content[] = [\n {\n role: 'user',\n parts: [{ text: inputText }],\n },\n ];\n\n const responseStream = await this.#tts.client.models.generateContentStream({\n model: this.#tts.opts.model,\n contents,\n config,\n });\n\n try {\n for await (const response of responseStream) {\n await this.#processResponse(response, bstream, requestId);\n }\n } catch (error: unknown) {\n if (isAPIError(error)) throw error;\n\n const err = error as {\n code?: number;\n message?: string;\n status?: string;\n type?: string;\n };\n\n if (err.code && err.code >= 400 && err.code < 500) {\n if (err.code === 429) {\n throw new APIStatusError({\n message: `Gemini TTS: Rate limit error - ${err.message || 'Unknown error'}`,\n options: {\n statusCode: 429,\n retryable: true,\n },\n });\n } else {\n throw new APIStatusError({\n message: `Gemini TTS: Client error (${err.code}) - ${err.message || 'Unknown error'}`,\n options: {\n statusCode: err.code,\n retryable: false,\n },\n });\n }\n }\n\n if (err.code && err.code >= 500) {\n throw new APIStatusError({\n message: `Gemini TTS: Server error (${err.code}) - ${err.message || 'Unknown error'}`,\n options: {\n statusCode: err.code,\n retryable: true,\n },\n });\n }\n\n throw new APIConnectionError({\n message: `Gemini TTS: Connection error - ${err.message || 'Unknown error'}`,\n options: { retryable: true },\n });\n } finally {\n this.queue.close();\n }\n }\n\n async #processResponse(\n response: types.GenerateContentResponse,\n bstream: AudioByteStream,\n requestId: string,\n ) {\n if (!response.candidates || response.candidates.length === 0) {\n return;\n }\n\n const candidate = response.candidates[0];\n if (!candidate || !candidate.content?.parts) {\n return;\n }\n\n let lastFrame: AudioFrame | undefined;\n const sendLastFrame = (final: boolean) => {\n if (lastFrame) {\n this.queue.put({\n requestId,\n frame: lastFrame,\n segmentId: requestId,\n final,\n });\n lastFrame = undefined;\n }\n };\n\n for (const part of candidate.content.parts) {\n if (part.inlineData?.data && part.inlineData.mimeType?.startsWith('audio/')) {\n const audioBuffer = Buffer.from(part.inlineData.data, 'base64');\n\n for (const frame of bstream.write(audioBuffer)) {\n sendLastFrame(false);\n lastFrame = frame;\n }\n }\n }\n\n for (const frame of bstream.flush()) {\n sendLastFrame(false);\n lastFrame = frame;\n }\n\n sendLastFrame(true);\n }\n}\n"],"mappings":"AAIA,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAqCP,MAAM,gBAAiC;AACvC,MAAM,gBAA8B;AACpC,MAAM,sBAAsB;AAC5B,MAAM,eAAe;AACrB,MAAM,uBAAuB;AAWtB,MAAM,YAAY,IAAI,IAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWR,YAAY;AAAA,IACV,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAA8C,CAAC,GAAG;AAChD,UAAM,qBAAqB,cAAc,EAAE,WAAW,MAAM,CAAC;AAE7D,UAAM,aAAiC,WAAW,QAAQ,IAAI;AAC9D,UAAM,cACJ,YAAY,QAAQ,IAAI,yBAAyB;AACnD,UAAM,cAAc,YAAY,QAAQ,IAAI,8BAA8B;AAC1E,UAAM,eAAe,UAAU,QAAQ,IAAI;AAE3C,QAAI,eAAmC;AACvC,QAAI,gBAAoC;AACxC,QAAI,cAAkC;AAEtC,QAAI,aAAa;AACf,UAAI,CAAC,cAAc;AACjB,cAAM,IAAI,mBAAmB;AAAA,UAC3B,SACE;AAAA,QACJ,CAAC;AAAA,MACH;AACA,oBAAc;AAAA,IACh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plugins_test = require("@livekit/agents-plugins-test");
|
|
4
|
+
var import_vitest = require("vitest");
|
|
5
|
+
var import_gemini_tts = require("./gemini_tts.cjs");
|
|
6
|
+
(0, import_vitest.describe)("Google Gemini TTS", async () => {
|
|
7
|
+
await (0, import_agents_plugins_test.tts)(new import_gemini_tts.TTS(), new import_agents_plugin_openai.STT(), { nonStreaming: true, streaming: false });
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=gemini_tts.test.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/beta/gemini_tts.test.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { STT } from '@livekit/agents-plugin-openai';\nimport { tts } from '@livekit/agents-plugins-test';\nimport { describe } from 'vitest';\nimport { TTS } from './gemini_tts.js';\n\ndescribe('Google Gemini TTS', async () => {\n await tts(new TTS(), new STT(), { nonStreaming: true, streaming: false });\n});\n"],"mappings":";AAGA,kCAAoB;AACpB,iCAAoB;AACpB,oBAAyB;AACzB,wBAAoB;AAAA,IAEpB,wBAAS,qBAAqB,YAAY;AACxC,YAAM,gCAAI,IAAI,sBAAI,GAAG,IAAI,gCAAI,GAAG,EAAE,cAAc,MAAM,WAAW,MAAM,CAAC;AAC1E,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini_tts.test.d.ts","sourceRoot":"","sources":["../../src/beta/gemini_tts.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { STT } from "@livekit/agents-plugin-openai";
|
|
2
|
+
import { tts } from "@livekit/agents-plugins-test";
|
|
3
|
+
import { describe } from "vitest";
|
|
4
|
+
import { TTS } from "./gemini_tts.js";
|
|
5
|
+
describe("Google Gemini TTS", async () => {
|
|
6
|
+
await tts(new TTS(), new STT(), { nonStreaming: true, streaming: false });
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=gemini_tts.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/beta/gemini_tts.test.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport { STT } from '@livekit/agents-plugin-openai';\nimport { tts } from '@livekit/agents-plugins-test';\nimport { describe } from 'vitest';\nimport { TTS } from './gemini_tts.js';\n\ndescribe('Google Gemini TTS', async () => {\n await tts(new TTS(), new STT(), { nonStreaming: true, streaming: false });\n});\n"],"mappings":"AAGA,SAAS,WAAW;AACpB,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,WAAW;AAEpB,SAAS,qBAAqB,YAAY;AACxC,QAAM,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,EAAE,cAAc,MAAM,WAAW,MAAM,CAAC;AAC1E,CAAC;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var beta_exports = {};
|
|
30
|
+
__export(beta_exports, {
|
|
31
|
+
TTS: () => import_gemini_tts.TTS,
|
|
32
|
+
realtime: () => realtime
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(beta_exports);
|
|
35
|
+
var import_gemini_tts = require("./gemini_tts.cjs");
|
|
36
|
+
var realtime = __toESM(require("./realtime/index.cjs"), 1);
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
TTS,
|
|
40
|
+
realtime
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/beta/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport { TTS, type GeminiTTSModels, type GeminiVoices, type TTSOptions } from './gemini_tts.js';\nexport * as realtime from './realtime/index.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAA8E;AAC9E,eAA0B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/beta/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/beta/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\n\nexport { TTS, type GeminiTTSModels, type GeminiVoices, type TTSOptions } from './gemini_tts.js';\nexport * as realtime from './realtime/index.js';\n"],"mappings":"AAIA,SAAS,WAAqE;AAC9E,YAAY,cAAc;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var api_proto_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(api_proto_exports);
|
|
17
|
+
//# sourceMappingURL=api_proto.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/beta/realtime/api_proto.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nimport type * as types from '@google/genai';\n\n/**\n * Supported Google Live API models\n */\nexport type LiveAPIModels =\n | 'gemini-2.0-flash-exp'\n // models supported on Gemini API\n | 'gemini-2.0-flash-live-001'\n | 'gemini-2.5-flash-preview-native-audio-dialog'\n | 'gemini-2.5-flash-exp-native-audio-thinking-dialog';\n\n/**\n * Available voice options for Google Realtime API\n */\nexport type Voice = 'Puck' | 'Charon' | 'Kore' | 'Fenrir' | 'Aoede' | 'Leda' | 'Orus' | 'Zephyr';\n\n/**\n * Union type for all possible client events\n */\n\nexport type ClientEvents =\n | {\n type: 'content';\n value: types.LiveClientContent;\n }\n | {\n type: 'realtime_input';\n value: types.LiveClientRealtimeInput;\n }\n | {\n type: 'tool_response';\n value: types.LiveClientToolResponse;\n }\n | {\n type: 'function_response';\n value: types.FunctionResponse;\n };\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as types from '@google/genai';
|
|
2
|
+
/**
|
|
3
|
+
* Supported Google Live API models
|
|
4
|
+
*/
|
|
5
|
+
export type LiveAPIModels = 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-live-001' | 'gemini-2.5-flash-preview-native-audio-dialog' | 'gemini-2.5-flash-exp-native-audio-thinking-dialog';
|
|
6
|
+
/**
|
|
7
|
+
* Available voice options for Google Realtime API
|
|
8
|
+
*/
|
|
9
|
+
export type Voice = 'Puck' | 'Charon' | 'Kore' | 'Fenrir' | 'Aoede' | 'Leda' | 'Orus' | 'Zephyr';
|
|
10
|
+
/**
|
|
11
|
+
* Union type for all possible client events
|
|
12
|
+
*/
|
|
13
|
+
export type ClientEvents = {
|
|
14
|
+
type: 'content';
|
|
15
|
+
value: types.LiveClientContent;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'realtime_input';
|
|
18
|
+
value: types.LiveClientRealtimeInput;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'tool_response';
|
|
21
|
+
value: types.LiveClientToolResponse;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'function_response';
|
|
24
|
+
value: types.FunctionResponse;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=api_proto.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as types from '@google/genai';
|
|
2
|
+
/**
|
|
3
|
+
* Supported Google Live API models
|
|
4
|
+
*/
|
|
5
|
+
export type LiveAPIModels = 'gemini-2.0-flash-exp' | 'gemini-2.0-flash-live-001' | 'gemini-2.5-flash-preview-native-audio-dialog' | 'gemini-2.5-flash-exp-native-audio-thinking-dialog';
|
|
6
|
+
/**
|
|
7
|
+
* Available voice options for Google Realtime API
|
|
8
|
+
*/
|
|
9
|
+
export type Voice = 'Puck' | 'Charon' | 'Kore' | 'Fenrir' | 'Aoede' | 'Leda' | 'Orus' | 'Zephyr';
|
|
10
|
+
/**
|
|
11
|
+
* Union type for all possible client events
|
|
12
|
+
*/
|
|
13
|
+
export type ClientEvents = {
|
|
14
|
+
type: 'content';
|
|
15
|
+
value: types.LiveClientContent;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'realtime_input';
|
|
18
|
+
value: types.LiveClientRealtimeInput;
|
|
19
|
+
} | {
|
|
20
|
+
type: 'tool_response';
|
|
21
|
+
value: types.LiveClientToolResponse;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'function_response';
|
|
24
|
+
value: types.FunctionResponse;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=api_proto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_proto.d.ts","sourceRoot":"","sources":["../../../src/beta/realtime/api_proto.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,KAAK,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,sBAAsB,GAEtB,2BAA2B,GAC3B,8CAA8C,GAC9C,mDAAmD,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjG;;GAEG;AAEH,MAAM,MAAM,YAAY,GACpB;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC;CAChC,GACD;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,uBAAuB,CAAC;CACtC,GACD;IACE,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC,sBAAsB,CAAC;CACrC,GACD;IACE,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=api_proto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var realtime_exports = {};
|
|
20
|
+
__export(realtime_exports, {
|
|
21
|
+
RealtimeModel: () => import_realtime_api.RealtimeModel
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(realtime_exports);
|
|
24
|
+
var import_realtime_api = require("./realtime_api.cjs");
|
|
25
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
26
|
+
0 && (module.exports = {
|
|
27
|
+
RealtimeModel
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/beta/realtime/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nexport type { ClientEvents, LiveAPIModels, Voice } from './api_proto.js';\nexport { RealtimeModel } from './realtime_api.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,0BAA8B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/beta/realtime/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/beta/realtime/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: 2025 LiveKit, Inc.\n//\n// SPDX-License-Identifier: Apache-2.0\nexport type { ClientEvents, LiveAPIModels, Voice } from './api_proto.js';\nexport { RealtimeModel } from './realtime_api.js';\n"],"mappings":"AAIA,SAAS,qBAAqB;","names":[]}
|