Hi, I have a question. I notice that during a cal...
# server-api
a
Hi, I have a question. I notice that during a call, when someone hangs up while my agent is speaking, the
agent_speech_committed
or ``agent_speech_interrupted` is not fired. How do I capture that last utterance?
t
I think you sent us an email with this issue as well. Is that right? If so, we can continue the convo here or in email. The last I tried I wasn't able to reproduce this. Did you get this down to a set of reproducible steps?
a
I did actually!
I solved it
it's because if you call the terminate room endpoint, it doesn't fire the agent_speech_interrupted if you're using agent.say
but I experimented and tried hanging up while talking (a bit weird but just making sure the converse is true), and that doesn't fire a user_speech_stopped or user_speech_committed
t
it's because if you call the terminate room endpoint, it doesn't fire the agent_speech_interrupted if you're using agent.say
Ah. I see. We might want to fix this or at least make it more clear in the docs. Can you file a GitHub issue for that?
a
ah cool. what about the second issue, @tall-belgium-91876? Is there a way to auto-commit what the user is saying before cleaning up the room?
I will file the Github issue
🙏 1
t
but I experimented and tried hanging up while talking (a bit weird but just making sure the converse is true), and that doesn't fire a user_speech_stopped or user_speech_committed
So basically you were talking and then clicked your hang up button before the agent knew your speech was finished? I think that makes since it wasn't committed. It sounds like we might need a
user_speech_interrupted
event? 🤔
a
yeah, and I see this happens with voicemail's that are full, because they'll say "Voicemail box is not set-up. Goodbye"
🤔 1
and I replicated by reading the declaration of independence then hanging up midway lol
😂 1
t
I see. That makes sense. let me take a closer look at the code ...
a
so if there was a way to flush everything, that would fix it on my end. Thanks!
👍 1
t
I spoke to the team about this. It is indeed a bug. The good news: it's fixed in 1.0. The somewhat bad news: 1.0 is being released in "developer preview" mode today. Are you in production yet? Or, still testing? If in production, you might need to find a workaround until 1.0 is out of beta phase.
a
I'm in production
Didn't catch this with my voicemail.
I have a workaround
t
ok good
a
Just wondering if there was something in the Livekit library to send an user_stopped_speaking or user_interrupted event
t
not in this version but in the next version there is
a
just double checking that before I apply my own patch
ah ok
😞
t
yeah. the next version fixes a lot of this so it's easier to work with in general. but for now - yeah - just apply your patch and then you can remove it once you upgrade to 1.0
a
👍 ok thanks!