@mastra/mcp-docs-server 1.1.9-alpha.0 → 1.1.9-alpha.2
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 +1 -1
- package/.docs/docs/agents/network-approval.md +1 -1
- package/.docs/docs/agents/networks.md +1 -1
- package/.docs/docs/agents/overview.md +1 -1
- package/.docs/docs/agents/processors.md +8 -8
- package/.docs/docs/agents/structured-output.md +1 -1
- package/.docs/docs/agents/supervisor-agents.md +3 -3
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/build-with-ai/mcp-docs-server.md +1 -1
- package/.docs/docs/build-with-ai/skills.md +1 -1
- package/.docs/docs/community/contributing-templates.md +1 -1
- package/.docs/docs/community/discord.md +2 -2
- package/.docs/docs/community/licensing.md +1 -1
- package/.docs/docs/deployment/cloud-providers.md +2 -2
- package/.docs/docs/deployment/mastra-server.md +1 -1
- package/.docs/docs/deployment/monorepo.md +1 -1
- package/.docs/docs/deployment/overview.md +3 -3
- package/.docs/docs/deployment/studio.md +1 -1
- package/.docs/docs/deployment/web-framework.md +1 -1
- 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 +1 -1
- package/.docs/docs/evals/running-in-ci.md +6 -6
- package/.docs/docs/getting-started/build-with-ai.md +2 -2
- package/.docs/docs/getting-started/manual-install.md +1 -1
- package/.docs/docs/getting-started/project-structure.md +1 -1
- package/.docs/docs/index.md +1 -1
- package/.docs/docs/mcp/overview.md +1 -1
- package/.docs/docs/mcp/publishing-mcp-server.md +3 -3
- package/.docs/docs/memory/memory-processors.md +8 -8
- package/.docs/docs/memory/message-history.md +2 -2
- package/.docs/docs/memory/observational-memory.md +5 -5
- package/.docs/docs/memory/semantic-recall.md +7 -7
- package/.docs/docs/memory/working-memory.md +14 -14
- 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 +7 -7
- 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 +7 -7
- 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 +20 -20
- package/.docs/docs/observability/tracing/processors/sensitive-data-filter.md +11 -11
- package/.docs/docs/rag/chunking-and-embedding.md +4 -4
- package/.docs/docs/rag/overview.md +2 -2
- package/.docs/docs/rag/retrieval.md +4 -4
- package/.docs/docs/rag/vector-databases.md +11 -11
- package/.docs/docs/server/auth/auth0.md +1 -1
- 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 +2 -2
- package/.docs/docs/server/auth/jwt.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +8 -8
- package/.docs/docs/server/auth/supabase.md +1 -1
- package/.docs/docs/server/auth/workos.md +1 -1
- package/.docs/docs/server/auth.md +1 -1
- 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 +1 -1
- package/.docs/docs/server/mastra-server.md +1 -1
- package/.docs/docs/server/request-context.md +2 -2
- package/.docs/docs/server/server-adapters.md +1 -1
- package/.docs/docs/streaming/events.md +1 -1
- package/.docs/docs/streaming/overview.md +1 -1
- package/.docs/docs/streaming/tool-streaming.md +2 -2
- 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 +1 -1
- package/.docs/docs/workflows/error-handling.md +3 -3
- package/.docs/docs/workflows/suspend-and-resume.md +1 -1
- package/.docs/docs/workflows/time-travel.md +1 -1
- package/.docs/docs/workflows/workflow-state.md +1 -1
- package/.docs/docs/workspace/filesystem.md +1 -1
- package/.docs/docs/workspace/overview.md +1 -1
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/docs/workspace/skills.md +2 -2
- 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 +1 -1
- package/.docs/guides/deployment/digital-ocean.md +1 -1
- 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 +3 -3
- 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 +2 -2
- package/.docs/guides/guide/notes-mcp-server.md +3 -3
- 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 +4 -4
- package/.docs/guides/guide/web-search.md +2 -2
- package/.docs/guides/guide/whatsapp-chat-bot.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/deployment.md +1 -1
- 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/overview.md +3 -3
- package/.docs/guides/migrations/upgrade-to-v1/storage.md +3 -3
- 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 +1 -1
- package/.docs/guides/migrations/vnext-to-standard-apis.md +1 -1
- package/.docs/models/embeddings.md +4 -4
- package/.docs/models/gateways/custom-gateways.md +4 -4
- package/.docs/models/gateways/netlify.md +1 -1
- package/.docs/models/gateways/openrouter.md +1 -1
- package/.docs/models/gateways/vercel.md +9 -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 +3 -3
- package/.docs/models/providers/aihubmix.md +3 -3
- package/.docs/models/providers/alibaba-cn.md +3 -3
- package/.docs/models/providers/alibaba-coding-plan-cn.md +3 -3
- package/.docs/models/providers/alibaba-coding-plan.md +3 -3
- 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 +6 -5
- package/.docs/models/providers/clarifai.md +3 -3
- package/.docs/models/providers/cloudferro-sherlock.md +3 -3
- package/.docs/models/providers/cloudflare-workers-ai.md +3 -3
- package/.docs/models/providers/cortecs.md +3 -3
- package/.docs/models/providers/deepinfra.md +4 -4
- package/.docs/models/providers/deepseek.md +3 -3
- package/.docs/models/providers/drun.md +3 -3
- 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 +3 -3
- package/.docs/models/providers/friendli.md +3 -3
- package/.docs/models/providers/github-models.md +3 -3
- package/.docs/models/providers/google.md +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 +25 -23
- package/.docs/models/providers/nebius.md +3 -3
- package/.docs/models/providers/nova.md +3 -3
- package/.docs/models/providers/novita-ai.md +3 -3
- package/.docs/models/providers/nvidia.md +3 -3
- package/.docs/models/providers/ollama-cloud.md +3 -3
- package/.docs/models/providers/openai.md +4 -4
- package/.docs/models/providers/opencode-go.md +3 -3
- package/.docs/models/providers/opencode.md +3 -3
- 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 +3 -3
- 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 +3 -3
- package/.docs/models/providers/requesty.md +3 -3
- package/.docs/models/providers/scaleway.md +3 -3
- package/.docs/models/providers/siliconflow-cn.md +3 -3
- 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 +4 -4
- 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 +4 -4
- package/.docs/models/providers/xiaomi.md +3 -3
- package/.docs/models/providers/zai-coding-plan.md +3 -3
- package/.docs/models/providers/zai.md +3 -3
- package/.docs/models/providers/zenmux.md +4 -4
- package/.docs/models/providers/zhipuai-coding-plan.md +3 -3
- package/.docs/models/providers/zhipuai.md +3 -3
- package/.docs/reference/agents/agent.md +3 -3
- package/.docs/reference/agents/generateLegacy.md +1 -1
- package/.docs/reference/agents/network.md +2 -2
- package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
- package/.docs/reference/auth/auth0.md +4 -4
- package/.docs/reference/auth/better-auth.md +2 -2
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +4 -4
- package/.docs/reference/auth/jwt.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +4 -4
- package/.docs/reference/cli/mastra.md +1 -1
- 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 +1 -1
- 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/core/getGatewayById.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 +2 -2
- package/.docs/reference/core/getScorerById.md +2 -2
- package/.docs/reference/core/getStoredAgentById.md +2 -2
- package/.docs/reference/core/listMCPServers.md +2 -2
- package/.docs/reference/core/listMemory.md +1 -1
- package/.docs/reference/core/listScorers.md +1 -1
- package/.docs/reference/core/listStoredAgents.md +2 -2
- package/.docs/reference/core/mastra-class.md +1 -1
- package/.docs/reference/core/mastra-model-gateway.md +11 -11
- package/.docs/reference/datasets/dataset.md +1 -1
- package/.docs/reference/deployer.md +4 -4
- package/.docs/reference/evals/answer-relevancy.md +3 -3
- package/.docs/reference/evals/answer-similarity.md +3 -3
- package/.docs/reference/evals/bias.md +4 -4
- package/.docs/reference/evals/completeness.md +5 -5
- package/.docs/reference/evals/content-similarity.md +3 -3
- package/.docs/reference/evals/context-precision.md +6 -6
- package/.docs/reference/evals/context-relevance.md +6 -6
- package/.docs/reference/evals/create-scorer.md +7 -7
- package/.docs/reference/evals/faithfulness.md +3 -3
- package/.docs/reference/evals/hallucination.md +5 -5
- package/.docs/reference/evals/keyword-coverage.md +3 -3
- package/.docs/reference/evals/mastra-scorer.md +6 -6
- package/.docs/reference/evals/noise-sensitivity.md +9 -9
- 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 +3 -3
- package/.docs/reference/evals/tone-consistency.md +4 -4
- package/.docs/reference/evals/tool-call-accuracy.md +9 -9
- package/.docs/reference/evals/toxicity.md +3 -3
- package/.docs/reference/harness/harness-class.md +1 -1
- package/.docs/reference/memory/clone-utilities.md +7 -7
- package/.docs/reference/memory/cloneThread.md +4 -4
- 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 +1 -1
- package/.docs/reference/memory/recall.md +1 -1
- package/.docs/reference/observability/tracing/bridges/otel.md +5 -5
- 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 +5 -5
- package/.docs/reference/observability/tracing/spans.md +13 -13
- package/.docs/reference/processors/processor-interface.md +15 -15
- 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 +5 -5
- package/.docs/reference/rag/rerank.md +2 -2
- package/.docs/reference/rag/rerankWithScorer.md +2 -2
- 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 +1 -1
- package/.docs/reference/server/mastra-server.md +16 -16
- package/.docs/reference/server/register-api-route.md +5 -5
- package/.docs/reference/server/routes.md +1 -1
- package/.docs/reference/storage/cloudflare-d1.md +2 -2
- package/.docs/reference/storage/cloudflare.md +2 -2
- package/.docs/reference/storage/composite.md +1 -1
- package/.docs/reference/storage/convex.md +5 -5
- package/.docs/reference/storage/dynamodb.md +5 -5
- package/.docs/reference/storage/lance.md +3 -3
- package/.docs/reference/storage/libsql.md +1 -1
- package/.docs/reference/storage/mongodb.md +5 -5
- package/.docs/reference/storage/mssql.md +3 -3
- package/.docs/reference/storage/overview.md +2 -2
- package/.docs/reference/storage/postgresql.md +5 -5
- package/.docs/reference/storage/upstash.md +3 -3
- 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 +1 -1
- package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
- package/.docs/reference/streaming/workflows/stream.md +1 -1
- package/.docs/reference/templates/overview.md +3 -3
- package/.docs/reference/tools/create-tool.md +9 -9
- 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 +23 -23
- package/.docs/reference/tools/vector-query-tool.md +12 -12
- package/.docs/reference/vectors/astra.md +13 -13
- package/.docs/reference/vectors/chroma.md +16 -16
- package/.docs/reference/vectors/convex.md +15 -15
- package/.docs/reference/vectors/couchbase.md +15 -15
- 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 +21 -21
- package/.docs/reference/vectors/pinecone.md +15 -15
- package/.docs/reference/vectors/qdrant.md +15 -15
- package/.docs/reference/vectors/s3vectors.md +17 -17
- 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 +8 -8
- package/.docs/reference/voice/cloudflare.md +5 -5
- package/.docs/reference/voice/composite-voice.md +5 -5
- package/.docs/reference/voice/deepgram.md +5 -5
- package/.docs/reference/voice/elevenlabs.md +6 -6
- package/.docs/reference/voice/google-gemini-live.md +20 -20
- package/.docs/reference/voice/google.md +9 -9
- package/.docs/reference/voice/mastra-voice.md +17 -17
- package/.docs/reference/voice/murf.md +6 -6
- package/.docs/reference/voice/openai-realtime.md +16 -16
- package/.docs/reference/voice/openai.md +5 -5
- package/.docs/reference/voice/playai.md +5 -5
- package/.docs/reference/voice/sarvam.md +5 -5
- package/.docs/reference/voice/speechify.md +5 -5
- package/.docs/reference/voice/voice.addInstructions.md +2 -2
- package/.docs/reference/voice/voice.addTools.md +2 -2
- package/.docs/reference/voice/voice.answer.md +2 -2
- package/.docs/reference/voice/voice.close.md +2 -2
- package/.docs/reference/voice/voice.connect.md +5 -5
- package/.docs/reference/voice/voice.events.md +2 -2
- package/.docs/reference/voice/voice.getSpeakers.md +3 -3
- package/.docs/reference/voice/voice.listen.md +6 -6
- package/.docs/reference/voice/voice.off.md +2 -2
- package/.docs/reference/voice/voice.on.md +3 -3
- package/.docs/reference/voice/voice.send.md +2 -2
- package/.docs/reference/voice/voice.speak.md +5 -5
- package/.docs/reference/voice/voice.updateConfig.md +3 -3
- package/.docs/reference/workflows/run-methods/startAsync.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/daytona-sandbox.md +2 -2
- package/.docs/reference/workspace/e2b-sandbox.md +2 -2
- package/.docs/reference/workspace/filesystem.md +1 -1
- package/.docs/reference/workspace/gcs-filesystem.md +1 -1
- package/.docs/reference/workspace/local-filesystem.md +1 -1
- package/.docs/reference/workspace/local-sandbox.md +4 -4
- package/.docs/reference/workspace/process-manager.md +2 -2
- package/.docs/reference/workspace/s3-filesystem.md +1 -1
- package/.docs/reference/workspace/workspace-class.md +2 -2
- package/CHANGELOG.md +14 -0
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
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.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { GoogleVoice } from '@mastra/voice-google'
|
|
@@ -30,7 +30,7 @@ const transcript = await voice.listen(audioStream, {
|
|
|
30
30
|
const voices = await voice.getSpeakers({ languageCode: 'en-US' })
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
## Constructor
|
|
33
|
+
## Constructor parameters
|
|
34
34
|
|
|
35
35
|
**speechModel** (`GoogleModelConfig`): Configuration for text-to-speech functionality (Default: `{ apiKey: process.env.GOOGLE_API_KEY }`)
|
|
36
36
|
|
|
@@ -58,7 +58,7 @@ const voices = await voice.getSpeakers({ languageCode: 'en-US' })
|
|
|
58
58
|
|
|
59
59
|
## Methods
|
|
60
60
|
|
|
61
|
-
### speak()
|
|
61
|
+
### `speak()`
|
|
62
62
|
|
|
63
63
|
Converts text to speech using Google Cloud Text-to-Speech service.
|
|
64
64
|
|
|
@@ -74,7 +74,7 @@ Converts text to speech using Google Cloud Text-to-Speech service.
|
|
|
74
74
|
|
|
75
75
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
76
76
|
|
|
77
|
-
### listen()
|
|
77
|
+
### `listen()`
|
|
78
78
|
|
|
79
79
|
Converts speech to text using Google Cloud Speech-to-Text service.
|
|
80
80
|
|
|
@@ -88,7 +88,7 @@ Converts speech to text using Google Cloud Speech-to-Text service.
|
|
|
88
88
|
|
|
89
89
|
Returns: `Promise<string>`
|
|
90
90
|
|
|
91
|
-
### getSpeakers()
|
|
91
|
+
### `getSpeakers()`
|
|
92
92
|
|
|
93
93
|
Returns an array of available voice options, where each node contains:
|
|
94
94
|
|
|
@@ -96,19 +96,19 @@ Returns an array of available voice options, where each node contains:
|
|
|
96
96
|
|
|
97
97
|
**languageCodes** (`string[]`): List of language codes supported by this voice
|
|
98
98
|
|
|
99
|
-
### isUsingVertexAI()
|
|
99
|
+
### `isUsingVertexAI()`
|
|
100
100
|
|
|
101
101
|
Checks if Vertex AI mode is enabled.
|
|
102
102
|
|
|
103
103
|
Returns: `boolean` - `true` if using Vertex AI, `false` otherwise
|
|
104
104
|
|
|
105
|
-
### getProject()
|
|
105
|
+
### `getProject()`
|
|
106
106
|
|
|
107
107
|
Gets the configured Google Cloud project ID.
|
|
108
108
|
|
|
109
109
|
Returns: `string | undefined` - The project ID or `undefined` if not set
|
|
110
110
|
|
|
111
|
-
### getLocation()
|
|
111
|
+
### `getLocation()`
|
|
112
112
|
|
|
113
113
|
Gets the configured Google Cloud location/region.
|
|
114
114
|
|
|
@@ -208,7 +208,7 @@ For long-audio Text-to-Speech operations:
|
|
|
208
208
|
- `operations.get` - Get operation status
|
|
209
209
|
- `operations.list` - List operations
|
|
210
210
|
|
|
211
|
-
## Important
|
|
211
|
+
## Important notes
|
|
212
212
|
|
|
213
213
|
1. **Authentication**: Either a Google Cloud API key (standard mode) or service account credentials (Vertex AI mode) is required.
|
|
214
214
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The MastraVoice class is an abstract base class that defines the core interface for voice services in Mastra. All voice provider implementations (like OpenAI, Deepgram, PlayAI, Speechify) extend this class to provide their specific functionality. The class now includes support for real-time speech-to-speech capabilities through WebSocket connections.
|
|
4
4
|
|
|
5
|
-
## Usage
|
|
5
|
+
## Usage example
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import { MastraVoice } from '@mastra/core/voice'
|
|
@@ -77,7 +77,7 @@ class MyVoiceProvider extends MastraVoice {
|
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
## Constructor
|
|
80
|
+
## Constructor parameters
|
|
81
81
|
|
|
82
82
|
**config** (`VoiceConfig`): Configuration object for the voice service
|
|
83
83
|
|
|
@@ -105,11 +105,11 @@ class MyVoiceProvider extends MastraVoice {
|
|
|
105
105
|
|
|
106
106
|
**config.realtimeConfig.options** (`unknown`): Provider-specific options for real-time capabilities
|
|
107
107
|
|
|
108
|
-
## Abstract
|
|
108
|
+
## Abstract methods
|
|
109
109
|
|
|
110
110
|
These methods must be implemented by unknown class extending MastraVoice.
|
|
111
111
|
|
|
112
|
-
### speak()
|
|
112
|
+
### `speak()`
|
|
113
113
|
|
|
114
114
|
Converts text to speech using the configured speech model.
|
|
115
115
|
|
|
@@ -131,7 +131,7 @@ Purpose:
|
|
|
131
131
|
- Returns a stream of audio data that can be played or saved
|
|
132
132
|
- May return void if the audio is handled by emitting 'speaking' event
|
|
133
133
|
|
|
134
|
-
### listen()
|
|
134
|
+
### `listen()`
|
|
135
135
|
|
|
136
136
|
Converts speech to text using the configured listening model.
|
|
137
137
|
|
|
@@ -152,7 +152,7 @@ Purpose:
|
|
|
152
152
|
- Not all providers support this functionality (e.g., PlayAI, Speechify)
|
|
153
153
|
- May return void if the transcription is handled by emitting 'writing' event
|
|
154
154
|
|
|
155
|
-
### getSpeakers()
|
|
155
|
+
### `getSpeakers()`
|
|
156
156
|
|
|
157
157
|
Returns a list of available voices supported by the provider.
|
|
158
158
|
|
|
@@ -167,11 +167,11 @@ Purpose:
|
|
|
167
167
|
- Providers can include additional metadata about each voice
|
|
168
168
|
- Used to discover available voices for text-to-speech conversion
|
|
169
169
|
|
|
170
|
-
## Optional
|
|
170
|
+
## Optional methods
|
|
171
171
|
|
|
172
172
|
These methods have default implementations but can be overridden by voice providers that support speech-to-speech capabilities.
|
|
173
173
|
|
|
174
|
-
### connect()
|
|
174
|
+
### `connect()`
|
|
175
175
|
|
|
176
176
|
Establishes a WebSocket or WebRTC connection for communication.
|
|
177
177
|
|
|
@@ -186,7 +186,7 @@ Purpose:
|
|
|
186
186
|
- Returns a Promise that resolves when the connection is established
|
|
187
187
|
- Configuration is provider-specific
|
|
188
188
|
|
|
189
|
-
### send()
|
|
189
|
+
### `send()`
|
|
190
190
|
|
|
191
191
|
Streams audio data in real-time to the voice provider.
|
|
192
192
|
|
|
@@ -201,7 +201,7 @@ Purpose:
|
|
|
201
201
|
- Supports both ReadableStream and Int16Array audio formats
|
|
202
202
|
- Must be in connected state before calling this method
|
|
203
203
|
|
|
204
|
-
### answer()
|
|
204
|
+
### `answer()`
|
|
205
205
|
|
|
206
206
|
Triggers the voice provider to generate a response.
|
|
207
207
|
|
|
@@ -215,7 +215,7 @@ Purpose:
|
|
|
215
215
|
- Used in real-time conversations to prompt the AI to respond
|
|
216
216
|
- Response will be emitted through the event system (e.g., 'speaking' event)
|
|
217
217
|
|
|
218
|
-
### addTools()
|
|
218
|
+
### `addTools()`
|
|
219
219
|
|
|
220
220
|
Equips the voice provider with tools that can be used during conversations.
|
|
221
221
|
|
|
@@ -229,7 +229,7 @@ Purpose:
|
|
|
229
229
|
- Tools can extend the capabilities of the voice provider
|
|
230
230
|
- Implementation is provider-specific
|
|
231
231
|
|
|
232
|
-
### close()
|
|
232
|
+
### `close()`
|
|
233
233
|
|
|
234
234
|
Disconnects from the WebSocket or WebRTC connection.
|
|
235
235
|
|
|
@@ -243,7 +243,7 @@ Purpose:
|
|
|
243
243
|
- Cleans up resources and stops any ongoing real-time processing
|
|
244
244
|
- Should be called when you're done with the voice instance
|
|
245
245
|
|
|
246
|
-
### on()
|
|
246
|
+
### `on()`
|
|
247
247
|
|
|
248
248
|
Registers an event listener for voice events.
|
|
249
249
|
|
|
@@ -261,7 +261,7 @@ Purpose:
|
|
|
261
261
|
- Providers can emit custom events as well
|
|
262
262
|
- Event data structure depends on the event type
|
|
263
263
|
|
|
264
|
-
### off()
|
|
264
|
+
### `off()`
|
|
265
265
|
|
|
266
266
|
Removes an event listener.
|
|
267
267
|
|
|
@@ -277,7 +277,7 @@ Purpose:
|
|
|
277
277
|
- Removes a previously registered event listener
|
|
278
278
|
- Used to clean up event handlers when they're no longer needed
|
|
279
279
|
|
|
280
|
-
## Event
|
|
280
|
+
## Event system
|
|
281
281
|
|
|
282
282
|
The MastraVoice class includes an event system for real-time communication. Standard event types include:
|
|
283
283
|
|
|
@@ -287,7 +287,7 @@ The MastraVoice class includes an event system for real-time communication. Stan
|
|
|
287
287
|
|
|
288
288
|
**error** (`{ message: string; code?: string; details?: unknown }`): Emitted when an error occurs
|
|
289
289
|
|
|
290
|
-
## Protected
|
|
290
|
+
## Protected properties
|
|
291
291
|
|
|
292
292
|
**listeningModel** (`BuiltInModelConfig | undefined`): Configuration for the speech-to-text model
|
|
293
293
|
|
|
@@ -297,7 +297,7 @@ The MastraVoice class includes an event system for real-time communication. Stan
|
|
|
297
297
|
|
|
298
298
|
**realtimeConfig** (`{ model?: string; apiKey?: string; options?: unknown } | undefined`): Configuration for real-time speech-to-speech capabilities
|
|
299
299
|
|
|
300
|
-
## Telemetry
|
|
300
|
+
## Telemetry support
|
|
301
301
|
|
|
302
302
|
MastraVoice includes built-in telemetry support through the `traced` method, which wraps method calls with performance tracking and error monitoring.
|
|
303
303
|
|
|
@@ -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,11 +105,11 @@ 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
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.
|
|
@@ -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,13 +75,13 @@ 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
|
|
|
@@ -93,7 +93,7 @@ Emits a speaking event using the configured voice model. Can accept either a str
|
|
|
93
93
|
|
|
94
94
|
Returns: `Promise<void>`
|
|
95
95
|
|
|
96
|
-
### listen()
|
|
96
|
+
### `listen()`
|
|
97
97
|
|
|
98
98
|
Processes audio input for speech recognition. Takes a readable stream of audio data and emits a 'listening' event with the transcribed text.
|
|
99
99
|
|
|
@@ -101,7 +101,7 @@ Processes audio input for speech recognition. Takes a readable stream of audio d
|
|
|
101
101
|
|
|
102
102
|
Returns: `Promise<void>`
|
|
103
103
|
|
|
104
|
-
### send()
|
|
104
|
+
### `send()`
|
|
105
105
|
|
|
106
106
|
Streams audio data in real-time to the OpenAI service for continuous audio streaming scenarios like live microphone input.
|
|
107
107
|
|
|
@@ -109,7 +109,7 @@ Streams audio data in real-time to the OpenAI service for continuous audio strea
|
|
|
109
109
|
|
|
110
110
|
Returns: `Promise<void>`
|
|
111
111
|
|
|
112
|
-
### updateConfig()
|
|
112
|
+
### `updateConfig()`
|
|
113
113
|
|
|
114
114
|
Updates the session configuration for the voice instance. This can be used to modify voice settings, turn detection, and other parameters.
|
|
115
115
|
|
|
@@ -117,7 +117,7 @@ Updates the session configuration for the voice instance. This can be used to mo
|
|
|
117
117
|
|
|
118
118
|
Returns: `void`
|
|
119
119
|
|
|
120
|
-
### addTools()
|
|
120
|
+
### `addTools()`
|
|
121
121
|
|
|
122
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.
|
|
123
123
|
|
|
@@ -125,19 +125,19 @@ Adds a set of tools to the voice instance. Tools allow the model to perform addi
|
|
|
125
125
|
|
|
126
126
|
Returns: `void`
|
|
127
127
|
|
|
128
|
-
### close()
|
|
128
|
+
### `close()`
|
|
129
129
|
|
|
130
|
-
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.
|
|
131
131
|
|
|
132
132
|
Returns: `void`
|
|
133
133
|
|
|
134
|
-
### getSpeakers()
|
|
134
|
+
### `getSpeakers()`
|
|
135
135
|
|
|
136
136
|
Returns a list of available voice speakers.
|
|
137
137
|
|
|
138
138
|
Returns: `Promise<Array<{ voiceId: string; [key: string]: any }>>`
|
|
139
139
|
|
|
140
|
-
### on()
|
|
140
|
+
### `on()`
|
|
141
141
|
|
|
142
142
|
Registers an event listener for voice events.
|
|
143
143
|
|
|
@@ -147,7 +147,7 @@ Registers an event listener for voice events.
|
|
|
147
147
|
|
|
148
148
|
Returns: `void`
|
|
149
149
|
|
|
150
|
-
### off()
|
|
150
|
+
### `off()`
|
|
151
151
|
|
|
152
152
|
Removes a previously registered event listener.
|
|
153
153
|
|
|
@@ -181,7 +181,7 @@ You can also listen to [OpenAI Realtime utility events](https://github.com/opena
|
|
|
181
181
|
|
|
182
182
|
**openAIRealtime:conversation.item.completed** (`event`): Emitted when an item in the conversation is completed.
|
|
183
183
|
|
|
184
|
-
## Available
|
|
184
|
+
## Available voices
|
|
185
185
|
|
|
186
186
|
The following voice options are available:
|
|
187
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,7 +55,7 @@ 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
|
|
|
@@ -69,7 +69,7 @@ Converts text to speech using OpenAI's text-to-speech models.
|
|
|
69
69
|
|
|
70
70
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
71
71
|
|
|
72
|
-
### listen()
|
|
72
|
+
### `listen()`
|
|
73
73
|
|
|
74
74
|
Transcribes audio using OpenAI's Whisper model.
|
|
75
75
|
|
|
@@ -81,7 +81,7 @@ Transcribes audio using OpenAI's Whisper model.
|
|
|
81
81
|
|
|
82
82
|
Returns: `Promise<string>`
|
|
83
83
|
|
|
84
|
-
### getSpeakers()
|
|
84
|
+
### `getSpeakers()`
|
|
85
85
|
|
|
86
86
|
Returns an array of available voice options, where each node contains:
|
|
87
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,7 +41,7 @@ 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
|
|
|
@@ -53,7 +53,7 @@ Converts text to speech using the configured speech model and voice.
|
|
|
53
53
|
|
|
54
54
|
Returns: `Promise<NodeJS.ReadableStream>`.
|
|
55
55
|
|
|
56
|
-
### getSpeakers()
|
|
56
|
+
### `getSpeakers()`
|
|
57
57
|
|
|
58
58
|
Returns an array of available voice options, where each node contains:
|
|
59
59
|
|
|
@@ -69,7 +69,7 @@ Returns an array of available voice options, where each node contains:
|
|
|
69
69
|
|
|
70
70
|
**voiceId** (`string`): Unique identifier for the voice
|
|
71
71
|
|
|
72
|
-
### listen()
|
|
72
|
+
### `listen()`
|
|
73
73
|
|
|
74
74
|
This method isn't supported by PlayAI and will throw an error. PlayAI doesn't provide speech-to-text functionality.
|
|
75
75
|
|
|
@@ -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,7 +87,7 @@ 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
|
|
|
@@ -99,7 +99,7 @@ Converts text to speech using Sarvam's text-to-speech models.
|
|
|
99
99
|
|
|
100
100
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
101
101
|
|
|
102
|
-
### listen()
|
|
102
|
+
### `listen()`
|
|
103
103
|
|
|
104
104
|
Transcribes audio using Sarvam's speech recognition models.
|
|
105
105
|
|
|
@@ -109,7 +109,7 @@ Transcribes audio using Sarvam's speech recognition models.
|
|
|
109
109
|
|
|
110
110
|
Returns: `Promise<string>`
|
|
111
111
|
|
|
112
|
-
### getSpeakers()
|
|
112
|
+
### `getSpeakers()`
|
|
113
113
|
|
|
114
114
|
Returns an array of available voice options.
|
|
115
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,7 +37,7 @@ 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
|
|
|
@@ -51,7 +51,7 @@ Converts text to speech using the configured speech model and voice.
|
|
|
51
51
|
|
|
52
52
|
Returns: `Promise<NodeJS.ReadableStream>`
|
|
53
53
|
|
|
54
|
-
### getSpeakers()
|
|
54
|
+
### `getSpeakers()`
|
|
55
55
|
|
|
56
56
|
Returns an array of available voice options, where each node contains:
|
|
57
57
|
|
|
@@ -63,7 +63,7 @@ Returns an array of available voice options, where each node contains:
|
|
|
63
63
|
|
|
64
64
|
**gender** (`string`): Gender of the voice
|
|
65
65
|
|
|
66
|
-
### listen()
|
|
66
|
+
### `listen()`
|
|
67
67
|
|
|
68
68
|
This method isn't supported by Speechify and will throw an error. Speechify doesn't provide speech-to-text functionality.
|
|
69
69
|
|
|
@@ -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,7 +41,7 @@ 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
46
|
This method doesn't return a value.
|
|
47
47
|
|
|
@@ -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,7 +52,7 @@ 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
57
|
This method doesn't return a value.
|
|
58
58
|
|
|
@@ -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'
|
|
@@ -38,7 +38,7 @@ setTimeout(() => {
|
|
|
38
38
|
|
|
39
39
|
This method doesn't accept any parameters.
|
|
40
40
|
|
|
41
|
-
## Return
|
|
41
|
+
## Return value
|
|
42
42
|
|
|
43
43
|
This method doesn't return a value.
|
|
44
44
|
|
|
@@ -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,11 +48,11 @@ 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
|
|
|
@@ -64,7 +64,7 @@ Each real-time voice provider may support different options for the `connect()`
|
|
|
64
64
|
|
|
65
65
|
**options.reconnect** (`boolean`): Whether to automatically reconnect on connection loss
|
|
66
66
|
|
|
67
|
-
## Using with CompositeVoice
|
|
67
|
+
## Using with `CompositeVoice`
|
|
68
68
|
|
|
69
69
|
When using `CompositeVoice`, the `connect()` method delegates to the configured real-time provider:
|
|
70
70
|
|
|
@@ -88,7 +88,7 @@ await voice.connect()
|
|
|
88
88
|
- Some providers may automatically reconnect on connection loss, depending on their implementation
|
|
89
89
|
- Connection errors will typically be thrown as exceptions that should be caught and handled
|
|
90
90
|
|
|
91
|
-
## Related
|
|
91
|
+
## Related methods
|
|
92
92
|
|
|
93
93
|
- [voice.send()](https://mastra.ai/reference/voice/voice.send) - Sends audio data to the voice provider
|
|
94
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
|
|