@mastra/voice-google-gemini-live 0.14.12 → 0.14.13-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.
@@ -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.12"
6
+ version: "0.14.13-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.14.12",
2
+ "version": "0.14.13-alpha.0",
3
3
  "package": "@mastra/voice-google-gemini-live",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let crypto = require("crypto");
3
2
  let stream = require("stream");
4
3
  let _mastra_schema_compat = require("@mastra/schema-compat");
5
4
  let ws = require("ws");
@@ -1776,7 +1775,7 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
1776
1775
  await this.connectionManager.waitForOpen();
1777
1776
  this.sendInitialConfig();
1778
1777
  this.sessionStartTime = Date.now();
1779
- this.sessionId = (0, crypto.randomUUID)();
1778
+ this.sessionId = globalThis.crypto.randomUUID();
1780
1779
  await this.waitForSessionCreated();
1781
1780
  this.state = "connected";
1782
1781
  this.emit("session", {
@@ -2501,7 +2500,7 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
2501
2500
  const toolCallData = { toolCall: {
2502
2501
  name: part.functionCall.name,
2503
2502
  args: part.functionCall.args || {},
2504
- id: part.functionCall.id || (0, crypto.randomUUID)()
2503
+ id: part.functionCall.id || globalThis.crypto.randomUUID()
2505
2504
  } };
2506
2505
  this.handleToolCall(toolCallData);
2507
2506
  continue;
@@ -2509,7 +2508,7 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
2509
2508
  if (part.inlineData?.mimeType?.includes("audio") && typeof part.inlineData.data === "string") try {
2510
2509
  const audioData = part.inlineData.data;
2511
2510
  const int16Array = this.audioStreamManager.base64ToInt16Array(audioData);
2512
- const responseId = this.getCurrentResponseId() || (0, crypto.randomUUID)();
2511
+ const responseId = this.getCurrentResponseId() || globalThis.crypto.randomUUID();
2513
2512
  let speakerStream = this.audioStreamManager.getSpeakerStream(responseId);
2514
2513
  if (!speakerStream) {
2515
2514
  this.audioStreamManager.cleanupStaleStreams();
@@ -2583,7 +2582,7 @@ var GeminiLiveVoice = class GeminiLiveVoice extends MastraVoice {
2583
2582
  for (const toolCall of toolCalls) {
2584
2583
  const toolName = toolCall.name || "";
2585
2584
  const toolArgs = toolCall.args || {};
2586
- const toolId = toolCall.id || (0, crypto.randomUUID)();
2585
+ const toolId = toolCall.id || globalThis.crypto.randomUUID();
2587
2586
  await this.processSingleToolCall(toolName, toolArgs, toolId);
2588
2587
  }
2589
2588
  }