GeminiLiveVoice: Tool calls work but args always empty - Expected behavior?
Hi Mastra team!
I'm having trouble getting tool arguments to populate in GeminiLiveVoice. Tools are called but args are always empty. Am I missing some configuration?
Current Setup:
// Agent setupconst agent = new Agent({ tools: { getWeather }, voice: new GeminiLiveVoice({ vertexAI: true, model: 'gemini-2.0-flash-live-preview-04-09', // ... other config })});// Tool registrationvoice.addTools(agent.tools); // Is this the correct way?
// Agent setupconst agent = new Agent({ tools: { getWeather }, voice: new GeminiLiveVoice({ vertexAI: true, model: 'gemini-2.0-flash-live-preview-04-09', // ... other config })});// Tool registrationvoice.addTools(agent.tools); // Is this the correct way?
Tool definition:
getWeather: { description: "Get weather information for a specific location", parameters: z.object({ location: z.string().describe("Location to get weather for") }), execute: async ({ location }) => { return await fetchWeather(location); }}
getWeather: { description: "Get weather information for a specific location", parameters: z.object({ location: z.string().describe("Location to get weather for") }), execute: async ({ location }) => { return await fetchWeather(location); }}
What happens:
Tools register successfully:
[GeminiLiveVoice] Tools added { toolCount: 3 }
[GeminiLiveVoice] Tools added { toolCount: 3 }
Tools get called when user says "ๆฑไบฌใฎๅคฉๆฐใๆใใฆ":
the correct setup? 2. Do I need additional configuration for argument extraction from speech? 3. Are there specific sessionConfig settings required for tool arguments? 4. Should I handle speech โ arguments mapping manually?
Using
gemini-2.0-flash-live-preview-04-09
gemini-2.0-flash-live-preview-04-09
with latest Mastra. Any insights would be super helpful!