@mastra/mcp-docs-server 1.2.15-alpha.19 → 1.2.15-alpha.21

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.
Files changed (279) hide show
  1. package/.docs/docs/agents/code-mode.md +1 -1
  2. package/.docs/docs/agents/networks.md +2 -2
  3. package/.docs/docs/agents/overview.md +2 -2
  4. package/.docs/docs/agents/using-tools.md +1 -1
  5. package/.docs/docs/browser/overview.md +8 -8
  6. package/.docs/docs/browser/recording.md +2 -2
  7. package/.docs/docs/capabilities/{channels/overview.md → channels.md} +70 -7
  8. package/.docs/docs/capabilities/subagents.md +2 -2
  9. package/.docs/docs/deployment/cloud-providers.md +9 -9
  10. package/.docs/docs/deployment/overview.md +9 -9
  11. package/.docs/docs/deployment/sandbox.md +3 -3
  12. package/.docs/docs/deployment/web-framework.md +6 -6
  13. package/.docs/docs/deployment/workflow-runners.md +2 -2
  14. package/.docs/docs/harness/agent-controller.md +2 -2
  15. package/.docs/docs/index.md +8 -8
  16. package/.docs/docs/long-running-agents/durable-agents.md +2 -2
  17. package/.docs/docs/long-running-agents/signal-providers.md +2 -15
  18. package/.docs/docs/long-running-agents/signals.md +1 -1
  19. package/.docs/docs/mastra-platform/database.md +2 -2
  20. package/.docs/docs/mastra-platform/deploy.md +27 -0
  21. package/.docs/docs/mastra-platform/server.md +1 -1
  22. package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
  23. package/.docs/docs/mcp/overview.md +42 -0
  24. package/.docs/docs/memory/memory-processors.md +5 -5
  25. package/.docs/docs/memory/message-history.md +1 -1
  26. package/.docs/docs/memory/observational-memory.md +1 -1
  27. package/.docs/docs/observability/integrations/exporters/mastra-storage.md +16 -16
  28. package/.docs/docs/observability/integrations/overview.md +3 -3
  29. package/.docs/docs/server/auth/fga.md +1 -1
  30. package/.docs/docs/server/auth/simple-auth.md +1 -1
  31. package/.docs/docs/server/auth.md +8 -8
  32. package/.docs/docs/server/custom-api-routes.md +35 -0
  33. package/.docs/docs/storage/overview.md +14 -13
  34. package/.docs/docs/studio/observability.md +1 -1
  35. package/.docs/docs/workflows/overview.md +1 -1
  36. package/.docs/docs/workflows/snapshots.md +11 -11
  37. package/.docs/docs/workflows/time-travel.md +2 -0
  38. package/.docs/docs/workspace/filesystem.md +15 -15
  39. package/.docs/docs/workspace/sandbox.md +17 -17
  40. package/.docs/docs/workspace/search.md +1 -1
  41. package/.docs/guides/agent-frameworks/ai-sdk.md +2 -2
  42. package/.docs/guides/deployment/mastra-workers.md +1 -1
  43. package/.docs/guides/getting-started/quickstart.md +3 -3
  44. package/.docs/guides/index.md +8 -8
  45. package/.docs/guides/voice/overview.md +55 -106
  46. package/.docs/guides/voice/speech-to-text.md +7 -7
  47. package/.docs/guides/voice/text-to-speech.md +9 -10
  48. package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +2 -2
  49. package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +256 -3
  50. package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
  51. package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
  52. package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
  53. package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
  54. package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
  55. package/.docs/integrations/channels/github.md +103 -0
  56. package/.docs/{docs/capabilities → integrations}/channels/imessage.md +7 -5
  57. package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
  58. package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
  59. package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
  60. package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
  61. package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
  62. package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
  63. package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
  64. package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
  65. package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
  66. package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
  67. package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
  68. package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
  69. package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
  70. package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
  71. package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
  72. package/.docs/integrations/databases/neon.md +220 -0
  73. package/.docs/{reference/storage → integrations/databases}/oracledb.md +1 -1
  74. package/.docs/{reference/storage → integrations/databases}/postgresql.md +1 -1
  75. package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
  76. package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
  77. package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
  78. package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +1 -1
  79. package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +1 -1
  80. package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +1 -1
  81. package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +1 -1
  82. package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +1 -1
  83. package/.docs/{guides/deployment → integrations/deploy}/netlify.md +1 -1
  84. package/.docs/{guides/deployment → integrations/deploy}/vercel.md +2 -2
  85. package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +5 -5
  86. package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +3 -3
  87. package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +2 -2
  88. package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +5 -5
  89. package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +1 -1
  90. package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +5 -5
  91. package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +1 -1
  92. package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +1 -1
  93. package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +2 -2
  94. package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +1 -1
  95. package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +1 -1
  96. package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +1 -1
  97. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
  98. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
  99. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
  100. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
  101. package/.docs/integrations/observability/datadog.md +538 -0
  102. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
  103. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
  104. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
  105. package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +276 -44
  106. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
  107. package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
  108. package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +1 -1
  109. package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +2 -2
  110. package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +1 -1
  111. package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +3 -3
  112. package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +2 -2
  113. package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +8 -0
  114. package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +141 -12
  115. package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
  116. package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
  117. package/.docs/{reference → integrations}/tools/tavily.md +1 -1
  118. package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
  119. package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
  120. package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
  121. package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
  122. package/.docs/{reference → integrations}/voice/livekit.md +437 -34
  123. package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
  124. package/.docs/integrations.md +147 -0
  125. package/.docs/models/embeddings.md +2 -2
  126. package/.docs/models/environment-variables.md +1 -0
  127. package/.docs/models/gateways/openrouter.md +4 -2
  128. package/.docs/models/gateways/vercel.md +2 -1
  129. package/.docs/models/index.md +1 -1
  130. package/.docs/models/providers/coralbricks.md +75 -0
  131. package/.docs/models/providers/evroc.md +2 -3
  132. package/.docs/models/providers/hyper.md +6 -6
  133. package/.docs/models/providers/kilo.md +7 -5
  134. package/.docs/models/providers/llmgateway.md +1 -2
  135. package/.docs/models/providers/nano-gpt.md +1 -3
  136. package/.docs/models/providers/opencode.md +0 -1
  137. package/.docs/models/providers/privatemode-ai.md +5 -4
  138. package/.docs/models/providers/snowflake-cortex.md +5 -1
  139. package/.docs/models/providers/wandb.md +2 -1
  140. package/.docs/models/providers/zenmux.md +0 -15
  141. package/.docs/models/providers.md +1 -0
  142. package/.docs/reference/agent-controller/agent-controller-class.md +32 -1
  143. package/.docs/reference/agents/channels.md +2 -2
  144. package/.docs/reference/agents/generateLegacy.md +2 -2
  145. package/.docs/reference/agents/getDefaultOptions.md +1 -1
  146. package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
  147. package/.docs/reference/agents/inngest-agent.md +1 -1
  148. package/.docs/reference/agents/network.md +1 -1
  149. package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
  150. package/.docs/reference/ai-sdk/network-route.md +1 -1
  151. package/.docs/reference/auth/auth0.md +1 -1
  152. package/.docs/reference/auth/better-auth.md +1 -1
  153. package/.docs/reference/auth/clerk.md +1 -1
  154. package/.docs/reference/auth/firebase.md +1 -1
  155. package/.docs/reference/auth/google.md +1 -1
  156. package/.docs/reference/auth/supabase.md +1 -1
  157. package/.docs/reference/auth/workos.md +1 -1
  158. package/.docs/reference/browser/agent-browser.md +1 -1
  159. package/.docs/reference/browser/browser-viewer.md +1 -1
  160. package/.docs/reference/browser/firecrawl-browser.md +1 -1
  161. package/.docs/reference/browser/stagehand-browser.md +1 -1
  162. package/.docs/reference/channels/channel-provider.md +1 -1
  163. package/.docs/reference/channels/slack-provider.md +2 -2
  164. package/.docs/reference/cli/mastra.md +2 -2
  165. package/.docs/reference/configuration.md +1 -26
  166. package/.docs/reference/core/getStorage.md +1 -1
  167. package/.docs/reference/core/getVector.md +2 -2
  168. package/.docs/reference/core/listVectors.md +2 -2
  169. package/.docs/reference/core/setStorage.md +1 -1
  170. package/.docs/reference/file-based-agents/storage.md +1 -1
  171. package/.docs/reference/file-based-agents/studio.md +1 -1
  172. package/.docs/reference/index.md +27 -55
  173. package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
  174. package/.docs/{guides → reference}/migrations/mastra-cloud.md +1 -1
  175. package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
  176. package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
  177. package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
  178. package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
  179. package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +10 -10
  180. package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
  181. package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
  182. package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
  183. package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
  184. package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
  185. package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -0
  186. package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
  187. package/.docs/reference/pubsub/lease-provider.md +1 -1
  188. package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
  189. package/.docs/reference/rag/database-config.md +1 -1
  190. package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
  191. package/.docs/{guides → reference}/rag/overview.md +2 -2
  192. package/.docs/{guides → reference}/rag/retrieval.md +1 -1
  193. package/.docs/{guides → reference}/rag/vector-databases.md +1 -1
  194. package/.docs/reference/server/create-route.md +27 -1
  195. package/.docs/reference/storage/composite.md +3 -3
  196. package/.docs/reference/storage/retention.md +4 -4
  197. package/.docs/reference/streaming/ChunkType.md +3 -3
  198. package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
  199. package/.docs/reference/tools/mcp-server.md +1 -1
  200. package/.docs/reference/vectors/convex.md +2 -2
  201. package/.docs/reference/vectors/oracledb.md +2 -2
  202. package/.docs/reference/workers/overview.md +8 -8
  203. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
  204. package/.docs/reference/workspace/platform-filesystem.md +2 -2
  205. package/.docs/reference/workspace/platform-sandbox.md +10 -2
  206. package/.docs/reference/workspace/process-manager.md +3 -3
  207. package/.docs/reference/workspace/sandbox.md +10 -0
  208. package/CHANGELOG.md +16 -0
  209. package/dist/index.js +1 -1
  210. package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
  211. package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
  212. package/dist/stdio.js +1 -1
  213. package/package.json +5 -5
  214. package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
  215. package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
  216. package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
  217. package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
  218. package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
  219. package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
  220. package/.docs/guides/guide/chef-michel.md +0 -211
  221. package/.docs/guides/guide/publishing-mcp-server.md +0 -137
  222. package/.docs/guides/guide/slack-assistant.md +0 -193
  223. package/.docs/guides/guide/stock-agent.md +0 -132
  224. package/.docs/guides/guide/web-search.md +0 -322
  225. package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
  226. package/.docs/guides/voice/realtime-voice.md +0 -430
  227. package/.docs/reference/voice/google.md +0 -290
  228. package/.docs/reference/voice/inworld.md +0 -137
  229. package/.docs/reference/voice/openai.md +0 -96
  230. package/.docs/reference/voice/playai.md +0 -82
  231. package/.docs/reference/workspace/vercel-serverless.md +0 -128
  232. /package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +0 -0
  233. /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
  234. /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +0 -0
  235. /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +0 -0
  236. /package/.docs/{docs/server → integrations}/auth/auth0.md +0 -0
  237. /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
  238. /package/.docs/{docs/server → integrations}/auth/clerk.md +0 -0
  239. /package/.docs/{docs/server → integrations}/auth/firebase.md +0 -0
  240. /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
  241. /package/.docs/{docs/server → integrations}/auth/okta.md +0 -0
  242. /package/.docs/{docs/server → integrations}/auth/supabase.md +0 -0
  243. /package/.docs/{docs/server → integrations}/auth/workos.md +0 -0
  244. /package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +0 -0
  245. /package/.docs/{guides/deployment → integrations/deploy}/inngest.md +0 -0
  246. /package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +0 -0
  247. /package/.docs/{guides/deployment → integrations/deploy}/temporal.md +0 -0
  248. /package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +0 -0
  249. /package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +0 -0
  250. /package/.docs/{guides/getting-started → integrations/frameworks}/express.md +0 -0
  251. /package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +0 -0
  252. /package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +0 -0
  253. /package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +0 -0
  254. /package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +0 -0
  255. /package/.docs/{guides/guide → integrations/tools}/firecrawl.md +0 -0
  256. /package/.docs/{reference → integrations}/voice/azure.md +0 -0
  257. /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
  258. /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
  259. /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
  260. /package/.docs/{reference → integrations}/voice/murf.md +0 -0
  261. /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
  262. /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
  263. /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
  264. /package/.docs/{guides/getting-started → reference}/manual-install.md +0 -0
  265. /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
  266. /package/.docs/{guides → reference}/migrations/network-to-supervisor.md +0 -0
  267. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
  268. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
  269. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
  270. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
  271. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
  272. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
  273. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
  274. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
  275. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
  276. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
  277. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
  278. /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
  279. /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
@@ -1,10 +1,285 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # Google Gemini Live voice
3
+ # Google
4
+
5
+ ## Speech
6
+
7
+ The Google Voice implementation in Mastra provides both text-to-speech (TTS) and speech-to-text (STT) capabilities using Google Cloud services. It supports multiple voices, languages, advanced audio configuration options, and both standard API key authentication and Vertex AI mode for enterprise deployments.
8
+
9
+ ### Usage example
10
+
11
+ ```typescript
12
+ import { GoogleVoice } from '@mastra/voice-google'
13
+
14
+ // Initialize with default configuration (uses GOOGLE_API_KEY environment variable)
15
+ const voice = new GoogleVoice()
16
+
17
+ // Text-to-Speech (plain text)
18
+ const audioStream = await voice.speak('Hello, world!', {
19
+ languageCode: 'en-US',
20
+ audioConfig: {
21
+ audioEncoding: 'LINEAR16',
22
+ },
23
+ })
24
+
25
+ // Text-to-Speech with SSML
26
+ const ssmlStream = await voice.speak('ignored', {
27
+ input: {
28
+ ssml: '<speak>Take <say-as interpret-as="unit">5 mg</say-as> daily.</speak>',
29
+ },
30
+ })
31
+
32
+ // Text-to-Speech with Gemini-TTS model
33
+ const geminiStream = await voice.speak('Hello from Gemini TTS!', {
34
+ voice: { name: 'Kore', modelName: 'gemini-2.5-flash-preview-tts' },
35
+ input: { prompt: 'Warm, calm tone.' },
36
+ })
37
+
38
+ // Speech-to-Text
39
+ const transcript = await voice.listen(audioStream, {
40
+ config: {
41
+ encoding: 'LINEAR16',
42
+ languageCode: 'en-US',
43
+ },
44
+ })
45
+
46
+ // Get available voices for a specific language
47
+ const voices = await voice.getSpeakers({ languageCode: 'en-US' })
48
+ ```
49
+
50
+ ### Constructor parameters
51
+
52
+ **speechModel** (`GoogleModelConfig`): Configuration for text-to-speech functionality (Default: `{ apiKey: process.env.GOOGLE_API_KEY }`)
53
+
54
+ **speechModel.apiKey** (`string`): Google Cloud API key. Falls back to GOOGLE\_API\_KEY environment variable. Not used when vertexAI is true.
55
+
56
+ **speechModel.keyFilename** (`string`): Path to service account JSON key file. Falls back to GOOGLE\_APPLICATION\_CREDENTIALS environment variable.
57
+
58
+ **speechModel.credentials** (`object`): In-memory service account credentials object with client\_email and private\_key properties.
59
+
60
+ **listeningModel** (`GoogleModelConfig`): Configuration for speech-to-text functionality (Default: `{ apiKey: process.env.GOOGLE_API_KEY }`)
61
+
62
+ **listeningModel.apiKey** (`string`): Google Cloud API key. Falls back to GOOGLE\_API\_KEY environment variable. Not used when vertexAI is true.
63
+
64
+ **listeningModel.keyFilename** (`string`): Path to service account JSON key file. Falls back to GOOGLE\_APPLICATION\_CREDENTIALS environment variable.
65
+
66
+ **listeningModel.credentials** (`object`): In-memory service account credentials object with client\_email and private\_key properties.
67
+
68
+ **speaker** (`string`): Default voice ID to use for text-to-speech (Default: `'en-US-Casual-K'`)
69
+
70
+ **vertexAI** (`boolean`): Enable Vertex AI mode for enterprise deployments. Uses project-based authentication instead of API keys. Requires 'project' to be set. (Default: `false`)
71
+
72
+ **project** (`string`): Google Cloud project ID (required when vertexAI is true). Falls back to GOOGLE\_CLOUD\_PROJECT environment variable.
73
+
74
+ **location** (`string`): Google Cloud region for Vertex AI. Falls back to GOOGLE\_CLOUD\_LOCATION environment variable. (Default: `'us-central1'`)
75
+
76
+ ### Methods
77
+
78
+ #### `speak()`
79
+
80
+ Converts text to speech using Google Cloud Text-to-Speech service.
81
+
82
+ **input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
83
+
84
+ **options** (`object`): Speech synthesis options
85
+
86
+ **options.speaker** (`string`): Voice ID to use for this request.
87
+
88
+ **options.languageCode** (`string`): Language code for the voice (e.g., 'en-US'). Defaults to the language code derived from the speaker ID, or 'en-US'.
89
+
90
+ **options.input** (`ISynthesizeSpeechRequest['input']`): Rich input object passed through to the Google Cloud TTS API. Supports ssml, markup, prompt (Gemini-TTS style steering), customPronunciations, and multiSpeakerMarkup. When provided without text, ssml, markup, or multiSpeakerMarkup, the positional input argument is used as the text field automatically.
91
+
92
+ **options.voice** (`ISynthesizeSpeechRequest['voice']`): Voice configuration merged on top of defaults (name and languageCode). Supports modelName (e.g., 'gemini-2.5-flash-preview-tts') and multiSpeakerVoiceConfig.
93
+
94
+ **options.audioConfig** (`ISynthesizeSpeechRequest['audioConfig']`): Audio configuration options from Google Cloud Text-to-Speech API.
95
+
96
+ Returns: `Promise<NodeJS.ReadableStream>`
97
+
98
+ #### `listen()`
99
+
100
+ Converts speech to text using Google Cloud Speech-to-Text service. Supports both v1 (default) and v2 APIs. The v2 API adds support for AAC-in-MP4 audio (iOS Safari) via auto-decoding.
101
+
102
+ ##### v1 (default)
103
+
104
+ **audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe
105
+
106
+ **options** (`GoogleListenOptionsV1`): v1 recognition options
107
+
108
+ **options.config** (`IRecognitionConfig`): v1 recognition configuration from Google Cloud Speech-to-Text API
109
+
110
+ ##### v2
111
+
112
+ Pass `v2: true` to use the Cloud Speech-to-Text v2 API, which supports additional audio formats like AAC-in-MP4 (iOS Safari).
113
+
114
+ ```typescript
115
+ const transcript = await voice.listen(iosSafariAacStream, {
116
+ v2: true,
117
+ config: {
118
+ autoDecodingConfig: {},
119
+ },
120
+ })
121
+ ```
122
+
123
+ **audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe
124
+
125
+ **options** (`GoogleListenOptionsV2`): v2 recognition options
126
+
127
+ **options.v2** (`true`): Enables the v2 API path
128
+
129
+ **options.config** (`v2.IRecognitionConfig`): v2 recognition configuration. Defaults to auto-decoding with languageCodes: \['en-US'] and model: 'long'. Set autoDecodingConfig: {} to auto-detect the audio format, or use explicitDecodingConfig to specify an encoding like MP4\_AAC, M4A\_AAC, or MOV\_AAC.
130
+
131
+ **options.recognizer** (`string`): v2 recognizer resource path. Defaults to projects/{project}/locations/global/recognizers/\_ where {project} is resolved from the constructor project option, GOOGLE\_CLOUD\_PROJECT, or the client's default project.
132
+
133
+ Returns: `Promise<string>`
134
+
135
+ #### `getSpeakers()`
136
+
137
+ Returns an array of available voice options, where each node contains:
138
+
139
+ **voiceId** (`string`): Unique identifier for the voice
140
+
141
+ **languageCodes** (`string[]`): List of language codes supported by this voice
142
+
143
+ #### `isUsingVertexAI()`
144
+
145
+ Checks if Vertex AI mode is enabled.
146
+
147
+ Returns: `boolean` - `true` if using Vertex AI, `false` otherwise
148
+
149
+ #### `getProject()`
150
+
151
+ Gets the configured Google Cloud project ID.
152
+
153
+ Returns: `string | undefined` - The project ID or `undefined` if not set
154
+
155
+ #### `getLocation()`
156
+
157
+ Gets the configured Google Cloud location/region.
158
+
159
+ Returns: `string` - The location (default: `'us-central1'`)
160
+
161
+ ### Authentication
162
+
163
+ The Google Voice provider supports two authentication methods:
164
+
165
+ #### Standard Mode (API Key)
166
+
167
+ Uses a Google Cloud API key for authentication. Suitable for development and basic use cases.
168
+
169
+ ```typescript
170
+ // Using environment variable (GOOGLE_API_KEY)
171
+ const voice = new GoogleVoice()
172
+
173
+ // Using explicit API key
174
+ const voice = new GoogleVoice({
175
+ speechModel: { apiKey: 'your-api-key' },
176
+ listeningModel: { apiKey: 'your-api-key' },
177
+ speaker: 'en-US-Casual-K',
178
+ })
179
+ ```
180
+
181
+ #### Vertex AI Mode (Service Account)
182
+
183
+ Uses Google Cloud project-based authentication with service accounts. Recommended for production and enterprise deployments.
184
+
185
+ **Benefits:**
186
+
187
+ - Better security (no API keys in code)
188
+ - IAM-based access control
189
+ - Project-level billing and quotas
190
+ - Audit logging
191
+ - Enterprise features
192
+
193
+ **Configuration Options:**
194
+
195
+ ```typescript
196
+ // Using Application Default Credentials (ADC)
197
+ // Set GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT env vars
198
+ const voice = new GoogleVoice({
199
+ vertexAI: true,
200
+ project: 'your-gcp-project',
201
+ location: 'us-central1', // Optional, defaults to 'us-central1'
202
+ })
203
+
204
+ // Using service account key file
205
+ const voice = new GoogleVoice({
206
+ vertexAI: true,
207
+ project: 'your-gcp-project',
208
+ speechModel: {
209
+ keyFilename: '/path/to/service-account.json',
210
+ },
211
+ listeningModel: {
212
+ keyFilename: '/path/to/service-account.json',
213
+ },
214
+ })
215
+
216
+ // Using in-memory credentials
217
+ const voice = new GoogleVoice({
218
+ vertexAI: true,
219
+ project: 'your-gcp-project',
220
+ speechModel: {
221
+ credentials: {
222
+ client_email: 'service-account@project.iam.gserviceaccount.com',
223
+ private_key: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
224
+ },
225
+ },
226
+ })
227
+ ```
228
+
229
+ ##### Required Permissions
230
+
231
+ ##### IAM Roles
232
+
233
+ For Text-to-Speech:
234
+
235
+ - `roles/texttospeech.admin` - Text-to-Speech Admin (full access)
236
+ - `roles/texttospeech.editor` - Text-to-Speech Editor (create and manage)
237
+ - `roles/texttospeech.viewer` - Text-to-Speech Viewer (read-only)
238
+
239
+ For Speech-to-Text:
240
+
241
+ - `roles/speech.client` - Speech-to-Text Client
242
+
243
+ ##### OAuth Scopes
244
+
245
+ For synchronous Text-to-Speech synthesis:
246
+
247
+ - `https://www.googleapis.com/auth/cloud-platform` - Full access to Google Cloud Platform services
248
+
249
+ For long-audio Text-to-Speech operations:
250
+
251
+ - `locations.longAudioSynthesize` - Create long-audio synthesis operations
252
+ - `operations.get` - Get operation status
253
+ - `operations.list` - List operations
254
+
255
+ ### Important notes
256
+
257
+ 1. **Authentication**: Either a Google Cloud API key (standard mode) or service account credentials (Vertex AI mode) is required.
258
+
259
+ 2. **Environment Variables**:
260
+
261
+ - `GOOGLE_API_KEY` - API key for standard mode
262
+ - `GOOGLE_CLOUD_PROJECT` - Project ID for Vertex AI mode
263
+ - `GOOGLE_CLOUD_LOCATION` - Location for Vertex AI mode (defaults to 'us-central1')
264
+ - `GOOGLE_APPLICATION_CREDENTIALS` - Path to service account key file
265
+
266
+ 3. The default voice is set to `'en-US-Casual-K'`.
267
+
268
+ 4. Both text-to-speech and speech-to-text services use LINEAR16 as the default audio encoding.
269
+
270
+ 5. The `speak()` method supports advanced audio configuration through the Google Cloud Text-to-Speech API.
271
+
272
+ 6. The `listen()` method supports various recognition configurations through the Google Cloud Speech-to-Text API.
273
+
274
+ 7. Available voices can be filtered by language code using the `getSpeakers()` method.
275
+
276
+ 8. Vertex AI mode provides enterprise features including IAM control, audit logs, and project-level billing.
277
+
278
+ ## Gemini Live
4
279
 
5
280
  The GeminiLiveVoice class provides real-time voice interaction capabilities using Google's Gemini Live API. It supports bidirectional audio streaming, tool calling, session management, and both standard Google API and Vertex AI authentication methods.
6
281
 
7
- ## Usage example
282
+ ### Usage example
8
283
 
9
284
  ```typescript
10
285
  import { GeminiLiveVoice } from '@mastra/voice-google-gemini-live'
@@ -88,9 +363,9 @@ await voice.disconnect()
88
363
  voice.close()
89
364
  ```
90
365
 
91
- ## Configuration
366
+ ### Configuration
92
367
 
93
- ### Constructor options
368
+ #### Constructor options
94
369
 
95
370
  **apiKey** (`string`): Google API key for Gemini API authentication. Required unless using Vertex AI.
96
371
 
@@ -122,9 +397,9 @@ voice.close()
122
397
 
123
398
  **debug** (`boolean`): Enable debug logging for troubleshooting. (Default: `false`)
124
399
 
125
- ## Methods
400
+ ### Methods
126
401
 
127
- ### `connect()`
402
+ #### `connect()`
128
403
 
129
404
  Establishes a connection to the Gemini Live API. Must be called before using speak, listen, or send methods.
130
405
 
@@ -132,7 +407,7 @@ Establishes a connection to the Gemini Live API. Must be called before using spe
132
407
 
133
408
  **returns** (`Promise<void>`): Promise that resolves when the connection is established.
134
409
 
135
- ### `speak()`
410
+ #### `speak()`
136
411
 
137
412
  Converts text to speech and sends it to the model. Can accept either a string or a readable stream as input.
138
413
 
@@ -148,7 +423,7 @@ Converts text to speech and sends it to the model. Can accept either a string or
148
423
 
149
424
  Returns: `Promise<void>` (responses are emitted via `speaker` and `writing` events)
150
425
 
151
- ### `sendContext()`
426
+ #### `sendContext()`
152
427
 
153
428
  Sends conversation history into the live session without triggering a model response. Use this to seed prior turns (e.g. from Mastra Memory) on a cold connect so the model has context before the user speaks.
154
429
 
@@ -170,7 +445,7 @@ await voice.send(micStream)
170
445
 
171
446
  Returns: `Promise<void>`
172
447
 
173
- ### `listen()`
448
+ #### `listen()`
174
449
 
175
450
  Processes audio input for speech recognition. Takes a readable stream of audio data and returns the transcribed text.
176
451
 
@@ -180,7 +455,7 @@ Processes audio input for speech recognition. Takes a readable stream of audio d
180
455
 
181
456
  Returns: `Promise<string>` - The transcribed text
182
457
 
183
- ### `send()`
458
+ #### `send()`
184
459
 
185
460
  Streams audio data in real-time to the Gemini service for continuous audio streaming scenarios like live microphone input.
186
461
 
@@ -188,7 +463,7 @@ Streams audio data in real-time to the Gemini service for continuous audio strea
188
463
 
189
464
  Returns: `Promise<void>`
190
465
 
191
- ### `updateSessionConfig()`
466
+ #### `updateSessionConfig()`
192
467
 
193
468
  Updates the session configuration at runtime. This can modify voice settings and speaker selection. It can also modify other runtime configurations.
194
469
 
@@ -196,7 +471,7 @@ Updates the session configuration at runtime. This can modify voice settings and
196
471
 
197
472
  Returns: `Promise<void>`
198
473
 
199
- ### `addTools()`
474
+ #### `addTools()`
200
475
 
201
476
  Adds a set of tools to the voice instance. Tools allow the model to perform additional actions during conversations. When GeminiLiveVoice is added to an Agent, any tools configured for the Agent will automatically be available to the voice interface.
202
477
 
@@ -204,7 +479,7 @@ Adds a set of tools to the voice instance. Tools allow the model to perform addi
204
479
 
205
480
  Returns: `void`
206
481
 
207
- ### `addInstructions()`
482
+ #### `addInstructions()`
208
483
 
209
484
  Adds or updates system instructions for the model.
210
485
 
@@ -212,7 +487,7 @@ Adds or updates system instructions for the model.
212
487
 
213
488
  Returns: `void`
214
489
 
215
- ### `answer()`
490
+ #### `answer()`
216
491
 
217
492
  Triggers a response from the model. This method is primarily used internally when integrated with an Agent.
218
493
 
@@ -220,25 +495,25 @@ Triggers a response from the model. This method is primarily used internally whe
220
495
 
221
496
  Returns: `Promise<void>`
222
497
 
223
- ### `getSpeakers()`
498
+ #### `getSpeakers()`
224
499
 
225
500
  Returns a list of available voice speakers for the Gemini Live API.
226
501
 
227
502
  Returns: `Promise<Array<{ voiceId: string; description?: string }>>`
228
503
 
229
- ### `disconnect()`
504
+ #### `disconnect()`
230
505
 
231
506
  Disconnects from the Gemini Live session and cleans up resources. This is the async method that properly handles cleanup.
232
507
 
233
508
  Returns: `Promise<void>`
234
509
 
235
- ### `close()`
510
+ #### `close()`
236
511
 
237
512
  Synchronous wrapper for disconnect(). Calls disconnect() internally without awaiting.
238
513
 
239
514
  Returns: `void`
240
515
 
241
- ### `on()`
516
+ #### `on()`
242
517
 
243
518
  Registers an event listener for voice events.
244
519
 
@@ -248,7 +523,7 @@ Registers an event listener for voice events.
248
523
 
249
524
  Returns: `void`
250
525
 
251
- ### `off()`
526
+ #### `off()`
252
527
 
253
528
  Removes a previously registered event listener.
254
529
 
@@ -258,7 +533,7 @@ Removes a previously registered event listener.
258
533
 
259
534
  Returns: `void`
260
535
 
261
- ## Events
536
+ ### Events
262
537
 
263
538
  The GeminiLiveVoice class emits the following events:
264
539
 
@@ -282,7 +557,7 @@ The GeminiLiveVoice class emits the following events:
282
557
 
283
558
  **interrupt** (`event`): Emitted on barge-in when the user starts speaking over an in-flight model response. The server cancels any further audio for the current turn. Callback receives { type: 'user', timestamp: number }.
284
559
 
285
- ## Native-audio behavior
560
+ ### Native-audio behavior
286
561
 
287
562
  Native-audio Gemini Live models (any model whose ID contains `native-audio`, such as `gemini-2.5-flash-native-audio-preview-12-2025`) split text output across two channels:
288
563
 
@@ -293,7 +568,7 @@ On non-native-audio models there is no `output_audio_transcription` channel, so
293
568
 
294
569
  Input transcription, output transcription, and barge-in detection (`realtime_input_config.activity_handling = 'START_OF_ACTIVITY_INTERRUPTS'`) are enabled automatically in the setup payload. You don't need extra configuration.
295
570
 
296
- ## Available models
571
+ ### Available models
297
572
 
298
573
  The following Gemini Live models are available:
299
574
 
@@ -305,7 +580,7 @@ The following Gemini Live models are available:
305
580
  - `gemini-live-2.5-flash-preview`
306
581
  - `gemini-2.6.flash-preview-tts`
307
582
 
308
- ## Available voices
583
+ ### Available voices
309
584
 
310
585
  The following voice options are available:
311
586
 
@@ -314,9 +589,9 @@ The following voice options are available:
314
589
  - `Kore`: Neutral, professional
315
590
  - `Fenrir`: Warm, approachable
316
591
 
317
- ## Authentication methods
592
+ ### Authentication methods
318
593
 
319
- ### Gemini API (Development)
594
+ #### Gemini API (Development)
320
595
 
321
596
  The simplest method using an API key from [Google AI Studio](https://makersuite.google.com/app/apikey):
322
597
 
@@ -327,7 +602,7 @@ const voice = new GeminiLiveVoice({
327
602
  })
328
603
  ```
329
604
 
330
- ### Vertex AI (Production)
605
+ #### Vertex AI (Production)
331
606
 
332
607
  For production use with OAuth authentication and Google Cloud Platform:
333
608
 
@@ -356,9 +631,9 @@ const voice = new GeminiLiveVoice({
356
631
  })
357
632
  ```
358
633
 
359
- ## Advanced features
634
+ ### Advanced features
360
635
 
361
- ### Session Management
636
+ #### Session Management
362
637
 
363
638
  The Gemini Live API supports session resumption for handling network interruptions:
364
639
 
@@ -377,7 +652,7 @@ const voice = new GeminiLiveVoice({
377
652
  })
378
653
  ```
379
654
 
380
- ### Tool Calling
655
+ #### Tool Calling
381
656
 
382
657
  Enable the model to call functions during conversations:
383
658
 
@@ -402,7 +677,7 @@ voice.on('toolCall', ({ name, args, id }) => {
402
677
  })
403
678
  ```
404
679
 
405
- ## Notes
680
+ ### Notes
406
681
 
407
682
  - The Gemini Live API uses WebSockets for real-time communication
408
683
  - Audio is processed as 16kHz PCM16 for input and 24kHz PCM16 for output