> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-HK/llms.txt # Voice 語音套件已由 speech 重新命名為 voice,並更新 class 名稱及 API 方法。 ## 已變更 ### Voice 設定屬性名稱 為保持一致,Voice 設定屬性已重新命名。`speakProvider` 現為 `output`,`listenProvider` 現為 `input`,而 `realtimeProvider` 現為 `realtime`。新名稱分別對應各屬性在語音輸入及輸出中的角色。 如要遷移,請在設定具備 Voice 功能的 Agent 時更新設定屬性名稱。 ```diff const agent = new Agent({ id: 'agent', voice: { - speakProvider: murfVoice, - listenProvider: deepgramVoice, - realtimeProvider: openaiRealtime, + output: murfVoice, + input: deepgramVoice, + realtime: openaiRealtime, }, }); ``` > **Codemod:** 你可以使用 Mastra 的 codemod CLI 自動更新程式碼: > > ```bash > npx @mastra/codemod@latest v1/voice-property-names . > ```