@mastra/mcp-docs-server 1.1.8 → 1.1.9-alpha.1
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/adding-voice.md +4 -4
- package/.docs/docs/agents/agent-approval.md +3 -3
- package/.docs/docs/agents/agent-memory.md +3 -3
- package/.docs/docs/agents/guardrails.md +3 -3
- package/.docs/docs/agents/network-approval.md +5 -2
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/processors.md +42 -24
- package/.docs/docs/agents/structured-output.md +2 -2
- package/.docs/docs/agents/supervisor-agents.md +3 -3
- package/.docs/docs/agents/using-tools.md +3 -3
- package/.docs/docs/build-with-ai/mcp-docs-server.md +5 -5
- package/.docs/docs/build-with-ai/skills.md +2 -2
- package/.docs/docs/community/contributing-templates.md +1 -1
- package/.docs/docs/community/discord.md +3 -3
- package/.docs/docs/community/licensing.md +2 -2
- package/.docs/docs/deployment/cloud-providers.md +2 -2
- package/.docs/docs/deployment/mastra-server.md +2 -2
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/studio.md +3 -3
- package/.docs/docs/deployment/web-framework.md +2 -2
- package/.docs/docs/deployment/workflow-runners.md +1 -1
- package/.docs/docs/evals/built-in-scorers.md +1 -1
- package/.docs/docs/evals/custom-scorers.md +6 -6
- package/.docs/docs/evals/overview.md +2 -2
- package/.docs/docs/evals/running-in-ci.md +6 -6
- package/.docs/docs/getting-started/build-with-ai.md +3 -3
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/getting-started/project-structure.md +2 -2
- package/.docs/docs/index.md +63 -17
- package/.docs/docs/mastra-cloud/deployment.md +1 -1
- package/.docs/docs/mastra-cloud/studio.md +1 -1
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/mcp/publishing-mcp-server.md +4 -4
- package/.docs/docs/memory/memory-processors.md +9 -9
- package/.docs/docs/memory/message-history.md +4 -4
- package/.docs/docs/memory/observational-memory.md +11 -7
- package/.docs/docs/memory/semantic-recall.md +9 -9
- package/.docs/docs/memory/storage.md +1 -1
- package/.docs/docs/memory/working-memory.md +20 -20
- package/.docs/docs/observability/datasets/overview.md +1 -1
- package/.docs/docs/observability/datasets/running-experiments.md +1 -1
- package/.docs/docs/observability/logging.md +1 -1
- package/.docs/docs/observability/overview.md +5 -5
- package/.docs/docs/observability/tracing/bridges/otel.md +9 -9
- package/.docs/docs/observability/tracing/exporters/arize.md +3 -3
- package/.docs/docs/observability/tracing/exporters/braintrust.md +1 -1
- package/.docs/docs/observability/tracing/exporters/cloud.md +2 -2
- package/.docs/docs/observability/tracing/exporters/datadog.md +3 -3
- package/.docs/docs/observability/tracing/exporters/default.md +8 -8
- package/.docs/docs/observability/tracing/exporters/laminar.md +1 -1
- package/.docs/docs/observability/tracing/exporters/langfuse.md +3 -3
- package/.docs/docs/observability/tracing/exporters/langsmith.md +4 -4
- package/.docs/docs/observability/tracing/exporters/otel.md +8 -8
- package/.docs/docs/observability/tracing/exporters/posthog.md +2 -2
- package/.docs/docs/observability/tracing/exporters/sentry.md +4 -4
- package/.docs/docs/observability/tracing/overview.md +24 -24
- package/.docs/docs/observability/tracing/processors/sensitive-data-filter.md +13 -13
- package/.docs/docs/rag/chunking-and-embedding.md +5 -5
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +4 -4
- package/.docs/docs/rag/vector-databases.md +13 -13
- package/.docs/docs/server/auth/auth0.md +2 -2
- package/.docs/docs/server/auth/clerk.md +1 -1
- package/.docs/docs/server/auth/composite-auth.md +9 -9
- package/.docs/docs/server/auth/custom-auth-provider.md +12 -12
- package/.docs/docs/server/auth/firebase.md +3 -3
- package/.docs/docs/server/auth/jwt.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +9 -9
- package/.docs/docs/server/auth/supabase.md +1 -1
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/auth.md +2 -2
- package/.docs/docs/server/custom-adapters.md +7 -7
- package/.docs/docs/server/custom-api-routes.md +2 -2
- package/.docs/docs/server/mastra-client.md +2 -2
- package/.docs/docs/server/mastra-server.md +2 -2
- package/.docs/docs/server/request-context.md +2 -2
- package/.docs/docs/server/server-adapters.md +3 -3
- package/.docs/docs/streaming/events.md +2 -2
- package/.docs/docs/streaming/overview.md +2 -2
- package/.docs/docs/streaming/tool-streaming.md +46 -32
- package/.docs/docs/streaming/workflow-streaming.md +1 -1
- package/.docs/docs/voice/overview.md +3 -3
- package/.docs/docs/voice/speech-to-speech.md +1 -1
- package/.docs/docs/voice/speech-to-text.md +2 -2
- package/.docs/docs/voice/text-to-speech.md +2 -2
- package/.docs/docs/workflows/agents-and-tools.md +1 -1
- package/.docs/docs/workflows/control-flow.md +45 -3
- package/.docs/docs/workflows/error-handling.md +4 -4
- package/.docs/docs/workflows/overview.md +3 -3
- package/.docs/docs/workflows/snapshots.md +1 -1
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +3 -3
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +3 -3
- package/.docs/docs/workspace/overview.md +53 -8
- package/.docs/docs/workspace/sandbox.md +72 -13
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +4 -4
- package/.docs/guides/build-your-ui/ai-sdk-ui.md +2 -2
- package/.docs/guides/build-your-ui/assistant-ui.md +1 -1
- package/.docs/guides/build-your-ui/copilotkit.md +2 -2
- package/.docs/guides/deployment/digital-ocean.md +1 -1
- package/.docs/guides/deployment/inngest.md +4 -4
- package/.docs/guides/getting-started/astro.md +1 -1
- package/.docs/guides/getting-started/electron.md +1 -1
- package/.docs/guides/getting-started/next-js.md +1 -1
- package/.docs/guides/getting-started/vite-react.md +1 -1
- package/.docs/guides/guide/ai-recruiter.md +4 -4
- package/.docs/guides/guide/chef-michel.md +4 -4
- package/.docs/guides/guide/code-review-bot.md +3 -3
- package/.docs/guides/guide/dev-assistant.md +5 -5
- package/.docs/guides/guide/docs-manager.md +3 -3
- package/.docs/guides/guide/github-actions-pr-description.md +4 -4
- package/.docs/guides/guide/notes-mcp-server.md +4 -4
- package/.docs/guides/guide/research-assistant.md +4 -4
- package/.docs/guides/guide/research-coordinator.md +1 -1
- package/.docs/guides/guide/stock-agent.md +6 -6
- package/.docs/guides/guide/web-search.md +2 -2
- package/.docs/guides/guide/whatsapp-chat-bot.md +1 -1
- package/.docs/guides/migrations/agentnetwork.md +1 -1
- package/.docs/guides/migrations/ai-sdk-v4-to-v5.md +3 -3
- package/.docs/guides/migrations/network-to-supervisor.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/agent.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/client.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/deployment.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/evals.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/mastra.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/memory.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +4 -4
- package/.docs/guides/migrations/upgrade-to-v1/tools.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/tracing.md +2 -2
- package/.docs/guides/migrations/upgrade-to-v1/vectors.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/voice.md +1 -1
- package/.docs/guides/migrations/upgrade-to-v1/workflows.md +6 -6
- package/.docs/guides/migrations/vnext-to-standard-apis.md +3 -3
- package/.docs/models/embeddings.md +4 -4
- package/.docs/models/gateways/custom-gateways.md +4 -4
- package/.docs/models/gateways/netlify.md +2 -3
- package/.docs/models/gateways/openrouter.md +9 -2
- package/.docs/models/gateways/vercel.md +11 -2
- package/.docs/models/gateways.md +2 -2
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/302ai.md +3 -3
- package/.docs/models/providers/abacus.md +24 -14
- package/.docs/models/providers/aihubmix.md +10 -5
- package/.docs/models/providers/alibaba-cn.md +83 -74
- package/.docs/models/providers/alibaba-coding-plan-cn.md +78 -0
- package/.docs/models/providers/alibaba-coding-plan.md +78 -0
- package/.docs/models/providers/alibaba.md +3 -3
- package/.docs/models/providers/anthropic.md +4 -4
- package/.docs/models/providers/bailing.md +3 -3
- package/.docs/models/providers/baseten.md +3 -3
- package/.docs/models/providers/berget.md +3 -3
- package/.docs/models/providers/cerebras.md +4 -4
- package/.docs/models/providers/chutes.md +7 -6
- package/.docs/models/providers/clarifai.md +81 -0
- package/.docs/models/providers/cloudferro-sherlock.md +8 -7
- package/.docs/models/providers/cloudflare-workers-ai.md +6 -5
- package/.docs/models/providers/cortecs.md +10 -8
- package/.docs/models/providers/deepinfra.md +11 -6
- package/.docs/models/providers/deepseek.md +4 -4
- package/.docs/models/providers/drun.md +73 -0
- package/.docs/models/providers/evroc.md +3 -3
- package/.docs/models/providers/fastrouter.md +3 -3
- package/.docs/models/providers/fireworks-ai.md +3 -3
- package/.docs/models/providers/firmware.md +31 -23
- package/.docs/models/providers/friendli.md +3 -3
- package/.docs/models/providers/github-models.md +3 -3
- package/.docs/models/providers/google.md +7 -5
- package/.docs/models/providers/groq.md +4 -4
- package/.docs/models/providers/helicone.md +3 -3
- package/.docs/models/providers/huggingface.md +3 -3
- package/.docs/models/providers/iflowcn.md +3 -3
- package/.docs/models/providers/inception.md +7 -5
- package/.docs/models/providers/inference.md +3 -3
- package/.docs/models/providers/io-net.md +3 -3
- package/.docs/models/providers/jiekou.md +3 -3
- package/.docs/models/providers/kilo.md +6 -4
- package/.docs/models/providers/kimi-for-coding.md +4 -4
- package/.docs/models/providers/kuae-cloud-coding-plan.md +3 -3
- package/.docs/models/providers/llama.md +3 -3
- package/.docs/models/providers/lmstudio.md +3 -3
- package/.docs/models/providers/lucidquery.md +3 -3
- package/.docs/models/providers/meganova.md +3 -3
- package/.docs/models/providers/minimax-cn-coding-plan.md +4 -4
- package/.docs/models/providers/minimax-cn.md +4 -4
- package/.docs/models/providers/minimax-coding-plan.md +4 -4
- package/.docs/models/providers/minimax.md +4 -4
- package/.docs/models/providers/mistral.md +4 -4
- package/.docs/models/providers/moark.md +3 -3
- package/.docs/models/providers/modelscope.md +3 -3
- package/.docs/models/providers/moonshotai-cn.md +3 -3
- package/.docs/models/providers/moonshotai.md +3 -3
- package/.docs/models/providers/morph.md +3 -3
- package/.docs/models/providers/nano-gpt.md +523 -42
- package/.docs/models/providers/nebius.md +37 -37
- package/.docs/models/providers/nova.md +3 -3
- package/.docs/models/providers/novita-ai.md +3 -3
- package/.docs/models/providers/nvidia.md +7 -5
- package/.docs/models/providers/ollama-cloud.md +4 -5
- package/.docs/models/providers/openai.md +7 -5
- package/.docs/models/providers/opencode-go.md +3 -3
- package/.docs/models/providers/opencode.md +39 -36
- package/.docs/models/providers/ovhcloud.md +3 -3
- package/.docs/models/providers/perplexity-agent.md +4 -4
- package/.docs/models/providers/perplexity.md +4 -4
- package/.docs/models/providers/poe.md +11 -5
- package/.docs/models/providers/privatemode-ai.md +3 -3
- package/.docs/models/providers/qihang-ai.md +3 -3
- package/.docs/models/providers/qiniu-ai.md +23 -8
- package/.docs/models/providers/requesty.md +20 -4
- package/.docs/models/providers/scaleway.md +3 -3
- package/.docs/models/providers/siliconflow-cn.md +10 -4
- package/.docs/models/providers/siliconflow.md +3 -3
- package/.docs/models/providers/stackit.md +3 -3
- package/.docs/models/providers/stepfun.md +3 -3
- package/.docs/models/providers/submodel.md +3 -3
- package/.docs/models/providers/synthetic.md +3 -3
- package/.docs/models/providers/togetherai.md +5 -7
- package/.docs/models/providers/upstage.md +3 -3
- package/.docs/models/providers/vivgrid.md +4 -4
- package/.docs/models/providers/vultr.md +3 -3
- package/.docs/models/providers/wandb.md +3 -3
- package/.docs/models/providers/xai.md +34 -31
- package/.docs/models/providers/xiaomi.md +4 -4
- package/.docs/models/providers/zai-coding-plan.md +3 -3
- package/.docs/models/providers/zai.md +3 -3
- package/.docs/models/providers/zenmux.md +7 -5
- package/.docs/models/providers/zhipuai-coding-plan.md +3 -3
- package/.docs/models/providers/zhipuai.md +3 -3
- package/.docs/models/providers.md +4 -0
- package/.docs/reference/agents/agent.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/getDefaultGenerateOptions.md +1 -1
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/getDescription.md +1 -1
- package/.docs/reference/agents/network.md +5 -3
- package/.docs/reference/ai-sdk/handle-chat-stream.md +2 -0
- package/.docs/reference/ai-sdk/handle-network-stream.md +2 -0
- package/.docs/reference/ai-sdk/network-route.md +2 -0
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v4-messages.md +1 -1
- package/.docs/reference/ai-sdk/to-ai-sdk-v5-messages.md +1 -1
- package/.docs/reference/auth/auth0.md +7 -7
- package/.docs/reference/auth/better-auth.md +2 -2
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +5 -5
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +6 -6
- package/.docs/reference/cli/mastra.md +5 -5
- package/.docs/reference/client-js/agents.md +22 -22
- package/.docs/reference/client-js/error-handling.md +2 -2
- package/.docs/reference/client-js/logs.md +2 -2
- package/.docs/reference/client-js/mastra-client.md +2 -2
- package/.docs/reference/client-js/memory.md +6 -6
- package/.docs/reference/client-js/observability.md +4 -4
- package/.docs/reference/client-js/telemetry.md +1 -1
- package/.docs/reference/client-js/tools.md +3 -3
- package/.docs/reference/client-js/vectors.md +2 -2
- package/.docs/reference/client-js/workflows.md +12 -12
- package/.docs/reference/configuration.md +62 -6
- package/.docs/reference/core/getDeployer.md +1 -1
- package/.docs/reference/core/getGatewayById.md +1 -1
- package/.docs/reference/core/getLogger.md +1 -1
- package/.docs/reference/core/getMCPServer.md +2 -2
- package/.docs/reference/core/getMCPServerById.md +2 -2
- package/.docs/reference/core/getMemory.md +1 -1
- package/.docs/reference/core/getScorer.md +4 -4
- package/.docs/reference/core/getScorerById.md +2 -2
- package/.docs/reference/core/getServer.md +1 -1
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getStoredAgentById.md +3 -3
- package/.docs/reference/core/getTelemetry.md +1 -1
- package/.docs/reference/core/getWorkflow.md +1 -1
- package/.docs/reference/core/listAgents.md +1 -1
- package/.docs/reference/core/listMCPServers.md +3 -3
- package/.docs/reference/core/listMemory.md +1 -1
- package/.docs/reference/core/listScorers.md +1 -1
- package/.docs/reference/core/listStoredAgents.md +3 -3
- package/.docs/reference/core/listVectors.md +1 -1
- package/.docs/reference/core/mastra-class.md +2 -2
- package/.docs/reference/core/mastra-model-gateway.md +11 -11
- package/.docs/reference/core/setLogger.md +1 -1
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/datasets/dataset.md +2 -2
- package/.docs/reference/datasets/datasets-manager.md +1 -1
- package/.docs/reference/datasets/get.md +2 -2
- package/.docs/reference/datasets/getDetails.md +1 -1
- package/.docs/reference/datasets/listItems.md +1 -1
- package/.docs/reference/deployer/vercel.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +4 -4
- package/.docs/reference/evals/answer-similarity.md +3 -3
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/completeness.md +6 -6
- package/.docs/reference/evals/content-similarity.md +3 -3
- package/.docs/reference/evals/context-precision.md +9 -9
- package/.docs/reference/evals/context-relevance.md +7 -7
- package/.docs/reference/evals/create-scorer.md +7 -7
- package/.docs/reference/evals/faithfulness.md +3 -3
- package/.docs/reference/evals/hallucination.md +8 -14
- package/.docs/reference/evals/keyword-coverage.md +4 -4
- package/.docs/reference/evals/mastra-scorer.md +7 -7
- package/.docs/reference/evals/noise-sensitivity.md +11 -11
- package/.docs/reference/evals/prompt-alignment.md +5 -5
- package/.docs/reference/evals/run-evals.md +5 -5
- package/.docs/reference/evals/scorer-utils.md +17 -17
- package/.docs/reference/evals/textual-difference.md +4 -4
- package/.docs/reference/evals/tone-consistency.md +5 -5
- package/.docs/reference/evals/tool-call-accuracy.md +10 -10
- package/.docs/reference/evals/toxicity.md +3 -3
- package/.docs/reference/harness/harness-class.md +5 -3
- package/.docs/reference/index.md +2 -0
- package/.docs/reference/memory/clone-utilities.md +7 -7
- package/.docs/reference/memory/cloneThread.md +5 -5
- package/.docs/reference/memory/createThread.md +1 -1
- package/.docs/reference/memory/deleteMessages.md +1 -1
- package/.docs/reference/memory/getThreadById.md +1 -1
- package/.docs/reference/memory/listThreads.md +3 -3
- package/.docs/reference/memory/memory-class.md +1 -1
- package/.docs/reference/memory/observational-memory.md +8 -6
- package/.docs/reference/memory/recall.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +6 -6
- package/.docs/reference/observability/tracing/configuration.md +17 -17
- package/.docs/reference/observability/tracing/exporters/arize.md +4 -4
- package/.docs/reference/observability/tracing/exporters/braintrust.md +3 -3
- package/.docs/reference/observability/tracing/exporters/cloud-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/console-exporter.md +4 -4
- package/.docs/reference/observability/tracing/exporters/datadog.md +4 -4
- package/.docs/reference/observability/tracing/exporters/default-exporter.md +6 -6
- package/.docs/reference/observability/tracing/exporters/laminar.md +2 -2
- package/.docs/reference/observability/tracing/exporters/langfuse.md +4 -4
- package/.docs/reference/observability/tracing/exporters/langsmith.md +6 -6
- package/.docs/reference/observability/tracing/exporters/otel.md +12 -12
- package/.docs/reference/observability/tracing/exporters/posthog.md +3 -3
- package/.docs/reference/observability/tracing/exporters/sentry.md +5 -5
- package/.docs/reference/observability/tracing/instances.md +9 -9
- package/.docs/reference/observability/tracing/interfaces.md +39 -39
- package/.docs/reference/observability/tracing/processors/sensitive-data-filter.md +6 -6
- package/.docs/reference/observability/tracing/spans.md +15 -13
- package/.docs/reference/processors/message-history-processor.md +1 -1
- package/.docs/reference/processors/processor-interface.md +21 -17
- package/.docs/reference/processors/token-limiter-processor.md +2 -2
- package/.docs/reference/rag/chunk.md +2 -2
- package/.docs/reference/rag/database-config.md +8 -8
- package/.docs/reference/rag/document.md +11 -11
- package/.docs/reference/rag/embeddings.md +5 -5
- package/.docs/reference/rag/extract-params.md +8 -8
- package/.docs/reference/rag/graph-rag.md +4 -4
- package/.docs/reference/rag/metadata-filters.md +15 -15
- package/.docs/reference/rag/rerank.md +2 -2
- package/.docs/reference/rag/rerankWithScorer.md +2 -2
- package/.docs/reference/server/create-route.md +2 -0
- package/.docs/reference/server/express-adapter.md +1 -1
- package/.docs/reference/server/fastify-adapter.md +1 -1
- package/.docs/reference/server/hono-adapter.md +1 -1
- package/.docs/reference/server/koa-adapter.md +2 -2
- package/.docs/reference/server/mastra-server.md +16 -16
- package/.docs/reference/server/register-api-route.md +7 -7
- package/.docs/reference/server/routes.md +1 -1
- package/.docs/reference/storage/cloudflare-d1.md +5 -5
- package/.docs/reference/storage/cloudflare.md +3 -3
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/convex.md +6 -6
- package/.docs/reference/storage/dynamodb.md +7 -7
- package/.docs/reference/storage/lance.md +5 -5
- package/.docs/reference/storage/libsql.md +1 -1
- package/.docs/reference/storage/mongodb.md +6 -6
- package/.docs/reference/storage/mssql.md +4 -4
- package/.docs/reference/storage/overview.md +2 -2
- package/.docs/reference/storage/postgresql.md +7 -7
- package/.docs/reference/storage/upstash.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +13 -13
- package/.docs/reference/streaming/agents/MastraModelOutput.md +6 -6
- package/.docs/reference/streaming/agents/stream.md +2 -2
- package/.docs/reference/streaming/agents/streamLegacy.md +1 -1
- package/.docs/reference/streaming/workflows/observeStream.md +2 -2
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/streaming/workflows/stream.md +1 -1
- package/.docs/reference/templates/overview.md +4 -4
- package/.docs/reference/tools/create-tool.md +10 -10
- package/.docs/reference/tools/document-chunker-tool.md +4 -4
- package/.docs/reference/tools/graph-rag-tool.md +7 -7
- package/.docs/reference/tools/mcp-client.md +13 -13
- package/.docs/reference/tools/mcp-server.md +27 -27
- package/.docs/reference/tools/vector-query-tool.md +12 -12
- package/.docs/reference/vectors/astra.md +13 -13
- package/.docs/reference/vectors/chroma.md +18 -18
- package/.docs/reference/vectors/convex.md +15 -15
- package/.docs/reference/vectors/couchbase.md +21 -21
- package/.docs/reference/vectors/duckdb.md +17 -17
- package/.docs/reference/vectors/elasticsearch.md +14 -14
- package/.docs/reference/vectors/lance.md +22 -22
- package/.docs/reference/vectors/libsql.md +15 -15
- package/.docs/reference/vectors/mongodb.md +18 -18
- package/.docs/reference/vectors/opensearch.md +11 -11
- package/.docs/reference/vectors/pg.md +23 -21
- package/.docs/reference/vectors/pinecone.md +15 -15
- package/.docs/reference/vectors/qdrant.md +15 -15
- package/.docs/reference/vectors/s3vectors.md +22 -22
- package/.docs/reference/vectors/turbopuffer.md +14 -14
- package/.docs/reference/vectors/upstash.md +15 -15
- package/.docs/reference/vectors/vectorize.md +16 -16
- package/.docs/reference/voice/azure.md +12 -10
- package/.docs/reference/voice/cloudflare.md +9 -7
- package/.docs/reference/voice/composite-voice.md +5 -5
- package/.docs/reference/voice/deepgram.md +5 -5
- package/.docs/reference/voice/elevenlabs.md +7 -7
- package/.docs/reference/voice/google-gemini-live.md +22 -22
- package/.docs/reference/voice/google.md +12 -12
- package/.docs/reference/voice/mastra-voice.md +18 -18
- package/.docs/reference/voice/murf.md +8 -8
- package/.docs/reference/voice/openai-realtime.md +19 -17
- package/.docs/reference/voice/openai.md +12 -8
- package/.docs/reference/voice/playai.md +9 -7
- package/.docs/reference/voice/sarvam.md +8 -6
- package/.docs/reference/voice/speechify.md +11 -9
- package/.docs/reference/voice/voice.addInstructions.md +4 -4
- package/.docs/reference/voice/voice.addTools.md +3 -3
- package/.docs/reference/voice/voice.answer.md +2 -2
- package/.docs/reference/voice/voice.close.md +4 -4
- package/.docs/reference/voice/voice.connect.md +9 -7
- package/.docs/reference/voice/voice.events.md +4 -4
- package/.docs/reference/voice/voice.getSpeakers.md +4 -4
- package/.docs/reference/voice/voice.listen.md +17 -11
- package/.docs/reference/voice/voice.off.md +4 -4
- package/.docs/reference/voice/voice.on.md +5 -5
- package/.docs/reference/voice/voice.send.md +2 -2
- package/.docs/reference/voice/voice.speak.md +19 -9
- package/.docs/reference/voice/voice.updateConfig.md +4 -4
- package/.docs/reference/workflows/run-methods/startAsync.md +1 -1
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
- package/.docs/reference/workflows/run.md +3 -3
- package/.docs/reference/workflows/step.md +2 -2
- package/.docs/reference/workflows/workflow-methods/create-run.md +1 -1
- package/.docs/reference/workflows/workflow.md +1 -1
- package/.docs/reference/workspace/blaxel-sandbox.md +164 -0
- package/.docs/reference/workspace/daytona-sandbox.md +50 -141
- package/.docs/reference/workspace/e2b-sandbox.md +41 -77
- package/.docs/reference/workspace/filesystem.md +25 -11
- package/.docs/reference/workspace/gcs-filesystem.md +21 -1
- package/.docs/reference/workspace/local-filesystem.md +24 -10
- package/.docs/reference/workspace/local-sandbox.md +27 -102
- package/.docs/reference/workspace/process-manager.md +296 -0
- package/.docs/reference/workspace/s3-filesystem.md +21 -1
- package/.docs/reference/workspace/sandbox.md +9 -1
- package/.docs/reference/workspace/workspace-class.md +95 -27
- package/CHANGELOG.md +15 -0
- package/dist/tools/course.d.ts +7 -27
- package/dist/tools/course.d.ts.map +1 -1
- package/dist/tools/docs.d.ts +6 -18
- package/dist/tools/docs.d.ts.map +1 -1
- package/dist/tools/embedded-docs.d.ts +12 -112
- package/dist/tools/embedded-docs.d.ts.map +1 -1
- package/dist/tools/migration.d.ts +6 -26
- package/dist/tools/migration.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Murf voice implementation in Mastra provides text-to-speech (TTS) capabilities using Murf's AI voice service. It supports multiple voices across different languages.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { MurfVoice } from '@mastra/voice-murf'
|
|
@@ -43,7 +43,7 @@ const audioStream = await voice.speak('Hello, world!', {
|
|
|
43
43
|
const voices = await voice.getSpeakers()
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
## Constructor
|
|
46
|
+
## Constructor parameters
|
|
47
47
|
|
|
48
48
|
**speechModel** (`MurfConfig`): Configuration for text-to-speech functionality (Default: `{ name: 'GEN2' }`)
|
|
49
49
|
|
|
@@ -79,7 +79,7 @@ const voices = await voice.getSpeakers()
|
|
|
79
79
|
|
|
80
80
|
## Methods
|
|
81
81
|
|
|
82
|
-
### speak()
|
|
82
|
+
### `speak()`
|
|
83
83
|
|
|
84
84
|
Converts text to speech using Murf's API.
|
|
85
85
|
|
|
@@ -93,7 +93,7 @@ Converts text to speech using Murf's API.
|
|
|
93
93
|
|
|
94
94
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
95
95
|
|
|
96
|
-
### getSpeakers()
|
|
96
|
+
### `getSpeakers()`
|
|
97
97
|
|
|
98
98
|
Returns an array of available voice options, where each node contains:
|
|
99
99
|
|
|
@@ -105,14 +105,14 @@ Returns an array of available voice options, where each node contains:
|
|
|
105
105
|
|
|
106
106
|
**gender** (`string`): Gender of the voice
|
|
107
107
|
|
|
108
|
-
### listen()
|
|
108
|
+
### `listen()`
|
|
109
109
|
|
|
110
|
-
This method
|
|
110
|
+
This method isn't supported by Murf and will throw an error. Murf doesn't provide speech-to-text functionality.
|
|
111
111
|
|
|
112
|
-
## Important
|
|
112
|
+
## Important notes
|
|
113
113
|
|
|
114
114
|
1. A Murf API key is required. Set it via the `MURF_API_KEY` environment variable or pass it in the constructor.
|
|
115
115
|
2. The service uses GEN2 as the default model version.
|
|
116
116
|
3. Speech properties can be set at the constructor level and overridden per request.
|
|
117
117
|
4. The service supports extensive audio customization through properties like format, sample rate, and channel type.
|
|
118
|
-
5. Speech-to-text functionality
|
|
118
|
+
5. Speech-to-text functionality isn't supported.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# OpenAI Realtime
|
|
1
|
+
# OpenAI Realtime voice
|
|
2
2
|
|
|
3
3
|
The OpenAIRealtimeVoice class provides real-time voice interaction capabilities using OpenAI's WebSocket-based API. It supports real time speech to speech, voice activity detection, and event-based audio streaming.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
|
|
@@ -55,7 +55,7 @@ voice.connect()
|
|
|
55
55
|
|
|
56
56
|
## Configuration
|
|
57
57
|
|
|
58
|
-
### Constructor
|
|
58
|
+
### Constructor options
|
|
59
59
|
|
|
60
60
|
**model** (`string`): The model ID to use for real-time voice interactions. (Default: `'gpt-5.1-realtime-preview-2024-12-17'`)
|
|
61
61
|
|
|
@@ -75,23 +75,25 @@ voice.connect()
|
|
|
75
75
|
|
|
76
76
|
## Methods
|
|
77
77
|
|
|
78
|
-
### connect()
|
|
78
|
+
### `connect()`
|
|
79
79
|
|
|
80
|
-
Establishes a connection to the OpenAI
|
|
80
|
+
Establishes a connection to the OpenAI Realtime service. Must be called before using speak, listen, or send functions.
|
|
81
81
|
|
|
82
82
|
**returns** (`Promise<void>`): Promise that resolves when the connection is established.
|
|
83
83
|
|
|
84
|
-
### speak()
|
|
84
|
+
### `speak()`
|
|
85
85
|
|
|
86
86
|
Emits a speaking event using the configured voice model. Can accept either a string or a readable stream as input.
|
|
87
87
|
|
|
88
88
|
**input** (`string | NodeJS.ReadableStream`): Text or text stream to convert to speech.
|
|
89
89
|
|
|
90
|
-
**options
|
|
90
|
+
**options** (`Options`): Configuration options.
|
|
91
|
+
|
|
92
|
+
**options.speaker** (`string`): Voice ID to use for this specific speech request.
|
|
91
93
|
|
|
92
94
|
Returns: `Promise<void>`
|
|
93
95
|
|
|
94
|
-
### listen()
|
|
96
|
+
### `listen()`
|
|
95
97
|
|
|
96
98
|
Processes audio input for speech recognition. Takes a readable stream of audio data and emits a 'listening' event with the transcribed text.
|
|
97
99
|
|
|
@@ -99,7 +101,7 @@ Processes audio input for speech recognition. Takes a readable stream of audio d
|
|
|
99
101
|
|
|
100
102
|
Returns: `Promise<void>`
|
|
101
103
|
|
|
102
|
-
### send()
|
|
104
|
+
### `send()`
|
|
103
105
|
|
|
104
106
|
Streams audio data in real-time to the OpenAI service for continuous audio streaming scenarios like live microphone input.
|
|
105
107
|
|
|
@@ -107,7 +109,7 @@ Streams audio data in real-time to the OpenAI service for continuous audio strea
|
|
|
107
109
|
|
|
108
110
|
Returns: `Promise<void>`
|
|
109
111
|
|
|
110
|
-
### updateConfig()
|
|
112
|
+
### `updateConfig()`
|
|
111
113
|
|
|
112
114
|
Updates the session configuration for the voice instance. This can be used to modify voice settings, turn detection, and other parameters.
|
|
113
115
|
|
|
@@ -115,7 +117,7 @@ Updates the session configuration for the voice instance. This can be used to mo
|
|
|
115
117
|
|
|
116
118
|
Returns: `void`
|
|
117
119
|
|
|
118
|
-
### addTools()
|
|
120
|
+
### `addTools()`
|
|
119
121
|
|
|
120
122
|
Adds a set of tools to the voice instance. Tools allow the model to perform additional actions during conversations. When OpenAIRealtimeVoice is added to an Agent, any tools configured for the Agent will automatically be available to the voice interface.
|
|
121
123
|
|
|
@@ -123,19 +125,19 @@ Adds a set of tools to the voice instance. Tools allow the model to perform addi
|
|
|
123
125
|
|
|
124
126
|
Returns: `void`
|
|
125
127
|
|
|
126
|
-
### close()
|
|
128
|
+
### `close()`
|
|
127
129
|
|
|
128
|
-
Disconnects from the OpenAI
|
|
130
|
+
Disconnects from the OpenAI Realtime session and cleans up resources. Should be called when you're done with the voice instance.
|
|
129
131
|
|
|
130
132
|
Returns: `void`
|
|
131
133
|
|
|
132
|
-
### getSpeakers()
|
|
134
|
+
### `getSpeakers()`
|
|
133
135
|
|
|
134
136
|
Returns a list of available voice speakers.
|
|
135
137
|
|
|
136
138
|
Returns: `Promise<Array<{ voiceId: string; [key: string]: any }>>`
|
|
137
139
|
|
|
138
|
-
### on()
|
|
140
|
+
### `on()`
|
|
139
141
|
|
|
140
142
|
Registers an event listener for voice events.
|
|
141
143
|
|
|
@@ -145,7 +147,7 @@ Registers an event listener for voice events.
|
|
|
145
147
|
|
|
146
148
|
Returns: `void`
|
|
147
149
|
|
|
148
|
-
### off()
|
|
150
|
+
### `off()`
|
|
149
151
|
|
|
150
152
|
Removes a previously registered event listener.
|
|
151
153
|
|
|
@@ -179,7 +181,7 @@ You can also listen to [OpenAI Realtime utility events](https://github.com/opena
|
|
|
179
181
|
|
|
180
182
|
**openAIRealtime:conversation.item.completed** (`event`): Emitted when an item in the conversation is completed.
|
|
181
183
|
|
|
182
|
-
## Available
|
|
184
|
+
## Available voices
|
|
183
185
|
|
|
184
186
|
The following voice options are available:
|
|
185
187
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The OpenAIVoice class in Mastra provides text-to-speech and speech-to-text capabilities using OpenAI's models.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIVoice } from '@mastra/voice-openai'
|
|
@@ -37,7 +37,7 @@ const text = await voice.listen(audioStream, {
|
|
|
37
37
|
|
|
38
38
|
## Configuration
|
|
39
39
|
|
|
40
|
-
### Constructor
|
|
40
|
+
### Constructor options
|
|
41
41
|
|
|
42
42
|
**speechModel** (`OpenAIConfig`): Configuration for text-to-speech synthesis. (Default: `{ name: 'tts-1' }`)
|
|
43
43
|
|
|
@@ -55,29 +55,33 @@ const text = await voice.listen(audioStream, {
|
|
|
55
55
|
|
|
56
56
|
## Methods
|
|
57
57
|
|
|
58
|
-
### speak()
|
|
58
|
+
### `speak()`
|
|
59
59
|
|
|
60
60
|
Converts text to speech using OpenAI's text-to-speech models.
|
|
61
61
|
|
|
62
62
|
**input** (`string | NodeJS.ReadableStream`): Text or text stream to convert to speech.
|
|
63
63
|
|
|
64
|
-
**options
|
|
64
|
+
**options** (`Options`): Configuration options.
|
|
65
65
|
|
|
66
|
-
**options.
|
|
66
|
+
**options.speaker** (`OpenAIVoiceId`): Voice ID to use for speech synthesis.
|
|
67
|
+
|
|
68
|
+
**options.speed** (`number`): Speech speed multiplier.
|
|
67
69
|
|
|
68
70
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
69
71
|
|
|
70
|
-
### listen()
|
|
72
|
+
### `listen()`
|
|
71
73
|
|
|
72
74
|
Transcribes audio using OpenAI's Whisper model.
|
|
73
75
|
|
|
74
76
|
**audioStream** (`NodeJS.ReadableStream`): Audio stream to transcribe.
|
|
75
77
|
|
|
76
|
-
**options
|
|
78
|
+
**options** (`Options`): Configuration options.
|
|
79
|
+
|
|
80
|
+
**options.filetype** (`string`): Audio format of the input stream.
|
|
77
81
|
|
|
78
82
|
Returns: `Promise<string>`
|
|
79
83
|
|
|
80
|
-
### getSpeakers()
|
|
84
|
+
### `getSpeakers()`
|
|
81
85
|
|
|
82
86
|
Returns an array of available voice options, where each node contains:
|
|
83
87
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The PlayAI voice implementation in Mastra provides text-to-speech capabilities using PlayAI's API.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { PlayAIVoice } from '@mastra/voice-playai'
|
|
@@ -27,7 +27,7 @@ const audioStream = await voice.speak('Hello, world!', {
|
|
|
27
27
|
})
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
## Constructor
|
|
30
|
+
## Constructor parameters
|
|
31
31
|
|
|
32
32
|
**speechModel** (`PlayAIConfig`): Configuration for text-to-speech functionality (Default: `{ name: 'PlayDialog' }`)
|
|
33
33
|
|
|
@@ -41,17 +41,19 @@ const audioStream = await voice.speak('Hello, world!', {
|
|
|
41
41
|
|
|
42
42
|
## Methods
|
|
43
43
|
|
|
44
|
-
### speak()
|
|
44
|
+
### `speak()`
|
|
45
45
|
|
|
46
46
|
Converts text to speech using the configured speech model and voice.
|
|
47
47
|
|
|
48
48
|
**input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
|
|
49
49
|
|
|
50
|
-
**options
|
|
50
|
+
**options** (`Options`): Configuration options.
|
|
51
|
+
|
|
52
|
+
**options.speaker** (`string`): Override the default speaker for this request
|
|
51
53
|
|
|
52
54
|
Returns: `Promise<NodeJS.ReadableStream>`.
|
|
53
55
|
|
|
54
|
-
### getSpeakers()
|
|
56
|
+
### `getSpeakers()`
|
|
55
57
|
|
|
56
58
|
Returns an array of available voice options, where each node contains:
|
|
57
59
|
|
|
@@ -67,9 +69,9 @@ Returns an array of available voice options, where each node contains:
|
|
|
67
69
|
|
|
68
70
|
**voiceId** (`string`): Unique identifier for the voice
|
|
69
71
|
|
|
70
|
-
### listen()
|
|
72
|
+
### `listen()`
|
|
71
73
|
|
|
72
|
-
This method
|
|
74
|
+
This method isn't supported by PlayAI and will throw an error. PlayAI doesn't provide speech-to-text functionality.
|
|
73
75
|
|
|
74
76
|
## Notes
|
|
75
77
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The SarvamVoice class in Mastra provides text-to-speech and speech-to-text capabilities using Sarvam AI models.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { SarvamVoice } from '@mastra/voice-sarvam'
|
|
@@ -49,7 +49,7 @@ const text = await voice.listen(audioStream, {
|
|
|
49
49
|
|
|
50
50
|
## Configuration
|
|
51
51
|
|
|
52
|
-
### Constructor
|
|
52
|
+
### Constructor options
|
|
53
53
|
|
|
54
54
|
**speechModel** (`SarvamVoiceConfig`): Configuration for text-to-speech synthesis. (Default: `{ model: 'bulbul:v1', language: 'en-IN' }`)
|
|
55
55
|
|
|
@@ -87,17 +87,19 @@ const text = await voice.listen(audioStream, {
|
|
|
87
87
|
|
|
88
88
|
## Methods
|
|
89
89
|
|
|
90
|
-
### speak()
|
|
90
|
+
### `speak()`
|
|
91
91
|
|
|
92
92
|
Converts text to speech using Sarvam's text-to-speech models.
|
|
93
93
|
|
|
94
94
|
**input** (`string | NodeJS.ReadableStream`): Text or text stream to convert to speech.
|
|
95
95
|
|
|
96
|
-
**options
|
|
96
|
+
**options** (`Options`): Configuration options.
|
|
97
|
+
|
|
98
|
+
**options.speaker** (`SarvamVoiceId`): Voice ID to use for speech synthesis.
|
|
97
99
|
|
|
98
100
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
99
101
|
|
|
100
|
-
### listen()
|
|
102
|
+
### `listen()`
|
|
101
103
|
|
|
102
104
|
Transcribes audio using Sarvam's speech recognition models.
|
|
103
105
|
|
|
@@ -107,7 +109,7 @@ Transcribes audio using Sarvam's speech recognition models.
|
|
|
107
109
|
|
|
108
110
|
Returns: `Promise<string>`
|
|
109
111
|
|
|
110
|
-
### getSpeakers()
|
|
112
|
+
### `getSpeakers()`
|
|
111
113
|
|
|
112
114
|
Returns an array of available voice options.
|
|
113
115
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The Speechify voice implementation in Mastra provides text-to-speech capabilities using Speechify's API.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { SpeechifyVoice } from '@mastra/voice-speechify'
|
|
@@ -25,7 +25,7 @@ const audioStream = await voice.speak('Hello, world!', {
|
|
|
25
25
|
})
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
## Constructor
|
|
28
|
+
## Constructor parameters
|
|
29
29
|
|
|
30
30
|
**speechModel** (`SpeechifyConfig`): Configuration for text-to-speech functionality (Default: `{ name: 'simba-english' }`)
|
|
31
31
|
|
|
@@ -37,19 +37,21 @@ const audioStream = await voice.speak('Hello, world!', {
|
|
|
37
37
|
|
|
38
38
|
## Methods
|
|
39
39
|
|
|
40
|
-
### speak()
|
|
40
|
+
### `speak()`
|
|
41
41
|
|
|
42
42
|
Converts text to speech using the configured speech model and voice.
|
|
43
43
|
|
|
44
44
|
**input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
|
|
45
45
|
|
|
46
|
-
**options
|
|
46
|
+
**options** (`Options`): Configuration options.
|
|
47
47
|
|
|
48
|
-
**options.
|
|
48
|
+
**options.speaker** (`string`): Override the default speaker for this request
|
|
49
|
+
|
|
50
|
+
**options.model** (`VoiceModelName`): Override the default model for this request
|
|
49
51
|
|
|
50
52
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
51
53
|
|
|
52
|
-
### getSpeakers()
|
|
54
|
+
### `getSpeakers()`
|
|
53
55
|
|
|
54
56
|
Returns an array of available voice options, where each node contains:
|
|
55
57
|
|
|
@@ -61,13 +63,13 @@ Returns an array of available voice options, where each node contains:
|
|
|
61
63
|
|
|
62
64
|
**gender** (`string`): Gender of the voice
|
|
63
65
|
|
|
64
|
-
### listen()
|
|
66
|
+
### `listen()`
|
|
65
67
|
|
|
66
|
-
This method
|
|
68
|
+
This method isn't supported by Speechify and will throw an error. Speechify doesn't provide speech-to-text functionality.
|
|
67
69
|
|
|
68
70
|
## Notes
|
|
69
71
|
|
|
70
72
|
- Speechify requires an API key for authentication
|
|
71
73
|
- The default model is 'simba-english'
|
|
72
|
-
- Speech-to-text functionality
|
|
74
|
+
- Speech-to-text functionality isn't supported
|
|
73
75
|
- Additional audio stream options can be passed through the speak() method's options parameter
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `addInstructions()` method equips a voice provider with instructions that guide the model's behavior during real-time interactions. This is particularly useful for real-time voice providers that maintain context across a conversation.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
|
|
@@ -41,13 +41,13 @@ await voice.connect()
|
|
|
41
41
|
|
|
42
42
|
**instructions** (`string`): Instructions to guide the voice model's behavior
|
|
43
43
|
|
|
44
|
-
## Return
|
|
44
|
+
## Return value
|
|
45
45
|
|
|
46
|
-
This method
|
|
46
|
+
This method doesn't return a value.
|
|
47
47
|
|
|
48
48
|
## Notes
|
|
49
49
|
|
|
50
|
-
- Instructions are most effective when they
|
|
50
|
+
- Instructions are most effective when they're clear, specific, and relevant to the voice interaction
|
|
51
51
|
- This method is primarily used with real-time voice providers that maintain conversation context
|
|
52
52
|
- If called on a voice provider that doesn't support instructions, it will log a warning and do nothing
|
|
53
53
|
- Instructions added with this method are typically combined with any instructions provided by an associated Agent
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `addTools()` method equips a voice provider with tools (functions) that can be called by the model during real-time interactions. This enables voice assistants to perform actions like searching for information, making calculations, or interacting with external systems.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
|
|
@@ -52,9 +52,9 @@ await voice.connect()
|
|
|
52
52
|
|
|
53
53
|
**tools** (`ToolsInput`): Object containing tool definitions that can be called by the voice model
|
|
54
54
|
|
|
55
|
-
## Return
|
|
55
|
+
## Return value
|
|
56
56
|
|
|
57
|
-
This method
|
|
57
|
+
This method doesn't return a value.
|
|
58
58
|
|
|
59
59
|
## Notes
|
|
60
60
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `answer()` method is used in real-time voice providers to trigger the AI to generate a response. This method is particularly useful in speech-to-speech conversations where you need to explicitly signal the AI to respond after receiving user input.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
|
|
@@ -41,7 +41,7 @@ await voice.answer()
|
|
|
41
41
|
|
|
42
42
|
**options** (`Record<string, unknown>`): Provider-specific options for the response
|
|
43
43
|
|
|
44
|
-
## Return
|
|
44
|
+
## Return value
|
|
45
45
|
|
|
46
46
|
Returns a `Promise<void>` that resolves when the response has been triggered.
|
|
47
47
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `close()` method disconnects from a real-time voice service and cleans up resources. This is important for properly ending voice sessions and preventing resource leaks.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
|
|
@@ -36,11 +36,11 @@ setTimeout(() => {
|
|
|
36
36
|
|
|
37
37
|
## Parameters
|
|
38
38
|
|
|
39
|
-
This method
|
|
39
|
+
This method doesn't accept any parameters.
|
|
40
40
|
|
|
41
|
-
## Return
|
|
41
|
+
## Return value
|
|
42
42
|
|
|
43
|
-
This method
|
|
43
|
+
This method doesn't return a value.
|
|
44
44
|
|
|
45
45
|
## Notes
|
|
46
46
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `connect()` method establishes a WebSocket or WebRTC connection for real-time speech-to-speech communication. This method must be called before using other real-time features like `send()` or `answer()`.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
|
|
@@ -48,21 +48,23 @@ await voice.connect({
|
|
|
48
48
|
|
|
49
49
|
**options** (`Record<string, unknown>`): Provider-specific connection options
|
|
50
50
|
|
|
51
|
-
## Return
|
|
51
|
+
## Return value
|
|
52
52
|
|
|
53
53
|
Returns a `Promise<void>` that resolves when the connection is successfully established.
|
|
54
54
|
|
|
55
|
-
## Provider-
|
|
55
|
+
## Provider-specific options
|
|
56
56
|
|
|
57
57
|
Each real-time voice provider may support different options for the `connect()` method:
|
|
58
58
|
|
|
59
59
|
### OpenAI Realtime
|
|
60
60
|
|
|
61
|
-
**options
|
|
61
|
+
**options** (`Options`): Configuration options.
|
|
62
62
|
|
|
63
|
-
**options.
|
|
63
|
+
**options.timeout** (`number`): Connection timeout in milliseconds
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
**options.reconnect** (`boolean`): Whether to automatically reconnect on connection loss
|
|
66
|
+
|
|
67
|
+
## Using with `CompositeVoice`
|
|
66
68
|
|
|
67
69
|
When using `CompositeVoice`, the `connect()` method delegates to the configured real-time provider:
|
|
68
70
|
|
|
@@ -86,7 +88,7 @@ await voice.connect()
|
|
|
86
88
|
- Some providers may automatically reconnect on connection loss, depending on their implementation
|
|
87
89
|
- Connection errors will typically be thrown as exceptions that should be caught and handled
|
|
88
90
|
|
|
89
|
-
## Related
|
|
91
|
+
## Related methods
|
|
90
92
|
|
|
91
93
|
- [voice.send()](https://mastra.ai/reference/voice/voice.send) - Sends audio data to the voice provider
|
|
92
94
|
- [voice.answer()](https://mastra.ai/reference/voice/voice.answer) - Triggers the voice provider to respond
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Voice
|
|
1
|
+
# Voice events
|
|
2
2
|
|
|
3
3
|
Voice providers emit various events during real-time voice interactions. These events can be listened to using the [voice.on()](https://mastra.ai/reference/voice/voice.on) method and are particularly important for building interactive voice applications.
|
|
4
4
|
|
|
5
|
-
## Common
|
|
5
|
+
## Common events
|
|
6
6
|
|
|
7
7
|
These events are commonly implemented across real-time voice providers:
|
|
8
8
|
|
|
@@ -32,6 +32,6 @@ These events are commonly implemented across real-time voice providers:
|
|
|
32
32
|
|
|
33
33
|
- Not all events are supported by all voice providers
|
|
34
34
|
- The exact payload structure may vary between providers
|
|
35
|
-
- For non-real-time providers, most of these events
|
|
35
|
+
- For non-real-time providers, most of these events won't be emitted
|
|
36
36
|
- Events are useful for building interactive UIs that respond to the conversation state
|
|
37
|
-
- Consider using the [voice.off()](https://mastra.ai/reference/voice/voice.off) method to remove event listeners when they
|
|
37
|
+
- Consider using the [voice.off()](https://mastra.ai/reference/voice/voice.off) method to remove event listeners when they're no longer needed
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `getSpeakers()` method retrieves a list of available voice options (speakers) from the voice provider. This allows applications to present users with voice choices or programmatically select the most appropriate voice for different contexts.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { OpenAIVoice } from '@mastra/voice-openai'
|
|
@@ -32,13 +32,13 @@ await elevenLabsVoice.speak(text, { speaker: elevenLabsSpeakers[0].voiceId })
|
|
|
32
32
|
|
|
33
33
|
## Parameters
|
|
34
34
|
|
|
35
|
-
This method
|
|
35
|
+
This method doesn't accept any parameters.
|
|
36
36
|
|
|
37
|
-
## Return
|
|
37
|
+
## Return value
|
|
38
38
|
|
|
39
39
|
**Promise\<Array<{ voiceId: string } & TSpeakerMetadata>>** (`Promise`): A promise that resolves to an array of voice options, where each option contains at least a voiceId property and may include additional provider-specific metadata.
|
|
40
40
|
|
|
41
|
-
## Provider-
|
|
41
|
+
## Provider-specific metadata
|
|
42
42
|
|
|
43
43
|
Different voice providers return different metadata for their voices:
|
|
44
44
|
|
|
@@ -8,7 +8,7 @@ The `listen()` method is a core function available in all Mastra voice providers
|
|
|
8
8
|
|
|
9
9
|
**options** (`object`): Provider-specific options for speech recognition
|
|
10
10
|
|
|
11
|
-
## Return
|
|
11
|
+
## Return value
|
|
12
12
|
|
|
13
13
|
Returns one of the following:
|
|
14
14
|
|
|
@@ -16,13 +16,15 @@ Returns one of the following:
|
|
|
16
16
|
- `Promise<NodeJS.ReadableStream>`: A promise that resolves to a stream of transcribed text (for streaming transcription)
|
|
17
17
|
- `Promise<void>`: For real-time providers that emit 'writing' events instead of returning text directly
|
|
18
18
|
|
|
19
|
-
## Provider-
|
|
19
|
+
## Provider-specific options
|
|
20
20
|
|
|
21
21
|
Each voice provider may support additional options specific to their implementation. Here are some examples:
|
|
22
22
|
|
|
23
23
|
### OpenAI
|
|
24
24
|
|
|
25
|
-
**options
|
|
25
|
+
**options** (`Options`): Configuration options.
|
|
26
|
+
|
|
27
|
+
**options.filetype** (`string`): Audio file format (e.g., 'mp3', 'wav', 'm4a')
|
|
26
28
|
|
|
27
29
|
**options.prompt** (`string`): Text to guide the model's transcription
|
|
28
30
|
|
|
@@ -30,17 +32,21 @@ Each voice provider may support additional options specific to their implementat
|
|
|
30
32
|
|
|
31
33
|
### Google
|
|
32
34
|
|
|
33
|
-
**options
|
|
35
|
+
**options** (`Options`): Configuration options.
|
|
36
|
+
|
|
37
|
+
**options.stream** (`boolean`): Whether to use streaming recognition
|
|
34
38
|
|
|
35
|
-
**options.config** (`object`): Recognition configuration from Google Cloud Speech-to-Text API
|
|
39
|
+
**options.config** (`object`): Recognition configuration from Google Cloud Speech-to-Text API
|
|
36
40
|
|
|
37
41
|
### Deepgram
|
|
38
42
|
|
|
39
|
-
**options
|
|
43
|
+
**options** (`Options`): Configuration options.
|
|
44
|
+
|
|
45
|
+
**options.model** (`string`): Deepgram model to use for transcription
|
|
40
46
|
|
|
41
|
-
**options.language** (`string`): Language code for transcription
|
|
47
|
+
**options.language** (`string`): Language code for transcription
|
|
42
48
|
|
|
43
|
-
## Usage
|
|
49
|
+
## Usage example
|
|
44
50
|
|
|
45
51
|
```typescript
|
|
46
52
|
import { OpenAIVoice } from '@mastra/voice-openai'
|
|
@@ -75,7 +81,7 @@ const transcriptWithOptions = await voice.listen(audioStream, {
|
|
|
75
81
|
})
|
|
76
82
|
```
|
|
77
83
|
|
|
78
|
-
## Using with CompositeVoice
|
|
84
|
+
## Using with `CompositeVoice`
|
|
79
85
|
|
|
80
86
|
When using `CompositeVoice`, the `listen()` method delegates to the configured listening provider:
|
|
81
87
|
|
|
@@ -124,7 +130,7 @@ const transcriptWithOptions = await voice.listen(audioStream, {
|
|
|
124
130
|
|
|
125
131
|
See the [CompositeVoice reference](https://mastra.ai/reference/voice/composite-voice) for more details on AI SDK integration.
|
|
126
132
|
|
|
127
|
-
## Realtime
|
|
133
|
+
## Realtime voice providers
|
|
128
134
|
|
|
129
135
|
When using realtime voice providers like `OpenAIRealtimeVoice`, the `listen()` method behaves differently:
|
|
130
136
|
|
|
@@ -157,7 +163,7 @@ await voice.listen(microphoneStream)
|
|
|
157
163
|
- Some providers support streaming transcription, where text is returned as it's transcribed
|
|
158
164
|
- For best performance, consider closing or ending the audio stream when you're done with it
|
|
159
165
|
|
|
160
|
-
## Related
|
|
166
|
+
## Related methods
|
|
161
167
|
|
|
162
168
|
- [voice.speak()](https://mastra.ai/reference/voice/voice.speak) - Converts text to speech
|
|
163
169
|
- [voice.send()](https://mastra.ai/reference/voice/voice.send) - Sends audio data to the voice provider in real-time
|