0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

[MASTRA-2371] add methods to support speech to speech voice providers (#2870)

Add methods to support realtime voice providers.

- connect: initiate websocket/webrtc connection
- close: close connection
- updateConfig: update config
- answer: trigger response (if not using VAD)
- addTools: add tools to voice model.
- on/off: register and remove event listeners

Update to existing methods:
- speak/listen can now return void if they are a realtime provider.
These methods would emit a 'speaking' and 'writing' events

Update agents to implement new voice methods.
If the voice provider is a realtime voice provider we also pass tools
and the instruction prompt to the voice provider
This commit is contained in:
YujohnNattrass 2025-03-14 06:44:10 -07:00 • committed by GitHub
commit 6e559a0933
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 305 additions and 36 deletions