Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roomevent and audio lost in android #1152

Open
sexiong306 opened this issue Nov 29, 2024 · 0 comments
Open

roomevent and audio lost in android #1152

sexiong306 opened this issue Nov 29, 2024 · 0 comments
Labels
question Further information is requested

Comments

@sexiong306
Copy link

sexiong306 commented Nov 29, 2024

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

@sexiong306 sexiong306 added the question Further information is requested label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant