@mastra/voice-google-gemini-live 0.14.8 → 0.14.9-alpha.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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-voice-overview.md +25 -0
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-voice-google-gemini-live
|
|
|
3
3
|
description: Documentation for @mastra/voice-google-gemini-live. Use when working with @mastra/voice-google-gemini-live APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/voice-google-gemini-live"
|
|
6
|
-
version: "0.14.
|
|
6
|
+
version: "0.14.9-alpha.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
|
@@ -882,6 +882,18 @@ const voice = new DeepgramVoice({
|
|
|
882
882
|
|
|
883
883
|
Visit the [Deepgram Voice Reference](https://mastra.ai/integrations/voice/deepgram) for more information on the Deepgram voice provider.
|
|
884
884
|
|
|
885
|
+
**Gladia**:
|
|
886
|
+
|
|
887
|
+
```typescript
|
|
888
|
+
const voice = new GladiaVoice({
|
|
889
|
+
listeningModel: {
|
|
890
|
+
apiKey: process.env.GLADIA_API_KEY,
|
|
891
|
+
},
|
|
892
|
+
})
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
Visit the [Gladia Voice integration](https://mastra.ai/integrations/voice/gladia) for configuration and transcription options.
|
|
896
|
+
|
|
885
897
|
**Inworld**:
|
|
886
898
|
|
|
887
899
|
```typescript
|
|
@@ -965,6 +977,19 @@ const voice = new MurfVoice({
|
|
|
965
977
|
|
|
966
978
|
Visit the [Murf Voice Reference](https://mastra.ai/integrations/voice/murf) for more information on the Murf voice provider.
|
|
967
979
|
|
|
980
|
+
**ModelsLab**:
|
|
981
|
+
|
|
982
|
+
```typescript
|
|
983
|
+
const voice = new ModelsLabVoice({
|
|
984
|
+
speechModel: {
|
|
985
|
+
apiKey: process.env.MODELSLAB_API_KEY,
|
|
986
|
+
},
|
|
987
|
+
speaker: '5',
|
|
988
|
+
})
|
|
989
|
+
```
|
|
990
|
+
|
|
991
|
+
Visit the [ModelsLab Voice integration](https://mastra.ai/integrations/voice/modelslab) for configuration and synthesis options.
|
|
992
|
+
|
|
968
993
|
**OpenAI Realtime**:
|
|
969
994
|
|
|
970
995
|
```typescript
|
package/dist/index.cjs
CHANGED
|
@@ -1450,6 +1450,7 @@ var EventManager = class {
|
|
|
1450
1450
|
*/
|
|
1451
1451
|
const DEFAULT_MODEL = "gemini-3.1-flash-live-preview";
|
|
1452
1452
|
const DEFAULT_VOICE = "Puck";
|
|
1453
|
+
const MAX_TRACKED_TOOL_CALL_IDS = 512;
|
|
1453
1454
|
function isPlainObject(value) {
|
|
1454
1455
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
1455
1456
|
const proto = Object.getPrototypeOf(value);
|
|
@@ -1528,6 +1529,7 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
|
|
|
1528
1529
|
sessionDurationTimeout;
|
|
1529
1530
|
tools;
|
|
1530
1531
|
requestContext;
|
|
1532
|
+
processedToolCallIds = /* @__PURE__ */ new Set();
|
|
1531
1533
|
options;
|
|
1532
1534
|
pendingAssistantResponse = "";
|
|
1533
1535
|
/**
|
|
@@ -1748,6 +1750,7 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
|
|
|
1748
1750
|
this.log("Already connected to Gemini Live API");
|
|
1749
1751
|
return;
|
|
1750
1752
|
}
|
|
1753
|
+
this.processedToolCallIds.clear();
|
|
1751
1754
|
this.requestContext = requestContext;
|
|
1752
1755
|
this.emit("session", { state: "connecting" });
|
|
1753
1756
|
try {
|
|
@@ -2571,6 +2574,18 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
|
|
|
2571
2574
|
toolArgs,
|
|
2572
2575
|
toolId
|
|
2573
2576
|
});
|
|
2577
|
+
if (this.processedToolCallIds.has(toolId)) {
|
|
2578
|
+
this.log("Duplicate tool call ignored", {
|
|
2579
|
+
toolName,
|
|
2580
|
+
toolId
|
|
2581
|
+
});
|
|
2582
|
+
return;
|
|
2583
|
+
}
|
|
2584
|
+
this.processedToolCallIds.add(toolId);
|
|
2585
|
+
if (this.processedToolCallIds.size > MAX_TRACKED_TOOL_CALL_IDS) {
|
|
2586
|
+
const oldest = this.processedToolCallIds.values().next().value;
|
|
2587
|
+
if (oldest !== void 0) this.processedToolCallIds.delete(oldest);
|
|
2588
|
+
}
|
|
2574
2589
|
this.emit("toolCall", {
|
|
2575
2590
|
name: toolName,
|
|
2576
2591
|
args: toolArgs,
|