Skip to content

Add turn detection protobufs#1485

Open
chenghao-mou wants to merge 6 commits intomainfrom
chenghao/feat/turn-detection-proto
Open

Add turn detection protobufs#1485
chenghao-mou wants to merge 6 commits intomainfrom
chenghao/feat/turn-detection-proto

Conversation

@chenghao-mou
Copy link
Copy Markdown
Member

Add protobuf messages for both client <-> Inference and Inference <-> GPU host.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: f4d080f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "github.com/livekit/protocol" specified in the `fixed` option does not match any package in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@chenghao-mou chenghao-mou requested a review from a team April 8, 2026 03:18
Comment on lines +130 to +142
message TdServerMessage {
oneof message {
TdSessionCreated session_created = 1;
TdInferenceStarted inference_started = 2;
TdInferenceStopped inference_stopped = 3;
TdEouPrediction eou_prediction = 4;
TdSessionClosed session_closed = 5;
TdError error = 6;
}
optional string request_id = 7;
google.protobuf.Timestamp server_created_at = 8;
optional google.protobuf.Timestamp client_created_at = 9;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we split this into a Request/Response message?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the RemoteSession, I have Request/Response and events
https://github.com/livekit/protocol/blob/main/protobufs/agent/livekit_agent_session.proto

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nit tho

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it depends on how you look at them: e.g. TdInferenceStart and TdInferenceStarted is a Request-and-Response pair, we just wrap all the requests and responses in TdClientMessage and TdServerMessage.

Copy link
Copy Markdown
Member

@davidzhao davidzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this only for the turn detector? or more designed to be the generic websocket protocol?

@chenghao-mou
Copy link
Copy Markdown
Member Author

is this only for the turn detector? or more designed to be the generic websocket protocol?

They are only for the turn detector. Barge-in or STT have somewhat different control messages or different formats:

Bargein (ws binary+json): in: audio frame (pcm), inference start/end, out: prediction
STT (json): in: audio frame (pcm), out: transcripts
Turn detection (protobuf binary): audio frame (opus), chat messages, inference start/end, out: prediction

Do you think we should try to unify them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants