@mastra/mcp-docs-server 1.2.15-alpha.7 → 1.2.15
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/.docs/docs/agents/agent-approval.md +14 -0
- package/.docs/docs/agents/code-mode.md +17 -2
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/browser/overview.md +8 -8
- package/.docs/docs/browser/recording.md +4 -4
- package/.docs/docs/capabilities/{channels/overview.md → channels.md} +70 -7
- package/.docs/docs/capabilities/subagents.md +6 -3
- package/.docs/docs/datasets/running-experiments.md +49 -0
- package/.docs/docs/deployment/cloud-providers.md +9 -9
- package/.docs/docs/deployment/overview.md +9 -9
- package/.docs/docs/deployment/sandbox.md +3 -3
- package/.docs/docs/deployment/web-framework.md +6 -6
- package/.docs/docs/deployment/workers.md +1 -1
- package/.docs/docs/deployment/workflow-runners.md +2 -2
- package/.docs/docs/getting-started/develop.md +1 -1
- package/.docs/docs/harness/agent-controller.md +45 -4
- package/.docs/docs/harness/overview.md +2 -4
- package/.docs/docs/index.md +8 -8
- package/.docs/docs/long-running-agents/durable-agents.md +3 -3
- package/.docs/docs/long-running-agents/goals.md +1 -1
- package/.docs/docs/long-running-agents/schedules.md +1 -1
- package/.docs/docs/long-running-agents/signal-providers.md +3 -16
- package/.docs/docs/long-running-agents/signals.md +2 -2
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +27 -0
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
- package/.docs/docs/mcp/overview.md +42 -0
- package/.docs/docs/memory/memory-processors.md +5 -5
- package/.docs/docs/memory/message-history.md +3 -3
- package/.docs/docs/memory/multi-user-threads.md +1 -1
- package/.docs/docs/memory/observational-memory.md +2 -2
- package/.docs/docs/memory/semantic-recall.md +2 -1
- package/.docs/docs/memory/working-memory.md +1 -0
- package/.docs/docs/observability/integrations/exporters/mastra-platform.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +16 -15
- package/.docs/docs/observability/integrations/overview.md +3 -3
- package/.docs/docs/server/auth/fga.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth/workers.md +2 -0
- package/.docs/docs/server/auth.md +10 -8
- package/.docs/docs/server/custom-adapters.md +1 -1
- package/.docs/docs/server/custom-api-routes.md +35 -0
- package/.docs/docs/server/mastra-client.md +13 -13
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/storage/overview.md +14 -12
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/agents-and-tools.md +2 -2
- package/.docs/docs/workflows/{stored-workflows.md → dynamic-workflows.md} +24 -24
- package/.docs/docs/workflows/overview.md +2 -2
- package/.docs/docs/workflows/snapshots.md +12 -10
- package/.docs/docs/workflows/time-travel.md +2 -0
- package/.docs/docs/workspace/filesystem.md +15 -15
- package/.docs/docs/workspace/sandbox.md +17 -17
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/agent-frameworks/ai-sdk.md +2 -2
- package/.docs/guides/deployment/mastra-workers.md +4 -2
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/guides/guide/signal-provider.md +1 -1
- package/.docs/guides/index.md +8 -8
- package/.docs/guides/voice/overview.md +55 -106
- package/.docs/guides/voice/speech-to-text.md +7 -7
- package/.docs/guides/voice/text-to-speech.md +9 -10
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +5 -5
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +1 -1
- package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +257 -4
- package/.docs/{docs/server → integrations}/auth/auth0.md +1 -1
- package/.docs/{docs/server → integrations}/auth/clerk.md +2 -2
- package/.docs/{docs/server → integrations}/auth/firebase.md +1 -1
- package/.docs/{docs/server → integrations}/auth/okta.md +24 -4
- package/.docs/{docs/server → integrations}/auth/supabase.md +2 -2
- package/.docs/{docs/server → integrations}/auth/workos.md +1 -1
- package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
- package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
- package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +103 -0
- package/.docs/{docs/capabilities → integrations}/channels/imessage.md +12 -4
- package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
- package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
- package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
- package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
- package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
- package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
- package/.docs/integrations/databases/neon.md +220 -0
- package/.docs/integrations/databases/oracledb.md +239 -0
- package/.docs/{reference/storage → integrations/databases}/postgresql.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +2 -2
- package/.docs/{guides/deployment → integrations/deploy}/netlify.md +3 -3
- package/.docs/{guides/deployment → integrations/deploy}/vercel.md +3 -3
- package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +5 -5
- package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +3 -3
- package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +2 -2
- package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +5 -5
- package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +2 -2
- package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +5 -5
- package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +3 -3
- package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
- package/.docs/integrations/observability/datadog.md +538 -0
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
- package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +278 -46
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
- package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +1 -1
- package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +23 -2
- package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +1 -1
- package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +3 -3
- package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +2 -2
- package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +8 -0
- package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +141 -12
- package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
- package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
- package/.docs/{reference → integrations}/tools/tavily.md +1 -1
- package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
- package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
- package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
- package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
- package/.docs/{reference → integrations}/voice/livekit.md +437 -34
- package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
- package/.docs/integrations.md +147 -0
- package/.docs/models/embeddings.md +3 -3
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/custom-gateways.md +4 -0
- package/.docs/models/gateways/neon.md +1 -1
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +9 -3
- package/.docs/models/gateways/vercel.md +7 -4
- package/.docs/models/index.md +3 -3
- package/.docs/models/providers/302ai.md +1 -1
- package/.docs/models/providers/abacus.md +1 -1
- package/.docs/models/providers/abliteration-ai.md +1 -1
- package/.docs/models/providers/agentrouter.md +1 -1
- package/.docs/models/providers/ai-router.md +1 -1
- package/.docs/models/providers/aiand.md +1 -1
- package/.docs/models/providers/aki-io.md +1 -1
- package/.docs/models/providers/alibaba-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-coding-plan.md +1 -1
- package/.docs/models/providers/alibaba-token-plan-cn.md +1 -1
- package/.docs/models/providers/alibaba-token-plan.md +1 -1
- package/.docs/models/providers/alibaba.md +7 -5
- package/.docs/models/providers/ambient.md +2 -2
- package/.docs/models/providers/anyapi.md +1 -1
- package/.docs/models/providers/atomic-chat.md +1 -1
- package/.docs/models/providers/auriko.md +1 -1
- package/.docs/models/providers/bailing.md +1 -1
- package/.docs/models/providers/baseten.md +2 -2
- package/.docs/models/providers/berget.md +1 -1
- package/.docs/models/providers/blueclaw.md +1 -1
- package/.docs/models/providers/chutes.md +1 -1
- package/.docs/models/providers/clarifai.md +1 -1
- package/.docs/models/providers/claudinio.md +1 -1
- package/.docs/models/providers/cline-pass.md +1 -1
- package/.docs/models/providers/cloudferro-sherlock.md +1 -1
- package/.docs/models/providers/cloudflare-workers-ai.md +1 -1
- package/.docs/models/providers/coralbricks.md +75 -0
- package/.docs/models/providers/cortecs.md +3 -5
- package/.docs/models/providers/crof.md +1 -1
- package/.docs/models/providers/crossmodel.md +2 -3
- package/.docs/models/providers/daoxe.md +1 -1
- package/.docs/models/providers/databricks.md +1 -1
- package/.docs/models/providers/deepinfra.md +6 -5
- package/.docs/models/providers/digitalocean.md +5 -5
- package/.docs/models/providers/dinference.md +1 -1
- package/.docs/models/providers/drun.md +1 -1
- package/.docs/models/providers/ebcloud.md +1 -1
- package/.docs/models/providers/empiriolabs.md +3 -2
- package/.docs/models/providers/evroc.md +3 -4
- package/.docs/models/providers/fastrouter.md +1 -1
- package/.docs/models/providers/firepass.md +1 -1
- package/.docs/models/providers/fireworks-ai.md +1 -1
- package/.docs/models/providers/firmware.md +1 -1
- package/.docs/models/providers/freemodel.md +1 -1
- package/.docs/models/providers/friendli.md +1 -1
- package/.docs/models/providers/frogbot.md +1 -1
- package/.docs/models/providers/github-models.md +1 -1
- package/.docs/models/providers/gmicloud.md +1 -1
- package/.docs/models/providers/google.md +1 -1
- package/.docs/models/providers/greenpt.md +1 -1
- package/.docs/models/providers/helicone.md +1 -1
- package/.docs/models/providers/hetzner.md +8 -5
- package/.docs/models/providers/hpc-ai.md +1 -1
- package/.docs/models/providers/huggingface.md +1 -1
- package/.docs/models/providers/hyper.md +7 -7
- package/.docs/models/providers/iflowcn.md +1 -1
- package/.docs/models/providers/impossibl.md +1 -1
- package/.docs/models/providers/inception.md +1 -1
- package/.docs/models/providers/inceptron.md +1 -1
- package/.docs/models/providers/inference.md +1 -1
- package/.docs/models/providers/inferx.md +1 -1
- package/.docs/models/providers/infomaniak.md +1 -1
- package/.docs/models/providers/io-intelligence.md +1 -1
- package/.docs/models/providers/io-net.md +1 -1
- package/.docs/models/providers/jiekou.md +1 -1
- package/.docs/models/providers/kenari.md +1 -1
- package/.docs/models/providers/kilo.md +16 -11
- package/.docs/models/providers/kimi-for-coding.md +1 -1
- package/.docs/models/providers/kiro.md +1 -1
- package/.docs/models/providers/kuae-cloud-coding-plan.md +1 -1
- package/.docs/models/providers/lilac.md +1 -1
- package/.docs/models/providers/llama.md +1 -1
- package/.docs/models/providers/llmgateway.md +2 -7
- package/.docs/models/providers/llmtr.md +1 -1
- package/.docs/models/providers/lmstudio.md +1 -1
- package/.docs/models/providers/longcat.md +1 -1
- package/.docs/models/providers/lucidquery.md +1 -1
- package/.docs/models/providers/lynkr.md +1 -1
- package/.docs/models/providers/meganova.md +1 -1
- package/.docs/models/providers/meta.md +1 -1
- package/.docs/models/providers/minimax-cn-coding-plan.md +1 -1
- package/.docs/models/providers/minimax-cn.md +1 -1
- package/.docs/models/providers/minimax-coding-plan.md +1 -1
- package/.docs/models/providers/minimax.md +1 -1
- package/.docs/models/providers/mixlayer.md +1 -1
- package/.docs/models/providers/moark.md +1 -1
- package/.docs/models/providers/modal.md +1 -1
- package/.docs/models/providers/model-oracle-ai.md +1 -1
- package/.docs/models/providers/modelis.md +1 -1
- package/.docs/models/providers/modelscope.md +1 -1
- package/.docs/models/providers/moonshotai-cn.md +1 -1
- package/.docs/models/providers/moonshotai.md +1 -1
- package/.docs/models/providers/morph.md +1 -1
- package/.docs/models/providers/nano-gpt.md +8 -4
- package/.docs/models/providers/nearai.md +1 -1
- package/.docs/models/providers/nebius.md +3 -2
- package/.docs/models/providers/neuralwatt.md +1 -1
- package/.docs/models/providers/nova.md +1 -1
- package/.docs/models/providers/novita-ai.md +1 -1
- package/.docs/models/providers/nvidia.md +3 -2
- package/.docs/models/providers/ofox.md +4 -3
- package/.docs/models/providers/ollama-cloud.md +1 -1
- package/.docs/models/providers/opencode-go.md +1 -1
- package/.docs/models/providers/opencode.md +65 -64
- package/.docs/models/providers/orcarouter.md +1 -1
- package/.docs/models/providers/ovhcloud.md +1 -1
- package/.docs/models/providers/perplexity-agent.md +1 -1
- package/.docs/models/providers/pioneer.md +1 -1
- package/.docs/models/providers/poe.md +1 -1
- package/.docs/models/providers/poolside.md +1 -1
- package/.docs/models/providers/privatemode-ai.md +12 -10
- package/.docs/models/providers/qihang-ai.md +1 -1
- package/.docs/models/providers/qiniu-ai.md +1 -1
- package/.docs/models/providers/regolo-ai.md +26 -21
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/routing-run.md +1 -1
- package/.docs/models/providers/sakana.md +1 -1
- package/.docs/models/providers/sarvam.md +1 -1
- package/.docs/models/providers/scaleway.md +1 -1
- package/.docs/models/providers/scx.md +1 -1
- package/.docs/models/providers/siliconflow-cn.md +1 -1
- package/.docs/models/providers/siliconflow.md +1 -1
- package/.docs/models/providers/snowflake-cortex.md +6 -2
- package/.docs/models/providers/stackit.md +1 -1
- package/.docs/models/providers/stepfun-ai-step-plan.md +1 -1
- package/.docs/models/providers/stepfun-ai.md +1 -1
- package/.docs/models/providers/stepfun-step-plan.md +1 -1
- package/.docs/models/providers/stepfun.md +1 -1
- package/.docs/models/providers/subconscious.md +1 -1
- package/.docs/models/providers/submodel.md +1 -1
- package/.docs/models/providers/synthetic.md +1 -1
- package/.docs/models/providers/tencent-coding-plan.md +1 -1
- package/.docs/models/providers/tencent-token-plan.md +1 -1
- package/.docs/models/providers/tencent-tokenhub.md +1 -1
- package/.docs/models/providers/tensorx.md +1 -1
- package/.docs/models/providers/the-grid-ai.md +1 -1
- package/.docs/models/providers/thinkingmachines.md +1 -1
- package/.docs/models/providers/tinfoil.md +2 -2
- package/.docs/models/providers/togetherai.md +1 -1
- package/.docs/models/providers/trustedrouter.md +1 -1
- package/.docs/models/providers/umans-ai-coding-plan.md +1 -1
- package/.docs/models/providers/umans-ai.md +1 -1
- package/.docs/models/providers/unorouter.md +1 -1
- package/.docs/models/providers/upstage.md +1 -1
- package/.docs/models/providers/venice.md +1 -1
- package/.docs/models/providers/vivgrid.md +1 -1
- package/.docs/models/providers/vultr.md +1 -1
- package/.docs/models/providers/wafer.ai.md +1 -1
- package/.docs/models/providers/wandb.md +3 -2
- package/.docs/models/providers/xiaomi-token-plan-ams.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-cn.md +1 -1
- package/.docs/models/providers/xiaomi-token-plan-sgp.md +1 -1
- package/.docs/models/providers/xiaomi.md +1 -1
- package/.docs/models/providers/xpersona.md +1 -1
- package/.docs/models/providers/zai-coding-plan.md +1 -1
- package/.docs/models/providers/zai.md +1 -1
- package/.docs/models/providers/zeldoc.md +8 -8
- package/.docs/models/providers/zenifra.md +1 -1
- package/.docs/models/providers/zenmux.md +1 -16
- package/.docs/models/providers/zhipuai-coding-plan.md +1 -1
- package/.docs/models/providers/zhipuai.md +1 -1
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +35 -4
- package/.docs/reference/agent-controller/session.md +5 -3
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/durable-agent.md +2 -0
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +3 -1
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/better-auth.md +1 -1
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/auth/okta.md +5 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +1 -1
- package/.docs/reference/browser/agent-browser.md +2 -2
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/mastra-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +2 -2
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +6 -6
- package/.docs/reference/client-js/agents.md +2 -1
- package/.docs/reference/client-js/workflows.md +21 -21
- package/.docs/reference/code-sdk/mount-agent-controller.md +1 -1
- package/.docs/reference/configuration.md +21 -27
- package/.docs/reference/core/{addStoredWorkflow.md → addDynamicWorkflow.md} +10 -10
- package/.docs/reference/core/{addStoredWorkflows.md → addDynamicWorkflows.md} +9 -9
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/datasets/startExperiment.md +8 -0
- package/.docs/reference/editor/tool-provider.md +26 -1
- package/.docs/reference/file-based-agents/config.md +2 -0
- package/.docs/reference/file-based-agents/instructions.md +2 -0
- package/.docs/reference/file-based-agents/logger.md +2 -0
- package/.docs/reference/file-based-agents/memory.md +2 -0
- package/.docs/reference/file-based-agents/observability.md +2 -0
- package/.docs/reference/file-based-agents/processors.md +2 -0
- package/.docs/reference/file-based-agents/schedules.md +2 -0
- package/.docs/reference/file-based-agents/scorers.md +2 -0
- package/.docs/reference/file-based-agents/server.md +2 -0
- package/.docs/reference/file-based-agents/skills.md +2 -0
- package/.docs/reference/file-based-agents/storage.md +3 -1
- package/.docs/reference/file-based-agents/studio.md +3 -1
- package/.docs/reference/file-based-agents/subagents.md +2 -0
- package/.docs/reference/file-based-agents/tools.md +2 -0
- package/.docs/reference/file-based-agents/workflows.md +2 -0
- package/.docs/reference/file-based-agents/workspace.md +2 -0
- package/.docs/reference/index.md +32 -57
- package/.docs/{guides/getting-started → reference}/manual-install.md +2 -2
- package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/{guides → reference}/migrations/mastra-cloud.md +2 -2
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +10 -10
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
- package/.docs/reference/observability/tracing/exporters/datadog.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -0
- package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
- package/.docs/reference/processors/pii-detector.md +2 -0
- package/.docs/reference/processors/prompt-injection-detector.md +2 -0
- package/.docs/reference/processors/regex-filter-processor.md +20 -0
- package/.docs/reference/processors/response-cache.md +2 -0
- package/.docs/reference/processors/tool-search-processor.md +33 -1
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
- package/.docs/reference/rag/metadata-filters.md +13 -4
- package/.docs/{guides → reference}/rag/overview.md +2 -2
- package/.docs/{guides → reference}/rag/retrieval.md +18 -1
- package/.docs/{guides → reference}/rag/vector-databases.md +42 -1
- package/.docs/reference/schedules/overview.md +2 -0
- package/.docs/reference/server/create-route.md +27 -1
- package/.docs/reference/server/register-api-route.md +2 -0
- package/.docs/reference/server/routes.md +9 -9
- package/.docs/reference/signals/create-notification-inbox-tool.md +2 -0
- package/.docs/reference/signals/signal-provider.md +2 -0
- package/.docs/reference/signals/task-signal-provider.md +2 -0
- package/.docs/reference/signals/webhook-signal-provider.md +2 -0
- package/.docs/reference/storage/composite.md +4 -4
- package/.docs/reference/storage/overview.md +9 -9
- package/.docs/reference/storage/retention.md +5 -5
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/stream.md +1 -1
- package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
- package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
- package/.docs/reference/tools/create-code-mode.md +3 -1
- package/.docs/reference/tools/isolated-vm-transport.md +1 -1
- package/.docs/reference/tools/mcp-client.md +51 -0
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/tools/quickjs-transport.md +92 -0
- package/.docs/reference/vectors/chroma.md +1 -1
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/oracledb.md +347 -0
- package/.docs/reference/workers/overview.md +10 -8
- package/.docs/reference/workflows/{stored-workflow-definition.md → dynamic-workflow-definition.md} +9 -7
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
- package/.docs/reference/workflows/workflow-methods/agent.md +3 -3
- package/.docs/reference/workflows/workflow-methods/tool.md +3 -3
- package/.docs/reference/workflows/workflow.md +18 -0
- package/.docs/reference/workspace/local-sandbox.md +1 -1
- package/.docs/reference/workspace/platform-filesystem.md +3 -3
- package/.docs/reference/workspace/platform-sandbox.md +11 -3
- package/.docs/reference/workspace/process-manager.md +3 -3
- package/.docs/reference/workspace/sandbox.md +10 -0
- package/CHANGELOG.md +97 -0
- package/dist/index.js +1 -1
- package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
- package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +6 -6
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
- package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
- package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
- package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
- package/.docs/guides/guide/chef-michel.md +0 -211
- package/.docs/guides/guide/publishing-mcp-server.md +0 -137
- package/.docs/guides/guide/slack-assistant.md +0 -193
- package/.docs/guides/guide/stock-agent.md +0 -132
- package/.docs/guides/guide/web-search.md +0 -322
- package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
- package/.docs/guides/voice/realtime-voice.md +0 -430
- package/.docs/reference/voice/google.md +0 -290
- package/.docs/reference/voice/inworld.md +0 -137
- package/.docs/reference/voice/openai.md +0 -96
- package/.docs/reference/voice/playai.md +0 -82
- package/.docs/reference/workspace/vercel-serverless.md +0 -128
- /package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +0 -0
- /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
- /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/inngest.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/temporal.md +0 -0
- /package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +0 -0
- /package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/express.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +0 -0
- /package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +0 -0
- /package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +0 -0
- /package/.docs/{guides/guide → integrations/tools}/firecrawl.md +0 -0
- /package/.docs/{reference → integrations}/voice/azure.md +0 -0
- /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
- /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
- /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
- /package/.docs/{reference → integrations}/voice/murf.md +0 -0
- /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
- /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
- /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
- /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
- /package/.docs/{guides → reference}/migrations/network-to-supervisor.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
- /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Google
|
|
4
|
-
|
|
5
|
-
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.
|
|
6
|
-
|
|
7
|
-
## Usage example
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
import { GoogleVoice } from '@mastra/voice-google'
|
|
11
|
-
|
|
12
|
-
// Initialize with default configuration (uses GOOGLE_API_KEY environment variable)
|
|
13
|
-
const voice = new GoogleVoice()
|
|
14
|
-
|
|
15
|
-
// Text-to-Speech (plain text)
|
|
16
|
-
const audioStream = await voice.speak('Hello, world!', {
|
|
17
|
-
languageCode: 'en-US',
|
|
18
|
-
audioConfig: {
|
|
19
|
-
audioEncoding: 'LINEAR16',
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
// Text-to-Speech with SSML
|
|
24
|
-
const ssmlStream = await voice.speak('ignored', {
|
|
25
|
-
input: {
|
|
26
|
-
ssml: '<speak>Take <say-as interpret-as="unit">5 mg</say-as> daily.</speak>',
|
|
27
|
-
},
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
// Text-to-Speech with Gemini-TTS model
|
|
31
|
-
const geminiStream = await voice.speak('Hello from Gemini TTS!', {
|
|
32
|
-
voice: { name: 'Kore', modelName: 'gemini-2.5-flash-preview-tts' },
|
|
33
|
-
input: { prompt: 'Warm, calm tone.' },
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
// Speech-to-Text
|
|
37
|
-
const transcript = await voice.listen(audioStream, {
|
|
38
|
-
config: {
|
|
39
|
-
encoding: 'LINEAR16',
|
|
40
|
-
languageCode: 'en-US',
|
|
41
|
-
},
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
// Get available voices for a specific language
|
|
45
|
-
const voices = await voice.getSpeakers({ languageCode: 'en-US' })
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Constructor parameters
|
|
49
|
-
|
|
50
|
-
**speechModel** (`GoogleModelConfig`): Configuration for text-to-speech functionality (Default: `{ apiKey: process.env.GOOGLE_API_KEY }`)
|
|
51
|
-
|
|
52
|
-
**speechModel.apiKey** (`string`): Google Cloud API key. Falls back to GOOGLE\_API\_KEY environment variable. Not used when vertexAI is true.
|
|
53
|
-
|
|
54
|
-
**speechModel.keyFilename** (`string`): Path to service account JSON key file. Falls back to GOOGLE\_APPLICATION\_CREDENTIALS environment variable.
|
|
55
|
-
|
|
56
|
-
**speechModel.credentials** (`object`): In-memory service account credentials object with client\_email and private\_key properties.
|
|
57
|
-
|
|
58
|
-
**listeningModel** (`GoogleModelConfig`): Configuration for speech-to-text functionality (Default: `{ apiKey: process.env.GOOGLE_API_KEY }`)
|
|
59
|
-
|
|
60
|
-
**listeningModel.apiKey** (`string`): Google Cloud API key. Falls back to GOOGLE\_API\_KEY environment variable. Not used when vertexAI is true.
|
|
61
|
-
|
|
62
|
-
**listeningModel.keyFilename** (`string`): Path to service account JSON key file. Falls back to GOOGLE\_APPLICATION\_CREDENTIALS environment variable.
|
|
63
|
-
|
|
64
|
-
**listeningModel.credentials** (`object`): In-memory service account credentials object with client\_email and private\_key properties.
|
|
65
|
-
|
|
66
|
-
**speaker** (`string`): Default voice ID to use for text-to-speech (Default: `'en-US-Casual-K'`)
|
|
67
|
-
|
|
68
|
-
**vertexAI** (`boolean`): Enable Vertex AI mode for enterprise deployments. Uses project-based authentication instead of API keys. Requires 'project' to be set. (Default: `false`)
|
|
69
|
-
|
|
70
|
-
**project** (`string`): Google Cloud project ID (required when vertexAI is true). Falls back to GOOGLE\_CLOUD\_PROJECT environment variable.
|
|
71
|
-
|
|
72
|
-
**location** (`string`): Google Cloud region for Vertex AI. Falls back to GOOGLE\_CLOUD\_LOCATION environment variable. (Default: `'us-central1'`)
|
|
73
|
-
|
|
74
|
-
## Methods
|
|
75
|
-
|
|
76
|
-
### `speak()`
|
|
77
|
-
|
|
78
|
-
Converts text to speech using Google Cloud Text-to-Speech service.
|
|
79
|
-
|
|
80
|
-
**input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
|
|
81
|
-
|
|
82
|
-
**options** (`object`): Speech synthesis options
|
|
83
|
-
|
|
84
|
-
**options.speaker** (`string`): Voice ID to use for this request.
|
|
85
|
-
|
|
86
|
-
**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'.
|
|
87
|
-
|
|
88
|
-
**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.
|
|
89
|
-
|
|
90
|
-
**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.
|
|
91
|
-
|
|
92
|
-
**options.audioConfig** (`ISynthesizeSpeechRequest['audioConfig']`): Audio configuration options from Google Cloud Text-to-Speech API.
|
|
93
|
-
|
|
94
|
-
Returns: `Promise<NodeJS.ReadableStream>`
|
|
95
|
-
|
|
96
|
-
### `listen()`
|
|
97
|
-
|
|
98
|
-
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.
|
|
99
|
-
|
|
100
|
-
#### v1 (default)
|
|
101
|
-
|
|
102
|
-
**audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe
|
|
103
|
-
|
|
104
|
-
**options** (`GoogleListenOptionsV1`): v1 recognition options
|
|
105
|
-
|
|
106
|
-
**options.config** (`IRecognitionConfig`): v1 recognition configuration from Google Cloud Speech-to-Text API
|
|
107
|
-
|
|
108
|
-
#### v2
|
|
109
|
-
|
|
110
|
-
Pass `v2: true` to use the Cloud Speech-to-Text v2 API, which supports additional audio formats like AAC-in-MP4 (iOS Safari).
|
|
111
|
-
|
|
112
|
-
The v2 `recognize` call is IAM-authorized and does not accept API-key-only authentication. Configure service account credentials on the `listeningModel` (or set `GOOGLE_APPLICATION_CREDENTIALS`) and set `GOOGLE_CLOUD_PROJECT` so the recognizer path can be resolved, even when `vertexAI` is not enabled.
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
import { GoogleVoice } from '@mastra/voice-google'
|
|
116
|
-
|
|
117
|
-
// v2 listen() requires service account credentials, not just GOOGLE_API_KEY.
|
|
118
|
-
// Set GOOGLE_CLOUD_PROJECT so the recognizer path can be resolved.
|
|
119
|
-
const voice = new GoogleVoice({
|
|
120
|
-
listeningModel: { keyFilename: process.env.GOOGLE_APPLICATION_CREDENTIALS },
|
|
121
|
-
})
|
|
122
|
-
|
|
123
|
-
const transcript = await voice.listen(iosSafariAacStream, {
|
|
124
|
-
v2: true,
|
|
125
|
-
config: {
|
|
126
|
-
autoDecodingConfig: {},
|
|
127
|
-
},
|
|
128
|
-
})
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
> **Note:** `listen({ v2: true })` fails with `PERMISSION_DENIED` on `speech.recognizers.recognize` when only `GOOGLE_API_KEY` is set. An API-key request carries no OAuth identity, so granting `roles/speech.client` to a user account does not help — the role must be granted to the service account presented in the request. This applies regardless of the `vertexAI` setting; `speak()` and v1 `listen()` still work with an API key alone.
|
|
132
|
-
|
|
133
|
-
**audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe
|
|
134
|
-
|
|
135
|
-
**options** (`GoogleListenOptionsV2`): v2 recognition options
|
|
136
|
-
|
|
137
|
-
**options.v2** (`true`): Enables the v2 API path
|
|
138
|
-
|
|
139
|
-
**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.
|
|
140
|
-
|
|
141
|
-
**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.
|
|
142
|
-
|
|
143
|
-
Returns: `Promise<string>`
|
|
144
|
-
|
|
145
|
-
### `getSpeakers()`
|
|
146
|
-
|
|
147
|
-
Returns an array of available voice options, where each node contains:
|
|
148
|
-
|
|
149
|
-
**voiceId** (`string`): Unique identifier for the voice
|
|
150
|
-
|
|
151
|
-
**languageCodes** (`string[]`): List of language codes supported by this voice
|
|
152
|
-
|
|
153
|
-
### `isUsingVertexAI()`
|
|
154
|
-
|
|
155
|
-
Checks if Vertex AI mode is enabled.
|
|
156
|
-
|
|
157
|
-
Returns: `boolean` - `true` if using Vertex AI, `false` otherwise
|
|
158
|
-
|
|
159
|
-
### `getProject()`
|
|
160
|
-
|
|
161
|
-
Gets the configured Google Cloud project ID.
|
|
162
|
-
|
|
163
|
-
Returns: `string | undefined` - The project ID or `undefined` if not set
|
|
164
|
-
|
|
165
|
-
### `getLocation()`
|
|
166
|
-
|
|
167
|
-
Gets the configured Google Cloud location/region.
|
|
168
|
-
|
|
169
|
-
Returns: `string` - The location (default: `'us-central1'`)
|
|
170
|
-
|
|
171
|
-
## Authentication
|
|
172
|
-
|
|
173
|
-
The Google Voice provider supports two authentication methods:
|
|
174
|
-
|
|
175
|
-
### Standard Mode (API Key)
|
|
176
|
-
|
|
177
|
-
Uses a Google Cloud API key for authentication. Covers `speak()` and v1 `listen()`. It does not cover `listen({ v2: true })`, which is IAM-authorized and requires service account credentials (see [v2](#v2)).
|
|
178
|
-
|
|
179
|
-
```typescript
|
|
180
|
-
// Using environment variable (GOOGLE_API_KEY)
|
|
181
|
-
const voice = new GoogleVoice()
|
|
182
|
-
|
|
183
|
-
// Using explicit API key
|
|
184
|
-
const voice = new GoogleVoice({
|
|
185
|
-
speechModel: { apiKey: 'your-api-key' },
|
|
186
|
-
listeningModel: { apiKey: 'your-api-key' },
|
|
187
|
-
speaker: 'en-US-Casual-K',
|
|
188
|
-
})
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Vertex AI Mode (Service Account)
|
|
192
|
-
|
|
193
|
-
Uses Google Cloud project-based authentication with service accounts. Recommended for production and enterprise deployments.
|
|
194
|
-
|
|
195
|
-
**Benefits:**
|
|
196
|
-
|
|
197
|
-
- Better security (no API keys in code)
|
|
198
|
-
- IAM-based access control
|
|
199
|
-
- Project-level billing and quotas
|
|
200
|
-
- Audit logging
|
|
201
|
-
- Enterprise features
|
|
202
|
-
|
|
203
|
-
**Configuration Options:**
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
// Using Application Default Credentials (ADC)
|
|
207
|
-
// Set GOOGLE_APPLICATION_CREDENTIALS and GOOGLE_CLOUD_PROJECT env vars
|
|
208
|
-
const voice = new GoogleVoice({
|
|
209
|
-
vertexAI: true,
|
|
210
|
-
project: 'your-gcp-project',
|
|
211
|
-
location: 'us-central1', // Optional, defaults to 'us-central1'
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
// Using service account key file
|
|
215
|
-
const voice = new GoogleVoice({
|
|
216
|
-
vertexAI: true,
|
|
217
|
-
project: 'your-gcp-project',
|
|
218
|
-
speechModel: {
|
|
219
|
-
keyFilename: '/path/to/service-account.json',
|
|
220
|
-
},
|
|
221
|
-
listeningModel: {
|
|
222
|
-
keyFilename: '/path/to/service-account.json',
|
|
223
|
-
},
|
|
224
|
-
})
|
|
225
|
-
|
|
226
|
-
// Using in-memory credentials
|
|
227
|
-
const voice = new GoogleVoice({
|
|
228
|
-
vertexAI: true,
|
|
229
|
-
project: 'your-gcp-project',
|
|
230
|
-
speechModel: {
|
|
231
|
-
credentials: {
|
|
232
|
-
client_email: 'service-account@project.iam.gserviceaccount.com',
|
|
233
|
-
private_key: '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
})
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
#### Required Permissions
|
|
240
|
-
|
|
241
|
-
#### IAM Roles
|
|
242
|
-
|
|
243
|
-
For Text-to-Speech:
|
|
244
|
-
|
|
245
|
-
- `roles/texttospeech.admin` - Text-to-Speech Admin (full access)
|
|
246
|
-
- `roles/texttospeech.editor` - Text-to-Speech Editor (create and manage)
|
|
247
|
-
- `roles/texttospeech.viewer` - Text-to-Speech Viewer (read-only)
|
|
248
|
-
|
|
249
|
-
For Speech-to-Text:
|
|
250
|
-
|
|
251
|
-
- `roles/speech.client` - Speech-to-Text Client
|
|
252
|
-
|
|
253
|
-
Grant `roles/speech.client` to the service account whose credentials the request presents (via `keyFilename`, `credentials`, or `GOOGLE_APPLICATION_CREDENTIALS`). This role is required for `listen({ v2: true })` specifically, not only for Vertex AI mode. Granting it to a user account has no effect on API-key-only requests, which carry no identity to authorize.
|
|
254
|
-
|
|
255
|
-
#### OAuth Scopes
|
|
256
|
-
|
|
257
|
-
For synchronous Text-to-Speech synthesis:
|
|
258
|
-
|
|
259
|
-
- `https://www.googleapis.com/auth/cloud-platform` - Full access to Google Cloud Platform services
|
|
260
|
-
|
|
261
|
-
For long-audio Text-to-Speech operations:
|
|
262
|
-
|
|
263
|
-
- `locations.longAudioSynthesize` - Create long-audio synthesis operations
|
|
264
|
-
- `operations.get` - Get operation status
|
|
265
|
-
- `operations.list` - List operations
|
|
266
|
-
|
|
267
|
-
## Important notes
|
|
268
|
-
|
|
269
|
-
1. **Authentication**: Either a Google Cloud API key (standard mode) or service account credentials (Vertex AI mode) is required.
|
|
270
|
-
|
|
271
|
-
2. **Environment Variables**:
|
|
272
|
-
|
|
273
|
-
- `GOOGLE_API_KEY` - API key for standard mode
|
|
274
|
-
- `GOOGLE_CLOUD_PROJECT` - Project ID for Vertex AI mode
|
|
275
|
-
- `GOOGLE_CLOUD_LOCATION` - Location for Vertex AI mode (defaults to 'us-central1')
|
|
276
|
-
- `GOOGLE_APPLICATION_CREDENTIALS` - Path to service account key file
|
|
277
|
-
|
|
278
|
-
3. The default voice is set to `'en-US-Casual-K'`.
|
|
279
|
-
|
|
280
|
-
4. Both text-to-speech and speech-to-text services use LINEAR16 as the default audio encoding.
|
|
281
|
-
|
|
282
|
-
5. The `speak()` method supports advanced audio configuration through the Google Cloud Text-to-Speech API.
|
|
283
|
-
|
|
284
|
-
6. The `listen()` method supports various recognition configurations through the Google Cloud Speech-to-Text API.
|
|
285
|
-
|
|
286
|
-
7. `listen({ v2: true })` requires service account credentials and `GOOGLE_CLOUD_PROJECT`; it fails with `PERMISSION_DENIED` when only `GOOGLE_API_KEY` is set. `speak()` and v1 `listen()` work with an API key alone.
|
|
287
|
-
|
|
288
|
-
8. Available voices can be filtered by language code using the `getSpeakers()` method.
|
|
289
|
-
|
|
290
|
-
9. Vertex AI mode provides enterprise features including IAM control, audit logs, and project-level billing.
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# Inworld
|
|
4
|
-
|
|
5
|
-
The Inworld voice implementation in Mastra provides streaming text-to-speech (TTS) and batch speech-to-text (STT) capabilities using Inworld AI's API. It supports multiple TTS and STT models, configurable audio encodings, and progressive audio streaming.
|
|
6
|
-
|
|
7
|
-
For real-time, full-duplex speech-to-speech, the same package exports [`InworldRealtimeVoice`](https://mastra.ai/reference/voice/inworld-realtime).
|
|
8
|
-
|
|
9
|
-
## Usage example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
import { InworldVoice } from '@mastra/voice-inworld'
|
|
13
|
-
|
|
14
|
-
// Initialize with default configuration (uses INWORLD_API_KEY environment variable)
|
|
15
|
-
const voice = new InworldVoice()
|
|
16
|
-
|
|
17
|
-
// Initialize with custom configuration
|
|
18
|
-
const voice = new InworldVoice({
|
|
19
|
-
speechModel: {
|
|
20
|
-
name: 'inworld-tts-2',
|
|
21
|
-
apiKey: 'your-api-key',
|
|
22
|
-
},
|
|
23
|
-
listeningModel: {
|
|
24
|
-
name: 'groq/whisper-large-v3',
|
|
25
|
-
apiKey: 'your-api-key',
|
|
26
|
-
},
|
|
27
|
-
speaker: 'Dennis',
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
// Text-to-Speech (streaming)
|
|
31
|
-
const audioStream = await voice.speak('Hello, world!')
|
|
32
|
-
|
|
33
|
-
// Speech-to-Text
|
|
34
|
-
const transcript = await voice.listen(audioStream)
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Constructor parameters
|
|
38
|
-
|
|
39
|
-
**speechModel** (`InworldVoiceConfig`): Configuration for text-to-speech functionality. (Default: `{ name: 'inworld-tts-2' }`)
|
|
40
|
-
|
|
41
|
-
**speechModel.name** (`'inworld-tts-2' | 'inworld-tts-1.5-max' | 'inworld-tts-1.5-mini'`): The Inworld TTS model to use.
|
|
42
|
-
|
|
43
|
-
**speechModel.apiKey** (`string`): Inworld API key. Falls back to INWORLD\_API\_KEY environment variable.
|
|
44
|
-
|
|
45
|
-
**listeningModel** (`InworldListeningConfig`): Configuration for speech-to-text functionality. (Default: `{ name: 'groq/whisper-large-v3' }`)
|
|
46
|
-
|
|
47
|
-
**listeningModel.name** (`'groq/whisper-large-v3'`): The Inworld STT model to use.
|
|
48
|
-
|
|
49
|
-
**listeningModel.apiKey** (`string`): Inworld API key. Falls back to INWORLD\_API\_KEY environment variable.
|
|
50
|
-
|
|
51
|
-
**speaker** (`string`): Default voice ID to use for text-to-speech. (Default: `'Dennis'`)
|
|
52
|
-
|
|
53
|
-
**audioEncoding** (`'LINEAR16' | 'MP3' | 'OGG_OPUS' | 'ALAW' | 'MULAW' | 'FLAC' | 'PCM' | 'WAV'`): Default audio encoding for TTS output. (Default: `'MP3'`)
|
|
54
|
-
|
|
55
|
-
**sampleRateHertz** (`number`): Default sample rate for TTS output. (Default: `48000`)
|
|
56
|
-
|
|
57
|
-
**language** (`string`): Default BCP-47 language code for STT. (Default: `'en-US'`)
|
|
58
|
-
|
|
59
|
-
## Methods
|
|
60
|
-
|
|
61
|
-
### `speak(input, options?)`
|
|
62
|
-
|
|
63
|
-
Converts text to speech using Inworld's streaming TTS endpoint. Returns a readable stream that emits audio chunks progressively as they arrive.
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
const audioStream = await voice.speak('Hello, world!', {
|
|
67
|
-
speaker: 'Olivia',
|
|
68
|
-
audioEncoding: 'WAV',
|
|
69
|
-
sampleRateHertz: 24000,
|
|
70
|
-
speakingRate: 1.2,
|
|
71
|
-
temperature: 0.8,
|
|
72
|
-
})
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
|
|
76
|
-
|
|
77
|
-
**options** (`InworldSpeakOptions`): Additional options for speech synthesis.
|
|
78
|
-
|
|
79
|
-
**options.speaker** (`string`): Override the default speaker for this request.
|
|
80
|
-
|
|
81
|
-
**options.audioEncoding** (`AudioEncoding`): Override the default audio encoding.
|
|
82
|
-
|
|
83
|
-
**options.sampleRateHertz** (`number`): Override the default sample rate.
|
|
84
|
-
|
|
85
|
-
**options.speakingRate** (`number`): Adjust the speaking rate.
|
|
86
|
-
|
|
87
|
-
**options.temperature** (`number`): Controls voice variability. Honored on inworld-tts-1.5-\* models; ignored by inworld-tts-2.
|
|
88
|
-
|
|
89
|
-
**options.deliveryMode** (`'STABLE' | 'BALANCED' | 'CREATIVE'`): Steering control for delivery style. Only honored by inworld-tts-2.
|
|
90
|
-
|
|
91
|
-
**options.language** (`string`): BCP-47 language code for this request. Auto-detected when omitted.
|
|
92
|
-
|
|
93
|
-
**Returns:** `Promise<NodeJS.ReadableStream>`
|
|
94
|
-
|
|
95
|
-
### `listen(input, options?)`
|
|
96
|
-
|
|
97
|
-
Converts speech to text using Inworld's batch STT endpoint.
|
|
98
|
-
|
|
99
|
-
```typescript
|
|
100
|
-
const transcript = await voice.listen(audioStream, {
|
|
101
|
-
audioEncoding: 'MP3',
|
|
102
|
-
sampleRateHertz: 44100,
|
|
103
|
-
language: 'ja-JP',
|
|
104
|
-
})
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**input** (`NodeJS.ReadableStream`): Audio stream to transcribe.
|
|
108
|
-
|
|
109
|
-
**options** (`InworldListenOptions`): Additional options for transcription.
|
|
110
|
-
|
|
111
|
-
**options.audioEncoding** (`'LINEAR16' | 'MP3' | 'OGG_OPUS' | 'FLAC' | 'AUTO_DETECT'`): Audio encoding of the input stream.
|
|
112
|
-
|
|
113
|
-
**options.sampleRateHertz** (`number`): Sample rate of the input audio.
|
|
114
|
-
|
|
115
|
-
**options.language** (`string`): BCP-47 language code for transcription.
|
|
116
|
-
|
|
117
|
-
**options.numberOfChannels** (`number`): Number of audio channels in the input.
|
|
118
|
-
|
|
119
|
-
**Returns:** `Promise<string>`
|
|
120
|
-
|
|
121
|
-
### `getSpeakers()`
|
|
122
|
-
|
|
123
|
-
Returns a list of available voices from the Inworld API.
|
|
124
|
-
|
|
125
|
-
```typescript
|
|
126
|
-
const speakers = await voice.getSpeakers()
|
|
127
|
-
// [{ voiceId: 'Dennis', name: 'Dennis', language: 'en', description: '...', tags: ['friendly'], source: 'SYSTEM' }, ...]
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
**Returns:** `Promise<Array<{ voiceId: string; name: string; language: string; description: string; tags: string[]; source: string }>>`
|
|
131
|
-
|
|
132
|
-
## Notes
|
|
133
|
-
|
|
134
|
-
- The TTS endpoint uses progressive NDJSON streaming, so audio playback can begin before the full response is received.
|
|
135
|
-
- An API key can be provided via the `speechModel` or `listeningModel` config, or the `INWORLD_API_KEY` environment variable. TTS and STT keys are resolved independently: passing distinct `speechModel.apiKey` and `listeningModel.apiKey` values lets each service use its own credential. If only one is provided, it's reused for both services as a fallback before the env var.
|
|
136
|
-
- `inworld-tts-2` is the default flagship model. Use `deliveryMode` (`STABLE` | `BALANCED` | `CREATIVE`) to steer delivery style on this model. The `temperature` option is ignored on `inworld-tts-2`.
|
|
137
|
-
- The `inworld-tts-1.5-mini` model offers lower latency at the cost of reduced voice quality compared to `inworld-tts-1.5-max`.
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# OpenAI
|
|
4
|
-
|
|
5
|
-
The OpenAIVoice class in Mastra provides text-to-speech and speech-to-text capabilities using OpenAI's models.
|
|
6
|
-
|
|
7
|
-
## Usage example
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
import { OpenAIVoice } from '@mastra/voice-openai'
|
|
11
|
-
|
|
12
|
-
// Initialize with default configuration using environment variables
|
|
13
|
-
const voice = new OpenAIVoice()
|
|
14
|
-
|
|
15
|
-
// Or initialize with specific configuration
|
|
16
|
-
const voiceWithConfig = new OpenAIVoice({
|
|
17
|
-
speechModel: {
|
|
18
|
-
name: 'tts-1-hd',
|
|
19
|
-
apiKey: 'your-openai-api-key',
|
|
20
|
-
},
|
|
21
|
-
listeningModel: {
|
|
22
|
-
name: 'whisper-1',
|
|
23
|
-
apiKey: 'your-openai-api-key',
|
|
24
|
-
},
|
|
25
|
-
speaker: 'alloy', // Default voice
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
// Convert text to speech
|
|
29
|
-
const audioStream = await voice.speak('Hello, how can I help you?', {
|
|
30
|
-
speaker: 'nova', // Override default voice
|
|
31
|
-
speed: 1.2, // Adjust speech speed
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
// Convert speech to text
|
|
35
|
-
const text = await voice.listen(audioStream, {
|
|
36
|
-
filetype: 'mp3',
|
|
37
|
-
})
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Configuration
|
|
41
|
-
|
|
42
|
-
### Constructor options
|
|
43
|
-
|
|
44
|
-
**speechModel** (`OpenAIConfig`): Configuration for text-to-speech synthesis. (Default: `{ name: 'tts-1' }`)
|
|
45
|
-
|
|
46
|
-
**speechModel.name** (`'tts-1' | 'tts-1-hd' | 'whisper-1'`): Model name. Use 'tts-1-hd' for higher quality audio.
|
|
47
|
-
|
|
48
|
-
**speechModel.apiKey** (`string`): OpenAI API key. Falls back to OPENAI\_API\_KEY environment variable.
|
|
49
|
-
|
|
50
|
-
**listeningModel** (`OpenAIConfig`): Configuration for speech-to-text recognition. (Default: `{ name: 'whisper-1' }`)
|
|
51
|
-
|
|
52
|
-
**listeningModel.name** (`'tts-1' | 'tts-1-hd' | 'whisper-1'`): Model name. Use 'tts-1-hd' for higher quality audio.
|
|
53
|
-
|
|
54
|
-
**listeningModel.apiKey** (`string`): OpenAI API key. Falls back to OPENAI\_API\_KEY environment variable.
|
|
55
|
-
|
|
56
|
-
**speaker** (`OpenAIVoiceId`): Default voice ID for speech synthesis. (Default: `'alloy'`)
|
|
57
|
-
|
|
58
|
-
## Methods
|
|
59
|
-
|
|
60
|
-
### `speak()`
|
|
61
|
-
|
|
62
|
-
Converts text to speech using OpenAI's text-to-speech models.
|
|
63
|
-
|
|
64
|
-
**input** (`string | NodeJS.ReadableStream`): Text or text stream to convert to speech.
|
|
65
|
-
|
|
66
|
-
**options** (`Options`): Configuration options.
|
|
67
|
-
|
|
68
|
-
**options.speaker** (`OpenAIVoiceId`): Voice ID to use for speech synthesis.
|
|
69
|
-
|
|
70
|
-
**options.speed** (`number`): Speech speed multiplier.
|
|
71
|
-
|
|
72
|
-
Returns: `Promise<NodeJS.ReadableStream>`
|
|
73
|
-
|
|
74
|
-
### `listen()`
|
|
75
|
-
|
|
76
|
-
Transcribes audio using OpenAI's Whisper model.
|
|
77
|
-
|
|
78
|
-
**audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe.
|
|
79
|
-
|
|
80
|
-
**options** (`Options`): Configuration options.
|
|
81
|
-
|
|
82
|
-
**options.filetype** (`string`): Audio format of the input stream.
|
|
83
|
-
|
|
84
|
-
Returns: `Promise<string>`
|
|
85
|
-
|
|
86
|
-
### `getSpeakers()`
|
|
87
|
-
|
|
88
|
-
Returns an array of available voice options, where each node contains:
|
|
89
|
-
|
|
90
|
-
**voiceId** (`string`): Unique identifier for the voice
|
|
91
|
-
|
|
92
|
-
## Notes
|
|
93
|
-
|
|
94
|
-
- API keys can be provided via constructor options or the `OPENAI_API_KEY` environment variable
|
|
95
|
-
- The `tts-1-hd` model provides higher quality audio but may have slower processing times
|
|
96
|
-
- Speech recognition supports multiple audio formats including mp3, wav, and webm
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
|
-
|
|
3
|
-
# PlayAI
|
|
4
|
-
|
|
5
|
-
The PlayAI voice implementation in Mastra provides text-to-speech capabilities using PlayAI's API.
|
|
6
|
-
|
|
7
|
-
## Usage example
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
import { PlayAIVoice } from '@mastra/voice-playai'
|
|
11
|
-
|
|
12
|
-
// Initialize with default configuration (uses PLAYAI_API_KEY environment variable and PLAYAI_USER_ID environment variable)
|
|
13
|
-
const voice = new PlayAIVoice()
|
|
14
|
-
|
|
15
|
-
// Initialize with default configuration
|
|
16
|
-
const voice = new PlayAIVoice({
|
|
17
|
-
speechModel: {
|
|
18
|
-
name: 'PlayDialog',
|
|
19
|
-
apiKey: process.env.PLAYAI_API_KEY,
|
|
20
|
-
userId: process.env.PLAYAI_USER_ID,
|
|
21
|
-
},
|
|
22
|
-
speaker: 'Angelo', // Default voice
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
// Convert text to speech with a specific voice
|
|
26
|
-
const audioStream = await voice.speak('Hello, world!', {
|
|
27
|
-
speaker:
|
|
28
|
-
's3://voice-cloning-zero-shot/b27bc13e-996f-4841-b584-4d35801aea98/original/manifest.json', // Dexter voice
|
|
29
|
-
})
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Constructor parameters
|
|
33
|
-
|
|
34
|
-
**speechModel** (`PlayAIConfig`): Configuration for text-to-speech functionality (Default: `{ name: 'PlayDialog' }`)
|
|
35
|
-
|
|
36
|
-
**speechModel.name** (`'PlayDialog' | 'Play3.0-mini'`): The PlayAI model to use
|
|
37
|
-
|
|
38
|
-
**speechModel.apiKey** (`string`): PlayAI API key. Falls back to PLAYAI\_API\_KEY environment variable
|
|
39
|
-
|
|
40
|
-
**speechModel.userId** (`string`): PlayAI user ID. Falls back to PLAYAI\_USER\_ID environment variable
|
|
41
|
-
|
|
42
|
-
**speaker** (`string`): Default voice ID to use for speech synthesis (Default: `First available voice ID`)
|
|
43
|
-
|
|
44
|
-
## Methods
|
|
45
|
-
|
|
46
|
-
### `speak()`
|
|
47
|
-
|
|
48
|
-
Converts text to speech using the configured speech model and voice.
|
|
49
|
-
|
|
50
|
-
**input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
|
|
51
|
-
|
|
52
|
-
**options** (`Options`): Configuration options.
|
|
53
|
-
|
|
54
|
-
**options.speaker** (`string`): Override the default speaker for this request
|
|
55
|
-
|
|
56
|
-
Returns: `Promise<NodeJS.ReadableStream>`.
|
|
57
|
-
|
|
58
|
-
### `getSpeakers()`
|
|
59
|
-
|
|
60
|
-
Returns an array of available voice options, where each node contains:
|
|
61
|
-
|
|
62
|
-
**name** (`string`): Name of the voice
|
|
63
|
-
|
|
64
|
-
**accent** (`string`): Accent of the voice (e.g., 'US', 'British', 'Australian')
|
|
65
|
-
|
|
66
|
-
**gender** (`'M' | 'F'`): Gender of the voice
|
|
67
|
-
|
|
68
|
-
**age** (`'Young' | 'Middle' | 'Old'`): Age category of the voice
|
|
69
|
-
|
|
70
|
-
**style** (`'Conversational' | 'Narrative'`): Speaking style of the voice
|
|
71
|
-
|
|
72
|
-
**voiceId** (`string`): Unique identifier for the voice
|
|
73
|
-
|
|
74
|
-
### `listen()`
|
|
75
|
-
|
|
76
|
-
This method isn't supported by PlayAI and will throw an error. PlayAI doesn't provide speech-to-text functionality.
|
|
77
|
-
|
|
78
|
-
## Notes
|
|
79
|
-
|
|
80
|
-
- PlayAI requires both an API key and a user ID for authentication
|
|
81
|
-
- The service offers two models: 'PlayDialog' and 'Play3.0-mini'
|
|
82
|
-
- Each voice has a unique S3 manifest ID that must be used when making API calls
|