@mastra/voice-murf 0.12.2-alpha.0 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @mastra/voice-murf
2
2
 
3
+ ## 0.12.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Moved shared voice primitives and route metadata into the new `@internal/voice` package so voice providers no longer depend on `@mastra/core` and server voice routes share the same route definitions. ([#16725](https://github.com/mastra-ai/mastra/pull/16725))
8
+
9
+ `@mastra/core/voice` continues to re-export the voice APIs for backwards compatibility.
10
+
3
11
  ## 0.12.2-alpha.0
4
12
 
5
13
  ### Patch Changes
@@ -1,3 +1,5 @@
1
+ import { JSONSchema7 } from 'json-schema';
2
+ import { JSONSchema7Definition } from 'json-schema';
1
3
  import { ServerResponse } from 'node:http';
2
4
  import { ServerResponse as ServerResponse_2 } from 'http';
3
5
  import { z } from '../../zod/v4/index.d.cts';
@@ -3507,164 +3509,7 @@ export declare function jsonSchema<OBJECT = unknown>(jsonSchema: JSONSchema7 | (
3507
3509
  validate?: (value: unknown) => ValidationResult<OBJECT> | PromiseLike<ValidationResult<OBJECT>>;
3508
3510
  }): Schema<OBJECT>;
3509
3511
 
3510
- export declare interface JSONSchema7 {
3511
- $id?: string | undefined;
3512
- $ref?: string | undefined;
3513
- $schema?: JSONSchema7Version | undefined;
3514
- $comment?: string | undefined;
3515
-
3516
- /**
3517
- * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
3518
- * @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
3519
- */
3520
- $defs?: {
3521
- [key: string]: JSONSchema7Definition;
3522
- } | undefined;
3523
-
3524
- /**
3525
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
3526
- */
3527
- type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
3528
- enum?: JSONSchema7Type[] | undefined;
3529
- const?: JSONSchema7Type | undefined;
3530
-
3531
- /**
3532
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
3533
- */
3534
- multipleOf?: number | undefined;
3535
- maximum?: number | undefined;
3536
- exclusiveMaximum?: number | undefined;
3537
- minimum?: number | undefined;
3538
- exclusiveMinimum?: number | undefined;
3539
-
3540
- /**
3541
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
3542
- */
3543
- maxLength?: number | undefined;
3544
- minLength?: number | undefined;
3545
- pattern?: string | undefined;
3546
-
3547
- /**
3548
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
3549
- */
3550
- items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
3551
- additionalItems?: JSONSchema7Definition | undefined;
3552
- maxItems?: number | undefined;
3553
- minItems?: number | undefined;
3554
- uniqueItems?: boolean | undefined;
3555
- contains?: JSONSchema7Definition | undefined;
3556
-
3557
- /**
3558
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
3559
- */
3560
- maxProperties?: number | undefined;
3561
- minProperties?: number | undefined;
3562
- required?: string[] | undefined;
3563
- properties?: {
3564
- [key: string]: JSONSchema7Definition;
3565
- } | undefined;
3566
- patternProperties?: {
3567
- [key: string]: JSONSchema7Definition;
3568
- } | undefined;
3569
- additionalProperties?: JSONSchema7Definition | undefined;
3570
- dependencies?: {
3571
- [key: string]: JSONSchema7Definition | string[];
3572
- } | undefined;
3573
- propertyNames?: JSONSchema7Definition | undefined;
3574
-
3575
- /**
3576
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
3577
- */
3578
- if?: JSONSchema7Definition | undefined;
3579
- then?: JSONSchema7Definition | undefined;
3580
- else?: JSONSchema7Definition | undefined;
3581
-
3582
- /**
3583
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
3584
- */
3585
- allOf?: JSONSchema7Definition[] | undefined;
3586
- anyOf?: JSONSchema7Definition[] | undefined;
3587
- oneOf?: JSONSchema7Definition[] | undefined;
3588
- not?: JSONSchema7Definition | undefined;
3589
-
3590
- /**
3591
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
3592
- */
3593
- format?: string | undefined;
3594
-
3595
- /**
3596
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
3597
- */
3598
- contentMediaType?: string | undefined;
3599
- contentEncoding?: string | undefined;
3600
-
3601
- /**
3602
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
3603
- */
3604
- definitions?: {
3605
- [key: string]: JSONSchema7Definition;
3606
- } | undefined;
3607
-
3608
- /**
3609
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
3610
- */
3611
- title?: string | undefined;
3612
- description?: string | undefined;
3613
- default?: JSONSchema7Type | undefined;
3614
- readOnly?: boolean | undefined;
3615
- writeOnly?: boolean | undefined;
3616
- examples?: JSONSchema7Type | undefined;
3617
- }
3618
-
3619
- declare interface JSONSchema7Array extends Array<JSONSchema7Type> {}
3620
-
3621
- /**
3622
- * JSON Schema v7
3623
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
3624
- */
3625
- declare type JSONSchema7Definition = JSONSchema7 | boolean;
3626
-
3627
- declare interface JSONSchema7Object {
3628
- [key: string]: JSONSchema7Type;
3629
- }
3630
-
3631
- /**
3632
- * Primitive type
3633
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
3634
- */
3635
- declare type JSONSchema7Type =
3636
- | string //
3637
- | number
3638
- | boolean
3639
- | JSONSchema7Object
3640
- | JSONSchema7Array
3641
- | null;
3642
-
3643
- /**
3644
- * Primitive type
3645
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
3646
- */
3647
- declare type JSONSchema7TypeName =
3648
- | "string" //
3649
- | "number"
3650
- | "integer"
3651
- | "boolean"
3652
- | "object"
3653
- | "array"
3654
- | "null";
3655
-
3656
- /**
3657
- * Meta schema
3658
- *
3659
- * Recommended values:
3660
- * - 'http://json-schema.org/schema#'
3661
- * - 'http://json-schema.org/hyper-schema#'
3662
- * - 'http://json-schema.org/draft-07/schema#'
3663
- * - 'http://json-schema.org/draft-07/hyper-schema#'
3664
- *
3665
- * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
3666
- */
3667
- declare type JSONSchema7Version = string;
3512
+ export { JSONSchema7 }
3668
3513
 
3669
3514
  export declare class JsonToSseTransformStream extends TransformStream<unknown, string> {
3670
3515
  constructor();
@@ -9039,5 +8884,5 @@ export declare function zodSchema<OBJECT>(zodSchema: z4.core.$ZodType<OBJECT, an
9039
8884
  }): Schema<OBJECT>;
9040
8885
 
9041
8886
  export { }
9042
- export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, ParseResult as ParseResult, FlexibleValidator as FlexibleValidator, ValidationResult as ValidationResult, LanguageModelV2ToolResultOutput as LanguageModelV2ToolResultOutput, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, ToolOutputProperties as ToolOutputProperties, LanguageModelV2ToolResultPart as LanguageModelV2ToolResultPart, FlexibleSchema as FlexibleSchema, JSONSchema7Version as JSONSchema7Version, JSONSchema7Definition as JSONSchema7Definition, JSONSchema7TypeName as JSONSchema7TypeName, JSONSchema7Type as JSONSchema7Type, ImageModelV2CallWarning as ImageModelV2CallWarning, SpeechModelV2CallWarning as SpeechModelV2CallWarning, TranscriptionModelV2CallWarning as TranscriptionModelV2CallWarning, AttributeValue as AttributeValue, Tracer as Tracer, EmbeddingModelV2Embedding as EmbeddingModelV2Embedding, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2FinishReason as LanguageModelV2FinishReason, LanguageModelV2CallWarning as LanguageModelV2CallWarning, LanguageModelV2Middleware as LanguageModelV2Middleware, SharedV2ProviderMetadata as SharedV2ProviderMetadata, LanguageModelV2Usage as LanguageModelV2Usage, Source as Source, ResponseMessage as ResponseMessage, DeepPartialInternal as DeepPartialInternal, LanguageModelV2ToolCall as LanguageModelV2ToolCall, StreamTextOnAbortCallback as StreamTextOnAbortCallback, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, _ai_sdk_provider as _ai_sdk_provider, DataUIMessageChunk as DataUIMessageChunk, ConsumeStreamOptions as ConsumeStreamOptions, Output_2 as Output_2, InferAgentTools as InferAgentTools, SingleRequestTextStreamPart as SingleRequestTextStreamPart, RetryErrorReason as RetryErrorReason, InferSchema as InferSchema, Job as Job, StreamObjectOnErrorCallback as StreamObjectOnErrorCallback, JSONValue_2 as JSONValue_2, LanguageModelV2CallOptions as LanguageModelV2CallOptions, LanguageModelV2 as LanguageModelV2, EmbeddingModelV2 as EmbeddingModelV2, ImageModelV2 as ImageModelV2, TranscriptionModelV2 as TranscriptionModelV2, SpeechModelV2 as SpeechModelV2, ExtractModelId as ExtractModelId, ExtractLiteralUnion as ExtractLiteralUnion, ProviderV2 as ProviderV2, getOriginalFetch as getOriginalFetch, UIMessageStreamResponseInit as UIMessageStreamResponseInit, InferUIMessageToolCall as InferUIMessageToolCall, Validator as Validator, StandardSchemaV1 as StandardSchemaV1, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, InferUIMessageTools as InferUIMessageTools, Resolvable as Resolvable, FetchFunction as FetchFunction };
8887
+ export { GatewayProviderSettings as GatewayProviderSettings, GatewayProvider as GatewayProvider, ParseResult as ParseResult, FlexibleValidator as FlexibleValidator, ValidationResult as ValidationResult, LanguageModelV2ToolResultOutput as LanguageModelV2ToolResultOutput, ProviderOptions as ProviderOptions, ReasoningPart as ReasoningPart, ToolOutputProperties as ToolOutputProperties, LanguageModelV2ToolResultPart as LanguageModelV2ToolResultPart, FlexibleSchema as FlexibleSchema, ImageModelV2CallWarning as ImageModelV2CallWarning, SpeechModelV2CallWarning as SpeechModelV2CallWarning, TranscriptionModelV2CallWarning as TranscriptionModelV2CallWarning, AttributeValue as AttributeValue, Tracer as Tracer, EmbeddingModelV2Embedding as EmbeddingModelV2Embedding, ImageModelV2ProviderMetadata as ImageModelV2ProviderMetadata, GlobalProviderModelId as GlobalProviderModelId, LanguageModelV2FinishReason as LanguageModelV2FinishReason, LanguageModelV2CallWarning as LanguageModelV2CallWarning, LanguageModelV2Middleware as LanguageModelV2Middleware, SharedV2ProviderMetadata as SharedV2ProviderMetadata, LanguageModelV2Usage as LanguageModelV2Usage, Source as Source, ResponseMessage as ResponseMessage, DeepPartialInternal as DeepPartialInternal, LanguageModelV2ToolCall as LanguageModelV2ToolCall, StreamTextOnAbortCallback as StreamTextOnAbortCallback, ValueOf as ValueOf, asUITool as asUITool, _ai_sdk_provider_utils as _ai_sdk_provider_utils, _ai_sdk_provider as _ai_sdk_provider, DataUIMessageChunk as DataUIMessageChunk, ConsumeStreamOptions as ConsumeStreamOptions, Output_2 as Output_2, InferAgentTools as InferAgentTools, SingleRequestTextStreamPart as SingleRequestTextStreamPart, RetryErrorReason as RetryErrorReason, InferSchema as InferSchema, Job as Job, StreamObjectOnErrorCallback as StreamObjectOnErrorCallback, JSONValue_2 as JSONValue_2, LanguageModelV2CallOptions as LanguageModelV2CallOptions, LanguageModelV2 as LanguageModelV2, EmbeddingModelV2 as EmbeddingModelV2, ImageModelV2 as ImageModelV2, TranscriptionModelV2 as TranscriptionModelV2, SpeechModelV2 as SpeechModelV2, ExtractModelId as ExtractModelId, ExtractLiteralUnion as ExtractLiteralUnion, ProviderV2 as ProviderV2, getOriginalFetch as getOriginalFetch, UIMessageStreamResponseInit as UIMessageStreamResponseInit, InferUIMessageToolCall as InferUIMessageToolCall, Validator as Validator, StandardSchemaV1 as StandardSchemaV1, UIDataTypesToSchemas as UIDataTypesToSchemas, InferUIMessageData as InferUIMessageData, InferUIMessageMetadata as InferUIMessageMetadata, InferUIMessageTools as InferUIMessageTools, Resolvable as Resolvable, FetchFunction as FetchFunction };
9043
8888
  export { schemaSymbol, symbol$1, symbol$1_2, symbol$2, symbol$2_2, symbol$3, symbol$3_2, symbol$4, symbol$4_2, symbol$5, symbol$5_2, symbol$6, symbol$6_2, symbol$7, symbol$7_2, symbol$8, symbol$8_2, symbol$9, symbol$9_2, symbol$a, symbol$a_2, symbol$b, symbol$b_2, symbol$c, symbol$c_2, symbol$d, symbol$d_2, symbol$e, symbol, symbol_2, symbol_3, validatorSymbol };
@@ -3,7 +3,7 @@ name: mastra-voice-murf
3
3
  description: Documentation for @mastra/voice-murf. Use when working with @mastra/voice-murf APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/voice-murf"
6
- version: "0.12.2-alpha.0"
6
+ version: "0.12.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.12.2-alpha.0",
2
+ "version": "0.12.2",
3
3
  "package": "@mastra/voice-murf",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -20,7 +20,7 @@ export const agent = new Agent({
20
20
  id: 'voice-agent',
21
21
  name: 'Voice Agent',
22
22
  instructions: `You are a helpful assistant with both STT and TTS capabilities.`,
23
- model: 'openai/gpt-5.4',
23
+ model: 'openai/gpt-5.5',
24
24
  voice,
25
25
  })
26
26
 
@@ -109,7 +109,7 @@ export const agent = new Agent({
109
109
  id: 'speech-to-speech-agent',
110
110
  name: 'Speech-to-Speech Agent',
111
111
  instructions: `You are a helpful assistant with speech-to-speech capabilities.`,
112
- model: 'openai/gpt-5.4',
112
+ model: 'openai/gpt-5.5',
113
113
  tools: {
114
114
  // Tools configured on Agent are passed to voice provider
115
115
  search,
@@ -132,6 +132,37 @@ agent.voice.send(microphoneStream)
132
132
  agent.voice.close()
133
133
  ```
134
134
 
135
+ ### Per-session voice for concurrent sessions
136
+
137
+ A static `voice` instance is shared across every request. For one-shot text-to-speech this is fine, but realtime and speech-to-speech providers store one WebSocket, one set of tools, and one request context per instance. If you deploy a single agent that handles several live sessions at once, a shared instance lets one session overwrite another session's tools, instructions, and request context.
138
+
139
+ To give each session its own voice, provide `voice` as a resolver. Mastra runs the resolver on every `getVoice()` call and returns a fresh, session-owned instance:
140
+
141
+ ```typescript
142
+ import { Agent } from '@mastra/core/agent'
143
+ import { OpenAIRealtimeVoice } from '@mastra/voice-openai-realtime'
144
+
145
+ export const agent = new Agent({
146
+ id: 'support-line',
147
+ name: 'Support Line',
148
+ instructions: ({ requestContext }) => `Help user ${requestContext.get('user')}.`,
149
+ model: 'openai/gpt-5.5',
150
+ voice: ({ requestContext }) => new OpenAIRealtimeVoice({ apiKey: requestContext.get('apiKey') }),
151
+ })
152
+
153
+ // Each concurrent session resolves its own voice instance
154
+ const voice = await agent.getVoice({ requestContext })
155
+ await voice.connect()
156
+ ```
157
+
158
+ When you use a resolver:
159
+
160
+ - Each call to `getVoice()` returns a new instance, so concurrent sessions never share state.
161
+ - Mastra does not add tools or instructions to a resolver instance. Configure those inside the resolver or on the provider.
162
+ - You own the lifecycle of the returned instance, so call `disconnect()` or `close()` when the session ends.
163
+
164
+ The `agent.voice` getter has no request context, so it throws when `voice` is a resolver. Use `agent.getVoice({ requestContext })` instead.
165
+
135
166
  ### Event System
136
167
 
137
168
  The realtime voice provider emits several events you can listen for:
@@ -209,7 +240,7 @@ export const convertToText = async (input: string | NodeJS.ReadableStream): Prom
209
240
  export const hybridVoiceAgent = new Agent({
210
241
  id: 'hybrid-voice-agent',
211
242
  name: 'Hybrid Voice Agent',
212
- model: 'openai/gpt-5.4',
243
+ model: 'openai/gpt-5.5',
213
244
  instructions: 'You can speak and listen using different providers.',
214
245
  voice: new CompositeVoice({
215
246
  input: new OpenAIVoice(),
@@ -221,7 +252,7 @@ export const unifiedVoiceAgent = new Agent({
221
252
  id: 'unified-voice-agent',
222
253
  name: 'Unified Voice Agent',
223
254
  instructions: 'You are an agent with both STT and TTS capabilities.',
224
- model: 'openai/gpt-5.4',
255
+ model: 'openai/gpt-5.5',
225
256
  voice: new OpenAIVoice(),
226
257
  })
227
258
 
@@ -263,7 +294,7 @@ export const agent = new Agent({
263
294
  id: 'voice-agent',
264
295
  name: 'Voice Agent',
265
296
  instructions: `You are a helpful assistant with both STT and TTS capabilities.`,
266
- model: 'openai/gpt-5.4',
297
+ model: 'openai/gpt-5.5',
267
298
 
268
299
  // Create a composite voice using OpenAI for listening and PlayAI for speaking
269
300
  voice: new CompositeVoice({
@@ -288,7 +319,7 @@ export const agent = new Agent({
288
319
  id: 'aisdk-voice-agent',
289
320
  name: 'AI SDK Voice Agent',
290
321
  instructions: `You are a helpful assistant with voice capabilities.`,
291
- model: 'openai/gpt-5.4',
322
+ model: 'openai/gpt-5.5',
292
323
 
293
324
  // Pass AI SDK models directly to CompositeVoice
294
325
  voice: new CompositeVoice({
@@ -16,7 +16,7 @@ const voiceAgent = new Agent({
16
16
  id: 'voice-agent',
17
17
  name: 'Voice Agent',
18
18
  instructions: 'You are a voice assistant that can help users with their tasks.',
19
- model: 'openai/gpt-5.4',
19
+ model: 'openai/gpt-5.5',
20
20
  voice: new OpenAIVoice(),
21
21
  })
22
22
  ```
@@ -40,7 +40,7 @@ const voiceAgent = new Agent({
40
40
  id: 'voice-agent',
41
41
  name: 'Voice Agent',
42
42
  instructions: 'You are a voice assistant that can help users with their tasks.',
43
- model: 'openai/gpt-5.4',
43
+ model: 'openai/gpt-5.5',
44
44
  voice: new OpenAIVoice(),
45
45
  })
46
46
 
@@ -68,7 +68,7 @@ const voiceAgent = new Agent({
68
68
  id: 'voice-agent',
69
69
  name: 'Voice Agent',
70
70
  instructions: 'You are a voice assistant that can help users with their tasks.',
71
- model: 'openai/gpt-5.4',
71
+ model: 'openai/gpt-5.5',
72
72
  voice: new AzureVoice(),
73
73
  })
74
74
 
@@ -95,7 +95,7 @@ const voiceAgent = new Agent({
95
95
  id: 'voice-agent',
96
96
  name: 'Voice Agent',
97
97
  instructions: 'You are a voice assistant that can help users with their tasks.',
98
- model: 'openai/gpt-5.4',
98
+ model: 'openai/gpt-5.5',
99
99
  voice: new ElevenLabsVoice(),
100
100
  })
101
101
 
@@ -122,7 +122,7 @@ const voiceAgent = new Agent({
122
122
  id: 'voice-agent',
123
123
  name: 'Voice Agent',
124
124
  instructions: 'You are a voice assistant that can help users with their tasks.',
125
- model: 'openai/gpt-5.4',
125
+ model: 'openai/gpt-5.5',
126
126
  voice: new PlayAIVoice(),
127
127
  })
128
128
 
@@ -149,7 +149,7 @@ const voiceAgent = new Agent({
149
149
  id: 'voice-agent',
150
150
  name: 'Voice Agent',
151
151
  instructions: 'You are a voice assistant that can help users with their tasks.',
152
- model: 'openai/gpt-5.4',
152
+ model: 'openai/gpt-5.5',
153
153
  voice: new GoogleVoice(),
154
154
  })
155
155
 
@@ -176,7 +176,7 @@ const voiceAgent = new Agent({
176
176
  id: 'voice-agent',
177
177
  name: 'Voice Agent',
178
178
  instructions: 'You are a voice assistant that can help users with their tasks.',
179
- model: 'openai/gpt-5.4',
179
+ model: 'openai/gpt-5.5',
180
180
  voice: new CloudflareVoice(),
181
181
  })
182
182
 
@@ -203,7 +203,7 @@ const voiceAgent = new Agent({
203
203
  id: 'voice-agent',
204
204
  name: 'Voice Agent',
205
205
  instructions: 'You are a voice assistant that can help users with their tasks.',
206
- model: 'openai/gpt-5.4',
206
+ model: 'openai/gpt-5.5',
207
207
  voice: new DeepgramVoice(),
208
208
  })
209
209
 
@@ -230,7 +230,7 @@ const voiceAgent = new Agent({
230
230
  id: 'voice-agent',
231
231
  name: 'Voice Agent',
232
232
  instructions: 'You are a voice assistant that can help users with their tasks.',
233
- model: 'openai/gpt-5.4',
233
+ model: 'openai/gpt-5.5',
234
234
  voice: new InworldVoice(),
235
235
  })
236
236
 
@@ -257,7 +257,7 @@ const voiceAgent = new Agent({
257
257
  id: 'voice-agent',
258
258
  name: 'Voice Agent',
259
259
  instructions: 'You are a voice assistant that can help users with their tasks.',
260
- model: 'openai/gpt-5.4',
260
+ model: 'openai/gpt-5.5',
261
261
  voice: new SpeechifyVoice(),
262
262
  })
263
263
 
@@ -284,7 +284,7 @@ const voiceAgent = new Agent({
284
284
  id: 'voice-agent',
285
285
  name: 'Voice Agent',
286
286
  instructions: 'You are a voice assistant that can help users with their tasks.',
287
- model: 'openai/gpt-5.4',
287
+ model: 'openai/gpt-5.5',
288
288
  voice: new SarvamVoice(),
289
289
  })
290
290
 
@@ -311,7 +311,7 @@ const voiceAgent = new Agent({
311
311
  id: 'voice-agent',
312
312
  name: 'Voice Agent',
313
313
  instructions: 'You are a voice assistant that can help users with their tasks.',
314
- model: 'openai/gpt-5.4',
314
+ model: 'openai/gpt-5.5',
315
315
  voice: new MurfVoice(),
316
316
  })
317
317
 
@@ -346,7 +346,7 @@ const voiceAgent = new Agent({
346
346
  id: 'voice-agent',
347
347
  name: 'Voice Agent',
348
348
  instructions: 'You are a voice assistant that can help users with their tasks.',
349
- model: 'openai/gpt-5.4',
349
+ model: 'openai/gpt-5.5',
350
350
  voice: new OpenAIVoice(),
351
351
  })
352
352
 
@@ -375,7 +375,7 @@ const voiceAgent = new Agent({
375
375
  id: 'voice-agent',
376
376
  name: 'Voice Agent',
377
377
  instructions: 'You are a voice assistant that can help users with their tasks.',
378
- model: 'openai/gpt-5.4',
378
+ model: 'openai/gpt-5.5',
379
379
  voice: new AzureVoice(),
380
380
  })
381
381
 
@@ -403,7 +403,7 @@ const voiceAgent = new Agent({
403
403
  id: 'voice-agent',
404
404
  name: 'Voice Agent',
405
405
  instructions: 'You are a voice assistant that can help users with their tasks.',
406
- model: 'openai/gpt-5.4',
406
+ model: 'openai/gpt-5.5',
407
407
  voice: new ElevenLabsVoice(),
408
408
  })
409
409
 
@@ -431,7 +431,7 @@ const voiceAgent = new Agent({
431
431
  id: 'voice-agent',
432
432
  name: 'Voice Agent',
433
433
  instructions: 'You are a voice assistant that can help users with their tasks.',
434
- model: 'openai/gpt-5.4',
434
+ model: 'openai/gpt-5.5',
435
435
  voice: new GoogleVoice(),
436
436
  })
437
437
 
@@ -459,7 +459,7 @@ const voiceAgent = new Agent({
459
459
  id: 'voice-agent',
460
460
  name: 'Voice Agent',
461
461
  instructions: 'You are a voice assistant that can help users with their tasks.',
462
- model: 'openai/gpt-5.4',
462
+ model: 'openai/gpt-5.5',
463
463
  voice: new CloudflareVoice(),
464
464
  })
465
465
 
@@ -487,7 +487,7 @@ const voiceAgent = new Agent({
487
487
  id: 'voice-agent',
488
488
  name: 'Voice Agent',
489
489
  instructions: 'You are a voice assistant that can help users with their tasks.',
490
- model: 'openai/gpt-5.4',
490
+ model: 'openai/gpt-5.5',
491
491
  voice: new DeepgramVoice(),
492
492
  })
493
493
 
@@ -515,7 +515,7 @@ const voiceAgent = new Agent({
515
515
  id: 'voice-agent',
516
516
  name: 'Voice Agent',
517
517
  instructions: 'You are a voice assistant that can help users with their tasks.',
518
- model: 'openai/gpt-5.4',
518
+ model: 'openai/gpt-5.5',
519
519
  voice: new InworldVoice(),
520
520
  })
521
521
 
@@ -543,7 +543,7 @@ const voiceAgent = new Agent({
543
543
  id: 'voice-agent',
544
544
  name: 'Voice Agent',
545
545
  instructions: 'You are a voice assistant that can help users with their tasks.',
546
- model: 'openai/gpt-5.4',
546
+ model: 'openai/gpt-5.5',
547
547
  voice: new SarvamVoice(),
548
548
  })
549
549
 
@@ -575,7 +575,7 @@ const voiceAgent = new Agent({
575
575
  id: 'voice-agent',
576
576
  name: 'Voice Agent',
577
577
  instructions: 'You are a voice assistant that can help users with their tasks.',
578
- model: 'openai/gpt-5.4',
578
+ model: 'openai/gpt-5.5',
579
579
  voice: new OpenAIRealtimeVoice(),
580
580
  })
581
581
 
@@ -605,7 +605,7 @@ const voiceAgent = new Agent({
605
605
  id: 'voice-agent',
606
606
  name: 'Voice Agent',
607
607
  instructions: 'You are a voice assistant that can help users with their tasks.',
608
- model: 'openai/gpt-5.4',
608
+ model: 'openai/gpt-5.5',
609
609
  voice: new GeminiLiveVoice({
610
610
  // Live API mode
611
611
  apiKey: process.env.GOOGLE_API_KEY,
@@ -654,7 +654,7 @@ const voiceAgent = new Agent({
654
654
  id: 'voice-agent',
655
655
  name: 'Voice Agent',
656
656
  instructions: 'You are a voice assistant that can help users with their tasks.',
657
- model: 'openai/gpt-5.4',
657
+ model: 'openai/gpt-5.5',
658
658
  voice: new NovaSonicVoice({
659
659
  region: 'us-east-1',
660
660
  speaker: 'matthew',
@@ -686,6 +686,48 @@ await voiceAgent.voice.send(micStream)
686
686
 
687
687
  Visit the [AWS Nova Sonic Reference](https://mastra.ai/reference/voice/aws-nova-sonic) for more information on the AWS Nova Sonic voice provider.
688
688
 
689
+ **Inworld Realtime**:
690
+
691
+ ```typescript
692
+ import { Agent } from '@mastra/core/agent'
693
+ import { playAudio, getMicrophoneStream } from '@mastra/node-audio'
694
+ import { InworldRealtimeVoice } from '@mastra/voice-inworld'
695
+
696
+ const voiceAgent = new Agent({
697
+ id: 'voice-agent',
698
+ name: 'Voice Agent',
699
+ instructions: 'You are a voice assistant that can help users with their tasks.',
700
+ model: 'openai/gpt-5.5',
701
+ voice: new InworldRealtimeVoice({
702
+ apiKey: process.env.INWORLD_API_KEY,
703
+ model: 'inworld/models/gemma-4-26b-a4b-it',
704
+ speaker: 'Sarah',
705
+ }),
706
+ })
707
+
708
+ // Connect before using speak/send
709
+ await voiceAgent.voice.connect()
710
+
711
+ // Listen for agent audio (PCM stream)
712
+ voiceAgent.voice.on('speaker', stream => {
713
+ playAudio(stream)
714
+ })
715
+
716
+ // Listen for text responses and transcriptions
717
+ voiceAgent.voice.on('writing', ({ text, role }) => {
718
+ console.log(`${role}: ${text}`)
719
+ })
720
+
721
+ // Initiate the conversation
722
+ await voiceAgent.voice.speak('How can I help you today?')
723
+
724
+ // Send continuous audio from the microphone
725
+ const micStream = getMicrophoneStream()
726
+ await voiceAgent.voice.send(micStream)
727
+ ```
728
+
729
+ Visit the [Inworld Realtime Reference](https://mastra.ai/reference/voice/inworld-realtime) for more information on the Inworld Realtime voice provider.
730
+
689
731
  **xAI**:
690
732
 
691
733
  ```typescript
@@ -1051,6 +1093,26 @@ const voice = new NovaSonicVoice({
1051
1093
 
1052
1094
  Visit the [AWS Nova Sonic Reference](https://mastra.ai/reference/voice/aws-nova-sonic) for more information on the AWS Nova Sonic voice provider.
1053
1095
 
1096
+ **Inworld Realtime**:
1097
+
1098
+ ```typescript
1099
+ // Inworld Realtime Voice Configuration
1100
+ const voice = new InworldRealtimeVoice({
1101
+ apiKey: process.env.INWORLD_API_KEY,
1102
+ model: 'inworld/models/gemma-4-26b-a4b-it',
1103
+ speaker: 'Sarah',
1104
+ // Typed Inworld realtime knobs (semantic VAD, playback speed, MCP tool routing, ...)
1105
+ session: {
1106
+ audio: {
1107
+ output: { speed: 1.1 },
1108
+ input: { turn_detection: { type: 'semantic_vad', eagerness: 'high' } },
1109
+ },
1110
+ },
1111
+ })
1112
+ ```
1113
+
1114
+ Visit the [Inworld Realtime Reference](https://mastra.ai/reference/voice/inworld-realtime) for more information on the Inworld Realtime voice provider.
1115
+
1054
1116
  **AI SDK**:
1055
1117
 
1056
1118
  ```typescript
@@ -1070,7 +1132,7 @@ const voiceAgent = new Agent({
1070
1132
  id: 'aisdk-voice-agent',
1071
1133
  name: 'AI SDK Voice Agent',
1072
1134
  instructions: 'You are a helpful assistant with voice capabilities.',
1073
- model: 'openai/gpt-5.4',
1135
+ model: 'openai/gpt-5.5',
1074
1136
  voice,
1075
1137
  })
1076
1138
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/voice-murf",
3
- "version": "0.12.2-alpha.0",
3
+ "version": "0.12.2",
4
4
  "description": "Mastra Murf voice integration",
5
5
  "type": "module",
6
6
  "files": [
@@ -31,9 +31,9 @@
31
31
  "tsup": "^8.5.1",
32
32
  "typescript": "^6.0.3",
33
33
  "vitest": "4.1.5",
34
- "@internal/types-builder": "0.0.74",
35
- "@internal/lint": "0.0.99",
36
- "@internal/voice": "0.0.0"
34
+ "@internal/lint": "0.0.100",
35
+ "@internal/voice": "0.0.1",
36
+ "@internal/types-builder": "0.0.75"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "zod": "^3.25.0 || ^4.0.0"