Voice
Voice packages have been renamed from speech to voice with updated class names and API methods.
ChangedChanged的直接链接
Voice configuration property namesVoice configuration property names的直接链接
Voice configuration properties have been renamed for consistency. speakProvider is now output, listenProvider is now input, and realtimeProvider is now realtime. The new names match each property's role in voice input and output.
To migrate, update configuration property names when configuring agents with voice capabilities.
const agent = new Agent({
id: 'agent',
voice: {
- speakProvider: murfVoice,
- listenProvider: deepgramVoice,
- realtimeProvider: openaiRealtime,
+ output: murfVoice,
+ input: deepgramVoice,
+ realtime: openaiRealtime,
},
});
Codemod
You can use Mastra's codemod CLI to update your code automatically:
npx @mastra/codemod@latest v1/voice-property-names .