Echo Mode Quickstart
This is a guide to help you get started with Echo Mode. We will first walkthrough setting up a persona and conversation, then we will show you how to send echo messages.
Part 1: Creating the Persona and Conversation
We will first create a persona that has pipeline_mode
set to echo
and has the proper layers
configured using the Create Persona endpoint. You can learn more about creating personas here.
From this call to Create Personas, you will receive a response containing a persona_id
. For example in the following response, we have a persona_id
of p24293d6
.
Using the above persona_id
, we can create a conversation using the Create Conversation endpoint. In this request, we will include the replica_id
of the replica that we want to use for this conversation and the persona_id
that we created above.
You can reuse personas when creating conversations. You can learn more about creating conversations here
Response:
In the response, you will receive a conversation_id
. Using this conversation_id
, we can join the conversation and send echo messages.
Part 2: Using Text and Audio Echo
Once we have a conversation_id
, we can join the conversation and send echo messages whether they are text or audio. If sending audio, it must be base64 encoded. While we recommend a sample rate of 24000Hz for higher quality, we will default to 16000 to ensure backwards compatibility.
Here is a simple python flask app that joins a conversation and sends audio echo interaction messages.
Learn more about formatting Echo Interactions here
In the above example, we can hit send_app_message
to send the base64 encoded audio chunks to the replica.
You can learn more about how to send text or audio messages via the Echo Interaction here