@mastra/mcp-docs-server 1.2.15-alpha.19 → 1.2.15-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.docs/docs/agents/code-mode.md +1 -1
- package/.docs/docs/agents/networks.md +2 -2
- package/.docs/docs/agents/overview.md +2 -2
- package/.docs/docs/agents/using-tools.md +1 -1
- package/.docs/docs/browser/overview.md +8 -8
- package/.docs/docs/browser/recording.md +2 -2
- package/.docs/docs/capabilities/{channels/overview.md → channels.md} +70 -7
- package/.docs/docs/capabilities/subagents.md +2 -2
- package/.docs/docs/deployment/cloud-providers.md +9 -9
- package/.docs/docs/deployment/overview.md +9 -9
- package/.docs/docs/deployment/sandbox.md +3 -3
- package/.docs/docs/deployment/web-framework.md +6 -6
- package/.docs/docs/deployment/workflow-runners.md +2 -2
- package/.docs/docs/harness/agent-controller.md +2 -2
- package/.docs/docs/index.md +8 -8
- package/.docs/docs/long-running-agents/durable-agents.md +2 -2
- package/.docs/docs/long-running-agents/signal-providers.md +2 -15
- package/.docs/docs/long-running-agents/signals.md +1 -1
- package/.docs/docs/mastra-platform/database.md +2 -2
- package/.docs/docs/mastra-platform/deploy.md +27 -0
- package/.docs/docs/mastra-platform/server.md +1 -1
- package/.docs/docs/mastra-platform/trace-intelligence.md +9 -13
- package/.docs/docs/mcp/overview.md +42 -0
- package/.docs/docs/memory/memory-processors.md +5 -5
- package/.docs/docs/memory/message-history.md +1 -1
- package/.docs/docs/memory/observational-memory.md +1 -1
- package/.docs/docs/observability/integrations/exporters/mastra-storage.md +16 -16
- package/.docs/docs/observability/integrations/overview.md +3 -3
- package/.docs/docs/server/auth/fga.md +1 -1
- package/.docs/docs/server/auth/simple-auth.md +1 -1
- package/.docs/docs/server/auth.md +8 -8
- package/.docs/docs/server/custom-api-routes.md +35 -0
- package/.docs/docs/storage/overview.md +14 -13
- package/.docs/docs/studio/observability.md +1 -1
- package/.docs/docs/workflows/overview.md +1 -1
- package/.docs/docs/workflows/snapshots.md +11 -11
- package/.docs/docs/workflows/time-travel.md +2 -0
- package/.docs/docs/workspace/filesystem.md +15 -15
- package/.docs/docs/workspace/sandbox.md +17 -17
- package/.docs/docs/workspace/search.md +1 -1
- package/.docs/guides/agent-frameworks/ai-sdk.md +2 -2
- package/.docs/guides/deployment/mastra-workers.md +1 -1
- package/.docs/guides/getting-started/quickstart.md +3 -3
- package/.docs/guides/index.md +8 -8
- package/.docs/guides/voice/overview.md +55 -106
- package/.docs/guides/voice/speech-to-text.md +7 -7
- package/.docs/guides/voice/text-to-speech.md +9 -10
- package/.docs/{guides/build-your-ui → integrations/agentic-ui}/ai-sdk-ui.md +2 -2
- package/.docs/{guides/build-your-ui/copilotkit/overview.md → integrations/agentic-ui/copilotkit.md} +256 -3
- package/.docs/{docs/browser → integrations/browsers}/agent-browser.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/browser-viewer.md +3 -3
- package/.docs/{docs/browser → integrations/browsers}/firecrawl.md +2 -2
- package/.docs/{docs/browser → integrations/browsers}/stagehand.md +1 -1
- package/.docs/{docs/capabilities → integrations}/channels/discord.md +2 -2
- package/.docs/integrations/channels/github.md +103 -0
- package/.docs/{docs/capabilities → integrations}/channels/imessage.md +7 -5
- package/.docs/{docs/capabilities → integrations}/channels/slack.md +4 -4
- package/.docs/{docs/capabilities → integrations}/channels/teams.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/telegram.md +2 -2
- package/.docs/{docs/capabilities → integrations}/channels/whatsapp.md +2 -2
- package/.docs/{reference/storage/dsql.md → integrations/databases/aurora-dsql.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/clickhouse.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/cloudflare-d1.md +1 -1
- package/.docs/{reference/storage/cloudflare.md → integrations/databases/cloudflare-kv.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/convex.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/duckdb.md +5 -5
- package/.docs/{reference/storage → integrations/databases}/dynamodb.md +1 -1
- package/.docs/{reference/storage/lance.md → integrations/databases/lancedb.md} +1 -1
- package/.docs/{reference/storage → integrations/databases}/libsql.md +2 -2
- package/.docs/{reference/storage → integrations/databases}/mongodb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/mssql.md +1 -1
- package/.docs/integrations/databases/neon.md +220 -0
- package/.docs/{reference/storage → integrations/databases}/oracledb.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/postgresql.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/redis.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/spanner.md +1 -1
- package/.docs/{reference/storage → integrations/databases}/upstash.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-bedrock-agentcore.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/aws-lambda.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/azure-app-services.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/cloudflare.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/digital-ocean.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/netlify.md +1 -1
- package/.docs/{guides/deployment → integrations/deploy}/vercel.md +2 -2
- package/.docs/{reference/workspace/s3-filesystem.md → integrations/file-storage/amazon-s3.md} +5 -5
- package/.docs/{reference/workspace/archil-filesystem.md → integrations/file-storage/archil.md} +3 -3
- package/.docs/{reference/workspace/azure-blob-filesystem.md → integrations/file-storage/azure-blob.md} +2 -2
- package/.docs/{reference/workspace/gcs-filesystem.md → integrations/file-storage/google-cloud-storage.md} +5 -5
- package/.docs/{reference/workspace/mesa-filesystem.md → integrations/file-storage/mesa.md} +1 -1
- package/.docs/{reference/workspace/files-sdk-filesystem.md → integrations/file-storage/vercel-files.md} +5 -5
- package/.docs/{guides/getting-started → integrations/frameworks}/astro.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/electron.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/next-js.md +2 -2
- package/.docs/{guides/getting-started → integrations/frameworks}/nuxt.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/sveltekit.md +1 -1
- package/.docs/{guides/getting-started → integrations/frameworks}/vite-react.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arize.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/arthur.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/braintrust.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/confident-ai.md +1 -1
- package/.docs/integrations/observability/datadog.md +538 -0
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/laminar.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langfuse.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/langsmith.md +1 -1
- package/.docs/{docs/observability/integrations/exporters/otel.md → integrations/observability/opentelemetry.md} +276 -44
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/posthog.md +1 -1
- package/.docs/{docs/observability/integrations/exporters → integrations/observability}/sentry.md +1 -1
- package/.docs/{reference/workspace/apple-container-sandbox.md → integrations/sandboxes/apple-container.md} +1 -1
- package/.docs/{reference/workspace/daytona-sandbox.md → integrations/sandboxes/daytona.md} +2 -2
- package/.docs/{reference/workspace/docker-sandbox.md → integrations/sandboxes/docker.md} +1 -1
- package/.docs/{reference/workspace/e2b-sandbox.md → integrations/sandboxes/e2b.md} +3 -3
- package/.docs/{reference/workspace/modal-sandbox.md → integrations/sandboxes/modal.md} +2 -2
- package/.docs/{reference/workspace/railway-sandbox.md → integrations/sandboxes/railway.md} +8 -0
- package/.docs/{reference/workspace/vercel-sandbox.md → integrations/sandboxes/vercel.md} +141 -12
- package/.docs/{reference → integrations}/tools/brightdata.md +1 -1
- package/.docs/{reference → integrations}/tools/perplexity.md +1 -1
- package/.docs/{reference → integrations}/tools/tavily.md +1 -1
- package/.docs/{reference → integrations}/voice/aws-nova-sonic.md +1 -1
- package/.docs/{reference → integrations}/voice/cloudflare.md +3 -3
- package/.docs/{reference/voice/google-gemini-live.md → integrations/voice/google.md} +305 -30
- package/.docs/{reference/voice/inworld-realtime.md → integrations/voice/inworld.md} +163 -25
- package/.docs/{reference → integrations}/voice/livekit.md +437 -34
- package/.docs/{reference/voice/openai-realtime.md → integrations/voice/openai.md} +117 -20
- package/.docs/integrations.md +147 -0
- package/.docs/models/embeddings.md +2 -2
- package/.docs/models/environment-variables.md +1 -0
- package/.docs/models/gateways/openrouter.md +4 -2
- package/.docs/models/gateways/vercel.md +2 -1
- package/.docs/models/index.md +1 -1
- package/.docs/models/providers/coralbricks.md +75 -0
- package/.docs/models/providers/evroc.md +2 -3
- package/.docs/models/providers/hyper.md +6 -6
- package/.docs/models/providers/kilo.md +7 -5
- package/.docs/models/providers/llmgateway.md +1 -2
- package/.docs/models/providers/nano-gpt.md +1 -3
- package/.docs/models/providers/opencode.md +0 -1
- package/.docs/models/providers/privatemode-ai.md +5 -4
- package/.docs/models/providers/snowflake-cortex.md +5 -1
- package/.docs/models/providers/wandb.md +2 -1
- package/.docs/models/providers/zenmux.md +0 -15
- package/.docs/models/providers.md +1 -0
- package/.docs/reference/agent-controller/agent-controller-class.md +32 -1
- package/.docs/reference/agents/channels.md +2 -2
- package/.docs/reference/agents/generateLegacy.md +2 -2
- package/.docs/reference/agents/getDefaultOptions.md +1 -1
- package/.docs/reference/agents/getDefaultStreamOptions.md +1 -1
- package/.docs/reference/agents/inngest-agent.md +1 -1
- package/.docs/reference/agents/network.md +1 -1
- package/.docs/reference/ai-sdk/handle-network-stream.md +1 -1
- package/.docs/reference/ai-sdk/network-route.md +1 -1
- package/.docs/reference/auth/auth0.md +1 -1
- package/.docs/reference/auth/better-auth.md +1 -1
- package/.docs/reference/auth/clerk.md +1 -1
- package/.docs/reference/auth/firebase.md +1 -1
- package/.docs/reference/auth/google.md +1 -1
- package/.docs/reference/auth/supabase.md +1 -1
- package/.docs/reference/auth/workos.md +1 -1
- package/.docs/reference/browser/agent-browser.md +1 -1
- package/.docs/reference/browser/browser-viewer.md +1 -1
- package/.docs/reference/browser/firecrawl-browser.md +1 -1
- package/.docs/reference/browser/stagehand-browser.md +1 -1
- package/.docs/reference/channels/channel-provider.md +1 -1
- package/.docs/reference/channels/slack-provider.md +2 -2
- package/.docs/reference/cli/mastra.md +2 -2
- package/.docs/reference/configuration.md +1 -26
- package/.docs/reference/core/getStorage.md +1 -1
- package/.docs/reference/core/getVector.md +2 -2
- package/.docs/reference/core/listVectors.md +2 -2
- package/.docs/reference/core/setStorage.md +1 -1
- package/.docs/reference/file-based-agents/storage.md +1 -1
- package/.docs/reference/file-based-agents/studio.md +1 -1
- package/.docs/reference/index.md +27 -55
- package/.docs/{guides → reference}/migrations/ai-sdk-v4-to-v5.md +1 -1
- package/.docs/{guides → reference}/migrations/mastra-cloud.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/cli.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/memory.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/overview.md +41 -41
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tools.md +1 -1
- package/.docs/{guides → reference}/migrations/upgrade-to-v1/tracing.md +10 -10
- package/.docs/reference/observability/tracing/bridges/datadog.md +2 -2
- package/.docs/reference/observability/tracing/bridges/otel.md +2 -2
- package/.docs/reference/observability/tracing/exporters/arize.md +1 -1
- package/.docs/reference/observability/tracing/exporters/arthur.md +1 -1
- package/.docs/reference/observability/tracing/exporters/confident-ai.md +1 -1
- package/.docs/reference/observability/tracing/exporters/mastra-platform-exporter.md +12 -0
- package/.docs/reference/observability/tracing/exporters/otel.md +2 -2
- package/.docs/reference/pubsub/lease-provider.md +1 -1
- package/.docs/{guides → reference}/rag/chunking-and-embedding.md +16 -19
- package/.docs/reference/rag/database-config.md +1 -1
- package/.docs/{guides/rag/graph-rag.md → reference/rag/graph-rag-guide.md} +1 -1
- package/.docs/{guides → reference}/rag/overview.md +2 -2
- package/.docs/{guides → reference}/rag/retrieval.md +1 -1
- package/.docs/{guides → reference}/rag/vector-databases.md +1 -1
- package/.docs/reference/server/create-route.md +27 -1
- package/.docs/reference/storage/composite.md +3 -3
- package/.docs/reference/storage/retention.md +4 -4
- package/.docs/reference/streaming/ChunkType.md +3 -3
- package/.docs/reference/streaming/agents/streamLegacy.md +3 -3
- package/.docs/reference/tools/mcp-server.md +1 -1
- package/.docs/reference/vectors/convex.md +2 -2
- package/.docs/reference/vectors/oracledb.md +2 -2
- package/.docs/reference/workers/overview.md +8 -8
- package/.docs/reference/workflows/run-methods/timeTravel.md +1 -0
- package/.docs/reference/workspace/platform-filesystem.md +2 -2
- package/.docs/reference/workspace/platform-sandbox.md +10 -2
- package/.docs/reference/workspace/process-manager.md +3 -3
- package/.docs/reference/workspace/sandbox.md +10 -0
- package/CHANGELOG.md +16 -0
- package/dist/index.js +1 -1
- package/dist/{src-BZcgzbk9.js → src-D-W-bx5t.js} +2 -2
- package/dist/{src-BZcgzbk9.js.map → src-D-W-bx5t.js.map} +1 -1
- package/dist/stdio.js +1 -1
- package/package.json +5 -5
- package/.docs/docs/capabilities/channels/other-adapters.md +0 -68
- package/.docs/docs/observability/integrations/bridges/datadog.md +0 -219
- package/.docs/docs/observability/integrations/bridges/otel.md +0 -234
- package/.docs/docs/observability/integrations/exporters/datadog.md +0 -321
- package/.docs/guides/build-your-ui/copilotkit/channels.md +0 -86
- package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +0 -174
- package/.docs/guides/guide/chef-michel.md +0 -211
- package/.docs/guides/guide/publishing-mcp-server.md +0 -137
- package/.docs/guides/guide/slack-assistant.md +0 -193
- package/.docs/guides/guide/stock-agent.md +0 -132
- package/.docs/guides/guide/web-search.md +0 -322
- package/.docs/guides/guide/whatsapp-chat-bot.md +0 -407
- package/.docs/guides/voice/realtime-voice.md +0 -430
- package/.docs/reference/voice/google.md +0 -290
- package/.docs/reference/voice/inworld.md +0 -137
- package/.docs/reference/voice/openai.md +0 -96
- package/.docs/reference/voice/playai.md +0 -82
- package/.docs/reference/workspace/vercel-serverless.md +0 -128
- /package/.docs/{guides/concepts → docs/guides}/multi-agent-systems.md +0 -0
- /package/.docs/{guides/concepts → docs/guides}/streaming.md +0 -0
- /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/assistant-ui.md +0 -0
- /package/.docs/{guides/build-your-ui → integrations/agentic-ui}/openui.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/auth0.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/better-auth.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/clerk.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/firebase.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/google.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/okta.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/supabase.md +0 -0
- /package/.docs/{docs/server → integrations}/auth/workos.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/amazon-ec2.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/inngest.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/kubernetes.md +0 -0
- /package/.docs/{guides/deployment → integrations/deploy}/temporal.md +0 -0
- /package/.docs/{reference/workspace/agentfs-filesystem.md → integrations/file-storage/agentfs.md} +0 -0
- /package/.docs/{reference/workspace/google-drive-filesystem.md → integrations/file-storage/google-drive.md} +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/express.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/hono.md +0 -0
- /package/.docs/{guides/getting-started → integrations/frameworks}/nestjs.md +0 -0
- /package/.docs/{reference/workspace/agentcore-runtime-sandbox.md → integrations/sandboxes/agentcore.md} +0 -0
- /package/.docs/{reference/workspace/blaxel-sandbox.md → integrations/sandboxes/blaxel.md} +0 -0
- /package/.docs/{guides/guide → integrations/tools}/firecrawl.md +0 -0
- /package/.docs/{reference → integrations}/voice/azure.md +0 -0
- /package/.docs/{reference → integrations}/voice/deepgram.md +0 -0
- /package/.docs/{reference → integrations}/voice/elevenlabs.md +0 -0
- /package/.docs/{reference → integrations}/voice/mistral.md +0 -0
- /package/.docs/{reference → integrations}/voice/murf.md +0 -0
- /package/.docs/{reference → integrations}/voice/sarvam.md +0 -0
- /package/.docs/{reference → integrations}/voice/speechify.md +0 -0
- /package/.docs/{reference/voice/xai-realtime.md → integrations/voice/xai.md} +0 -0
- /package/.docs/{guides/getting-started → reference}/manual-install.md +0 -0
- /package/.docs/{guides → reference}/migrations/agentnetwork.md +0 -0
- /package/.docs/{guides → reference}/migrations/network-to-supervisor.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/agent.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/client.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/deployment.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/evals.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mastra.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/mcp.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/processors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/rag.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/storage.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/vectors.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/voice.md +0 -0
- /package/.docs/{guides → reference}/migrations/upgrade-to-v1/workflows.md +0 -0
- /package/.docs/{guides → reference}/migrations/vnext-to-standard-apis.md +0 -0
|
@@ -1,14 +1,152 @@
|
|
|
1
1
|
> Discover all available pages from the documentation index: https://mastra.ai/llms.txt
|
|
2
2
|
|
|
3
|
-
# Inworld
|
|
3
|
+
# Inworld
|
|
4
|
+
|
|
5
|
+
## Voice
|
|
6
|
+
|
|
7
|
+
The Inworld voice implementation in Mastra provides streaming text-to-speech (TTS) and batch speech-to-text (STT) capabilities using Inworld AI's API. It supports multiple TTS and STT models, configurable audio encodings, and progressive audio streaming.
|
|
8
|
+
|
|
9
|
+
For real-time, full-duplex speech-to-speech, the same package exports [`InworldRealtimeVoice`](#realtime).
|
|
10
|
+
|
|
11
|
+
### Usage example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { InworldVoice } from '@mastra/voice-inworld'
|
|
15
|
+
|
|
16
|
+
// Initialize with default configuration (uses INWORLD_API_KEY environment variable)
|
|
17
|
+
const voice = new InworldVoice()
|
|
18
|
+
|
|
19
|
+
// Initialize with custom configuration
|
|
20
|
+
const voice = new InworldVoice({
|
|
21
|
+
speechModel: {
|
|
22
|
+
name: 'inworld-tts-2',
|
|
23
|
+
apiKey: 'your-api-key',
|
|
24
|
+
},
|
|
25
|
+
listeningModel: {
|
|
26
|
+
name: 'groq/whisper-large-v3',
|
|
27
|
+
apiKey: 'your-api-key',
|
|
28
|
+
},
|
|
29
|
+
speaker: 'Dennis',
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
// Text-to-Speech (streaming)
|
|
33
|
+
const audioStream = await voice.speak('Hello, world!')
|
|
34
|
+
|
|
35
|
+
// Speech-to-Text
|
|
36
|
+
const transcript = await voice.listen(audioStream)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Constructor parameters
|
|
40
|
+
|
|
41
|
+
**speechModel** (`InworldVoiceConfig`): Configuration for text-to-speech functionality. (Default: `{ name: 'inworld-tts-2' }`)
|
|
42
|
+
|
|
43
|
+
**speechModel.name** (`'inworld-tts-2' | 'inworld-tts-1.5-max' | 'inworld-tts-1.5-mini'`): The Inworld TTS model to use.
|
|
44
|
+
|
|
45
|
+
**speechModel.apiKey** (`string`): Inworld API key. Falls back to INWORLD\_API\_KEY environment variable.
|
|
46
|
+
|
|
47
|
+
**listeningModel** (`InworldListeningConfig`): Configuration for speech-to-text functionality. (Default: `{ name: 'groq/whisper-large-v3' }`)
|
|
48
|
+
|
|
49
|
+
**listeningModel.name** (`'groq/whisper-large-v3'`): The Inworld STT model to use.
|
|
50
|
+
|
|
51
|
+
**listeningModel.apiKey** (`string`): Inworld API key. Falls back to INWORLD\_API\_KEY environment variable.
|
|
52
|
+
|
|
53
|
+
**speaker** (`string`): Default voice ID to use for text-to-speech. (Default: `'Dennis'`)
|
|
54
|
+
|
|
55
|
+
**audioEncoding** (`'LINEAR16' | 'MP3' | 'OGG_OPUS' | 'ALAW' | 'MULAW' | 'FLAC' | 'PCM' | 'WAV'`): Default audio encoding for TTS output. (Default: `'MP3'`)
|
|
56
|
+
|
|
57
|
+
**sampleRateHertz** (`number`): Default sample rate for TTS output. (Default: `48000`)
|
|
58
|
+
|
|
59
|
+
**language** (`string`): Default BCP-47 language code for STT. (Default: `'en-US'`)
|
|
60
|
+
|
|
61
|
+
### Methods
|
|
62
|
+
|
|
63
|
+
#### `speak(input, options?)`
|
|
64
|
+
|
|
65
|
+
Converts text to speech using Inworld's streaming TTS endpoint. Returns a readable stream that emits audio chunks progressively as they arrive.
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
const audioStream = await voice.speak('Hello, world!', {
|
|
69
|
+
speaker: 'Olivia',
|
|
70
|
+
audioEncoding: 'WAV',
|
|
71
|
+
sampleRateHertz: 24000,
|
|
72
|
+
speakingRate: 1.2,
|
|
73
|
+
temperature: 0.8,
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**input** (`string | NodeJS.ReadableStream`): Text to convert to speech. If a stream is provided, it will be converted to text first.
|
|
78
|
+
|
|
79
|
+
**options** (`InworldSpeakOptions`): Additional options for speech synthesis.
|
|
80
|
+
|
|
81
|
+
**options.speaker** (`string`): Override the default speaker for this request.
|
|
82
|
+
|
|
83
|
+
**options.audioEncoding** (`AudioEncoding`): Override the default audio encoding.
|
|
84
|
+
|
|
85
|
+
**options.sampleRateHertz** (`number`): Override the default sample rate.
|
|
86
|
+
|
|
87
|
+
**options.speakingRate** (`number`): Adjust the speaking rate.
|
|
88
|
+
|
|
89
|
+
**options.temperature** (`number`): Controls voice variability. Honored on inworld-tts-1.5-\* models; ignored by inworld-tts-2.
|
|
90
|
+
|
|
91
|
+
**options.deliveryMode** (`'STABLE' | 'BALANCED' | 'CREATIVE'`): Steering control for delivery style. Only honored by inworld-tts-2.
|
|
92
|
+
|
|
93
|
+
**options.language** (`string`): BCP-47 language code for this request. Auto-detected when omitted.
|
|
94
|
+
|
|
95
|
+
**Returns:** `Promise<NodeJS.ReadableStream>`
|
|
96
|
+
|
|
97
|
+
#### `listen(input, options?)`
|
|
98
|
+
|
|
99
|
+
Converts speech to text using Inworld's batch STT endpoint.
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
const transcript = await voice.listen(audioStream, {
|
|
103
|
+
audioEncoding: 'MP3',
|
|
104
|
+
sampleRateHertz: 44100,
|
|
105
|
+
language: 'ja-JP',
|
|
106
|
+
})
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**input** (`NodeJS.ReadableStream`): Audio stream to transcribe.
|
|
110
|
+
|
|
111
|
+
**options** (`InworldListenOptions`): Additional options for transcription.
|
|
112
|
+
|
|
113
|
+
**options.audioEncoding** (`'LINEAR16' | 'MP3' | 'OGG_OPUS' | 'FLAC' | 'AUTO_DETECT'`): Audio encoding of the input stream.
|
|
114
|
+
|
|
115
|
+
**options.sampleRateHertz** (`number`): Sample rate of the input audio.
|
|
116
|
+
|
|
117
|
+
**options.language** (`string`): BCP-47 language code for transcription.
|
|
118
|
+
|
|
119
|
+
**options.numberOfChannels** (`number`): Number of audio channels in the input.
|
|
120
|
+
|
|
121
|
+
**Returns:** `Promise<string>`
|
|
122
|
+
|
|
123
|
+
#### `getSpeakers()`
|
|
124
|
+
|
|
125
|
+
Returns a list of available voices from the Inworld API.
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
const speakers = await voice.getSpeakers()
|
|
129
|
+
// [{ voiceId: 'Dennis', name: 'Dennis', language: 'en', description: '...', tags: ['friendly'], source: 'SYSTEM' }, ...]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Returns:** `Promise<Array<{ voiceId: string; name: string; language: string; description: string; tags: string[]; source: string }>>`
|
|
133
|
+
|
|
134
|
+
### Notes
|
|
135
|
+
|
|
136
|
+
- The TTS endpoint uses progressive NDJSON streaming, so audio playback can begin before the full response is received.
|
|
137
|
+
- An API key can be provided via the `speechModel` or `listeningModel` config, or the `INWORLD_API_KEY` environment variable. TTS and STT keys are resolved independently: passing distinct `speechModel.apiKey` and `listeningModel.apiKey` values lets each service use its own credential. If only one is provided, it's reused for both services as a fallback before the env var.
|
|
138
|
+
- `inworld-tts-2` is the default flagship model. Use `deliveryMode` (`STABLE` | `BALANCED` | `CREATIVE`) to steer delivery style on this model. The `temperature` option is ignored on `inworld-tts-2`.
|
|
139
|
+
- The `inworld-tts-1.5-mini` model offers lower latency at the cost of reduced voice quality compared to `inworld-tts-1.5-max`.
|
|
140
|
+
|
|
141
|
+
## Realtime
|
|
4
142
|
|
|
5
143
|
The `InworldRealtimeVoice` class provides real-time, full-duplex voice interaction using [Inworld AI's Realtime API](https://docs.inworld.ai/realtime/quickstart-websocket) over WebSockets. It supports speech-to-speech, tool calling, and Inworld-specific session knobs such as semantic voice activity detection, MCP tool routing, and playback speed.
|
|
6
144
|
|
|
7
145
|
Inworld's wire protocol is the OpenAI Realtime GA spec, so client and server event names match `@mastra/voice-openai-realtime`. The provider-level differences are the endpoint (which uses a client-generated session key in the URL), the `Authorization: Basic <key>` header, the typed `session` constructor field for Inworld-specific knobs, and a typed `providerData` object for Inworld extensions (STT, TTS, memory, back-channel, responsiveness) sent under `session.providerData`.
|
|
8
146
|
|
|
9
|
-
For batch text-to-speech and speech-to-text, see [`@mastra/voice-inworld`](
|
|
147
|
+
For batch text-to-speech and speech-to-text, see [`@mastra/voice-inworld`](#voice).
|
|
10
148
|
|
|
11
|
-
|
|
149
|
+
### Usage example
|
|
12
150
|
|
|
13
151
|
```typescript
|
|
14
152
|
import { InworldRealtimeVoice } from '@mastra/voice-inworld'
|
|
@@ -58,7 +196,7 @@ voice.close()
|
|
|
58
196
|
|
|
59
197
|
> Inworld API keys are pre-Basic-encoded. Paste them verbatim into `INWORLD_API_KEY`. The package doesn't re-encode them.
|
|
60
198
|
|
|
61
|
-
|
|
199
|
+
### Constructor parameters
|
|
62
200
|
|
|
63
201
|
**apiKey** (`string`): Inworld API key. Falls back to the INWORLD\_API\_KEY environment variable. Keys are Basic-encoded and passed verbatim in the Authorization header.
|
|
64
202
|
|
|
@@ -80,7 +218,7 @@ voice.close()
|
|
|
80
218
|
|
|
81
219
|
**connectTimeoutMs** (`number`): Max time connect() will wait for both the WebSocket handshake and the initial session.updated round-trip. A pre-open error or close on the WebSocket — or this timeout expiring — surfaces as a rejected promise instead of an uncaught socket error. (Default: `15000`)
|
|
82
220
|
|
|
83
|
-
|
|
221
|
+
#### `session` (typed knobs)
|
|
84
222
|
|
|
85
223
|
Use the typed `session` field for documented Inworld realtime options. Fields compose with the connect-time defaults (e.g. `audio.output.voice` set from `speaker`):
|
|
86
224
|
|
|
@@ -116,7 +254,7 @@ Use the typed `session` field for documented Inworld realtime options. Fields co
|
|
|
116
254
|
|
|
117
255
|
**prompt** (`string | null`): Reference to a server-side prompt template. Pass null to clear it.
|
|
118
256
|
|
|
119
|
-
|
|
257
|
+
#### `providerData` (Inworld extensions)
|
|
120
258
|
|
|
121
259
|
`providerData` is a typed object for Inworld-specific realtime extensions. It's sent under `session.providerData` on every `session.update`, and composes with any `session.providerData` you set via the `session` field: the constructor `providerData` wins on key collisions.
|
|
122
260
|
|
|
@@ -141,9 +279,9 @@ const voice = new InworldRealtimeVoice({
|
|
|
141
279
|
})
|
|
142
280
|
```
|
|
143
281
|
|
|
144
|
-
|
|
282
|
+
### Methods
|
|
145
283
|
|
|
146
|
-
|
|
284
|
+
#### `connect()`
|
|
147
285
|
|
|
148
286
|
Opens the WebSocket connection, sends the initial `session.update`, and resolves once the server acknowledges with `session.updated`. Must be called before `speak()`, `listen()`, or `send()`.
|
|
149
287
|
|
|
@@ -155,7 +293,7 @@ await voice.connect()
|
|
|
155
293
|
|
|
156
294
|
Returns: `Promise<void>`
|
|
157
295
|
|
|
158
|
-
|
|
296
|
+
#### `speak()`
|
|
159
297
|
|
|
160
298
|
Sends a text message to the model and triggers an audio response. The returned promise resolves only after the full response lifecycle completes (`response.done` for the response this call triggered), and rejects if the response is interrupted by user speech or if a transport error occurs.
|
|
161
299
|
|
|
@@ -169,7 +307,7 @@ Serial `speak()` calls are the supported pattern. Concurrent calls share the sam
|
|
|
169
307
|
|
|
170
308
|
Returns: `Promise<void>`
|
|
171
309
|
|
|
172
|
-
|
|
310
|
+
#### `listen()`
|
|
173
311
|
|
|
174
312
|
Sends a single audio buffer as a user turn and asks the model to respond with text only.
|
|
175
313
|
|
|
@@ -177,7 +315,7 @@ Sends a single audio buffer as a user turn and asks the model to respond with te
|
|
|
177
315
|
|
|
178
316
|
Returns: `Promise<void>`
|
|
179
317
|
|
|
180
|
-
|
|
318
|
+
#### `send()`
|
|
181
319
|
|
|
182
320
|
Streams audio data to the server in real time. Useful for continuous microphone input.
|
|
183
321
|
|
|
@@ -187,7 +325,7 @@ Streams audio data to the server in real time. Useful for continuous microphone
|
|
|
187
325
|
|
|
188
326
|
Returns: `Promise<void>`
|
|
189
327
|
|
|
190
|
-
|
|
328
|
+
#### `updateConfig()`
|
|
191
329
|
|
|
192
330
|
Sends a `session.update` to the server. The typed `session` field is deep-merged into the payload, and any constructor `providerData` is nested under `session.providerData`.
|
|
193
331
|
|
|
@@ -195,7 +333,7 @@ Sends a `session.update` to the server. The typed `session` field is deep-merged
|
|
|
195
333
|
|
|
196
334
|
Returns: `void`
|
|
197
335
|
|
|
198
|
-
|
|
336
|
+
#### `addInstructions()`
|
|
199
337
|
|
|
200
338
|
Sets the system instructions used on the next `connect()` or `updateConfig()` call.
|
|
201
339
|
|
|
@@ -203,7 +341,7 @@ Sets the system instructions used on the next `connect()` or `updateConfig()` ca
|
|
|
203
341
|
|
|
204
342
|
Returns: `void`
|
|
205
343
|
|
|
206
|
-
|
|
344
|
+
#### `addTools()`
|
|
207
345
|
|
|
208
346
|
Registers tools that the model can call during the session. When `InworldRealtimeVoice` is attached to an Agent, tools configured for the Agent are made available automatically.
|
|
209
347
|
|
|
@@ -211,7 +349,7 @@ Registers tools that the model can call during the session. When `InworldRealtim
|
|
|
211
349
|
|
|
212
350
|
Returns: `void`
|
|
213
351
|
|
|
214
|
-
|
|
352
|
+
#### `answer()`
|
|
215
353
|
|
|
216
354
|
Sends a `response.create` event to trigger a model response, optionally with per-response options.
|
|
217
355
|
|
|
@@ -219,9 +357,9 @@ Sends a `response.create` event to trigger a model response, optionally with per
|
|
|
219
357
|
|
|
220
358
|
Returns: `Promise<void>`
|
|
221
359
|
|
|
222
|
-
|
|
360
|
+
#### Turn-taking
|
|
223
361
|
|
|
224
|
-
|
|
362
|
+
##### `commitInput()`
|
|
225
363
|
|
|
226
364
|
Manually commits buffered input audio as a user turn. Use this for push-to-talk or manual turn-taking when `turn_detection` is set to `null`.
|
|
227
365
|
|
|
@@ -231,7 +369,7 @@ voice.commitInput()
|
|
|
231
369
|
|
|
232
370
|
Returns: `void`
|
|
233
371
|
|
|
234
|
-
|
|
372
|
+
##### `clearInput()`
|
|
235
373
|
|
|
236
374
|
Discards buffered input audio without committing it as a user turn.
|
|
237
375
|
|
|
@@ -241,7 +379,7 @@ voice.clearInput()
|
|
|
241
379
|
|
|
242
380
|
Returns: `void`
|
|
243
381
|
|
|
244
|
-
|
|
382
|
+
##### `clearOutput()`
|
|
245
383
|
|
|
246
384
|
Clears the server's entire output audio buffer, stopping playback. This also stops any in-flight back-channel audio. The default barge-in path (`response.cancel` on `interrupted`) is back-channel-safe. Prefer it. Use `clearOutput()` only when you want to flush everything.
|
|
247
385
|
|
|
@@ -251,23 +389,23 @@ voice.clearOutput()
|
|
|
251
389
|
|
|
252
390
|
Returns: `void`
|
|
253
391
|
|
|
254
|
-
|
|
392
|
+
#### `close()` and `disconnect()`
|
|
255
393
|
|
|
256
394
|
Both methods close the WebSocket and mark the instance as disconnected.
|
|
257
395
|
|
|
258
396
|
Returns: `void`
|
|
259
397
|
|
|
260
|
-
|
|
398
|
+
#### `getSpeakers()`
|
|
261
399
|
|
|
262
400
|
Returns the curated voice list bundled with the package. Inworld's catalog is larger than this list; any voice ID can be passed to `speaker` at runtime.
|
|
263
401
|
|
|
264
402
|
Returns: `Promise<Array<{ voiceId: string }>>`
|
|
265
403
|
|
|
266
|
-
|
|
404
|
+
#### `on()` and `off()`
|
|
267
405
|
|
|
268
406
|
Register and remove event listeners. See [Events](#events) below.
|
|
269
407
|
|
|
270
|
-
|
|
408
|
+
### Events
|
|
271
409
|
|
|
272
410
|
The `InworldRealtimeVoice` class emits the following events:
|
|
273
411
|
|
|
@@ -325,7 +463,7 @@ The `InworldRealtimeVoice` class emits the following events:
|
|
|
325
463
|
|
|
326
464
|
**error** (`event`): Emitted on transport or server errors.
|
|
327
465
|
|
|
328
|
-
|
|
466
|
+
### Voices
|
|
329
467
|
|
|
330
468
|
The package includes a curated set of voice IDs returned from `getSpeakers()`:
|
|
331
469
|
|
|
@@ -342,7 +480,7 @@ The package includes a curated set of voice IDs returned from `getSpeakers()`:
|
|
|
342
480
|
|
|
343
481
|
Any voice ID from [Inworld's voice catalog](https://docs.inworld.ai/quickstart-tts) can be passed to `speaker` at runtime.
|
|
344
482
|
|
|
345
|
-
|
|
483
|
+
### Notes
|
|
346
484
|
|
|
347
485
|
- API keys can be provided via constructor options or the `INWORLD_API_KEY` environment variable. Keys are pre-Basic-encoded. Don't re-encode them.
|
|
348
486
|
- The WebSocket URL appends `?key=<sessionId>&protocol=realtime`. The model is configured via the initial `session.update`, not the URL.
|