Conversing in voice notes over custom knowledge base
![image4](https://user-images.githubusercontent.com/143380171/278219613-2255e5d6-516b-4706-ac0a-482a771b147f.png)
- In the flow- by calling the “jugalbandi-voice” function and the above inputs in the webhook from the glific interface we can get a text response in desired language as well as a voice note. Send voice notes and get voice notes in return using the Jugalbandi API.
- Prerequisites: knowledge base will have to uploaded in jugalbandi platform. Read More
- Example flow (json format) which you can upload and re-use as a starting point
Elements involved
2. Jugalbandi Platform
Using Jugalbandi platform for generating voice response.
- Call the Glific webhook
Function to use - “jugalbandi-voice”
![image6](https://user-images.githubusercontent.com/143380171/278220013-ce637f7f-8106-444e-a52b-b25c160ea45e.png)
Function Body
![image5](https://user-images.githubusercontent.com/143380171/278220103-a95c78bb-2ad0-49f6-a7a8-9f740cb2468e.png)
“Input_language” : specify as per the jugalbandi platform or you can use the @contact.language “output_format” : text or voice “query_text” : if the input is in text format “audio_url” : send the flow variable of the voice note received “prompt” : any contextual or system prompt “uuid_number” : custom knowledge base which has been uploaded in the jugalbandi platform
How to get the response back and get the voice note
- The first node in the “success” pathway is pulling the responses
- The second node (screenshot below) is sending the computer generated voice note of the response.