Skip to content

Conversation

@marcus-daily
Copy link
Contributor

No description provided.

@marcus-daily
Copy link
Contributor Author

CI expected to fail until core client is released.

@Serializable
internal data class SmallWebRTCStartBotResult(
val sessionId: String,
val iceConfig: Value = Value.Null

Choose a reason for hiding this comment

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

This iceConfig maybe it would be nice to create a specific type for it. For example this is the one for Web:

export type IceConfig = {
  iceServers?: RTCIceServer[];
};

Where RTCIceServer is this: https://udn.realityripple.com/docs/Web/API/RTCIceServer

json: String,
startBotRequest: APIRequest
): SmallWebRTCTransportConnectParams {
val startBotResult = JSON_INSTANCE.decodeFromString<SmallWebRTCStartBotResult>(json)

Choose a reason for hiding this comment

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

I believe we should also add a check to make sure the json isn't already of type SmallWebRTCTransportConnectParams.

): SmallWebRTCTransportConnectParams {
val startBotResult = JSON_INSTANCE.decodeFromString<SmallWebRTCStartBotResult>(json)

return SmallWebRTCTransportConnectParams(

Choose a reason for hiding this comment

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

The SmallWebRTCTransportConnectionParams should also be able to receive the iceConfig from the startBotResult. So we can use it when connecting.


import ai.pipecat.client.types.APIRequest

data class SmallWebRTCTransportConnectParams(

Choose a reason for hiding this comment

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

We should also add the iceConfig here.

@filipi87
Copy link

A couple of other missing features that I’ve noticed:

  • The iceConfig (iceServers) received needs to be used when establishing the WebRTC connection. Otherwise, it will probably not work with PCC.
  • Send a signalling message to Pipecat each time we enable or disable an audio or video track.
  • Trickle ICE support:
    • I’ve added it on iOS in this PR: #4
  • Instead of having the event onTracksUpdated, on web and iOS we have onTrackStarted and onTrackStopped instead.

Not sure if you’ve already tested connecting with a deployed agent on Pipecat Cloud, but that would probably be a good test as well, to make sure we haven’t missed anything.

@marcus-daily
Copy link
Contributor Author

I've added @mattieruth as a reviewer since Filipi is away at the moment.

All comments should now be addressed, we now support iceConfig and trickle ICE, and send the track details to the bot.

}

"renegotiate" -> negotiate()
"renegotiate" -> negotiate(transportParams)

Choose a reason for hiding this comment

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

is there any reason this should use connectParams instead? i.e. is it possible for the connectParams to change between now and when a renegotiation occurs and therefore should use the updated params?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't look like there's any way for this to change in the meantime -- the type is immutable and we don't change the connectParams field. If nothing else using transportParams avoids an unnecessary "non-null" assertion.

Copy link

@mattieruth mattieruth left a comment

Choose a reason for hiding this comment

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

Mostly leaning on Filipi's review for this one. So just the one question.

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.

4 participants