#conversational Ai on native when running
1 messages · Page 1 of 1 (latest)
@supple nimbus Not custom, im using the skeleton provided by Elevenlabs which utilizes ‘use dom’ in expo. The agent sends its first message to my front-end and I can see it but there is no audio. When the AI sends a second message audio works. I believe the nature is that this function is not initializing quick enough for that first message and throwing the error
@grizzled mesa if you have any insight on this please let me know
Can you somehow share your code? There is a text on your screenshot that suggests that you are trying to override the first_message but this override is not allowed according to your agent settings
@supple nimbus ignore override, as I was trying to do that before
Took a look at the elevenlabs JS lib code and honestly can't figure out why that happens.
handleAudio is defined in BaseConversation but is empty, and VoiceConversation that extends the base one overrides it and that's where this addAudioBase64 function is called
will do, thank you
I'm not getting the same error once I deploy to testflight but the audio still doesn't play on that first message
cc: @grizzled mesa @supple nimbus
Hi! I just opened a PR to the SDK that fixes the audiobase64 error: https://github.com/elevenlabs/packages/pull/81
Also, have you tried setting up a delay to see if it fixes the problem? Sometimes mobile devices take a moment to enter the call mode which may cut the initial message a bit
Thank you @ripe shell, I've tried setting up the delay in startSession{} but it still does not play that first message. Might it be due to the audiobase64 error\
What's the timeline on the approval for the pr?
Additional info:
I can see the first message come in on onmessage() then Ai listens but obviously user doesnt know the AI is activated since first message hasn't played- The agent comes back after 5-7 sec's asking if i need assistance
cc: @ripe shell
The fix is now out in @elevenlabs/react@0.1.6 let me know if it fixes the first message issue
CC @stark breach
@ripe shell you’re a life saver, this was the root cause. The first message is being read now
@ripe shell maybe I can pick your brain for a second. Whats the best way to supply context to the agent? Use case: ‘taking chat history from a previous conversation and supplying it’
Would sendContextualUpdate suffice?
this should more or less relate to the current conversation
If I were to do it I would utilize system prompt overrides or dynamic variables. If the conversation is too long, I would do an additional LLM step to summarize it first
But to supply it to the voice agent, I would use sendContextualUpdate?
Oh wait I see what you mean, but does the sdk allow you to override it?
Yeah it should work. It's definitely documented and can be done via the WS API
Yes, here's how to override the entire prompt, and here's how to pass dynamic variables
Can I just say I'm very impressed with this community + devs, I joined not thinking I'll get any help and you guys were amazing
cc: @ripe shell @supple nimbus
In native expo, I need to be able to adjust the volume of the agent in cases where I need the volume to be 0 how would I do this? I tried using conversation.setvolume but it doesnt seem to be in control of it. Note: I still need the agent to listen even if the output volume is 0 @ripe shell
With the react SDK you should be able to pass the volume as an option to useConversation:
https://github.com/elevenlabs/packages/tree/main/packages/react#setvolume
It only affects the output so the agent should continue to hear you
I tried this on expo app installed on ios, but the setvolume seems to have no effect @ripe shell
Can you share the code snippet you use to set the volume? Just to be sure
#1378024977193893918 message heres what im using essentiall, I add the conversation.setvolume after the conversation.startsession
@ripe shell