You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create a android app which has similar function like speech-to-speech playgroud
But I find that there's some roomevent and audio lost when the client first connect to the room
the log I print at the server as below:
2024-11-29 07:54:10,312 - INFO my-worker - agent_started_speaking msg:human {"pid": 175734, "job_id": "AJ_y9mKaizNVJSz"}
2024-11-29 07:54:14,863 - INFO my-worker - agent_stopped_speaking msg:human {"pid": 175734, "job_id": "AJ_y9mKaizNVJSz"}
2024-11-29 07:54:14,863 - INFO my-worker - agent_speech_committed {"pid": 175734, "job_id": "AJ_y9mKaizNVJSz"}
But the first event i receive is agent_stopped_speaking, the event agent_started_speaking lost
I create a android app which has similar function like speech-to-speech playgroud
But I find that there's some roomevent and audio lost when the client first connect to the room
the log I print at the server as below:
2024-11-29 07:54:10,312 - INFO my-worker - agent_started_speaking msg:human {"pid": 175734, "job_id": "AJ_y9mKaizNVJSz"}
2024-11-29 07:54:14,863 - INFO my-worker - agent_stopped_speaking msg:human {"pid": 175734, "job_id": "AJ_y9mKaizNVJSz"}
2024-11-29 07:54:14,863 - INFO my-worker - agent_speech_committed {"pid": 175734, "job_id": "AJ_y9mKaizNVJSz"}
But the first event i receive is agent_stopped_speaking, the event agent_started_speaking lost
I send the event as below:
@assistant.on("agent_started_speaking")
def agent_started_speaking():
# convert string lists to strings, drop images
remote_participant = next(iter(ctx.room.remote_participants.values()), None)
if not remote_participant:
return
logger.info(f"agent_started_speaking msg:{remote_participant.identity}")
asyncio.create_task(
send_event(payload="",reliable=True,destination_identities=[remote_participant.identity],topic="agent_started_speaking")
)
async def send_event(
payload: Union[bytes, str],
*,
reliable: bool = True,
destination_identities: List[str] = [],
topic: str = "",
):
await ctx.room.local_participant.publish_data(payload=payload,reliable=reliable,destination_identities=destination_identities,topic=topic)
and the audio at the head alse lost
The text was updated successfully, but these errors were encountered: