Add Phonic Realtime Plugin#1059
Conversation
Add Phonic Realtime support to Livekit Agents
|
| async commitAudio(): Promise<void> {} | ||
| async clearAudio(): Promise<void> {} |
There was a problem hiding this comment.
Are these left empty on purpose or that they are not supported yet? Sould we add some kind of warning messages or throw if it is not supported?
There was a problem hiding this comment.
@toubatbrian commitAudio or clearAudio are not supported yet.
I left them empty because I saw that in your implementation of the Google realtime plugin at google/src/beta/realtime/realtime_api.ts:1583, these were left empty without logging a warning.
Would you prefer a logger warning here?
There was a problem hiding this comment.
Adding a warning log.
| @@ -0,0 +1,3 @@ | |||
| # @livekit/agents-plugin-phonic | |||
There was a problem hiding this comment.
Can we add some setup code sample in README? Also, it'd be good to showcase a example file under ./src/examples/ folder
There was a problem hiding this comment.
Sounds good, I'll add an example!
|
I added an example and updated how |
Description
generateReplyare not supported, but we plan on supporting these features in the future. Phonic does not supportupdateInstructions,updateChatCtx, andtruncatephonicTools, or if included as a property of an agent defined on the Phonic platform (phonicAgentoption)Changes Made
RealtimeSession, mostly following the structure of the Gemini realtime plugin, with some simplifications.phonicSDK to connect to Phonic via WebSocketsRealtimeModelMetricsshape doesn't fit Phonic's billing structure, which is by number of seconds. I used thestt_metricsstructure, but have removed it from this PR.Demo
https://drive.google.com/file/u/3/d/1e3WdrlTozqGc7DG8eufa4qUVGSWkJZqF/view?usp=sharing
Pre-Review Checklist
Testing
ChatCtxare consistent with the recording on Phonic's endTesting was done using the
agent-starter-noderepo, pointing to the plugin andagents-jslocally:Note to reviewers: Please ensure the pre-review checklist is completed before starting your review.