Blip Speech October 29, 2024 12:38 Updated Index: Introduction How it works? Activation Implementation Type Validation Get the audio json URL Transcription Introduction The Blip Speech is our voice provider, enabling you to add voice understanding capability to your Intelligent Contact through audio transcription. For example: You have an intelligent contact with a cascade ready to interact autonomously with the customer, but when you receive an audio message on WhatsApp, you need to inform the customer to interact via text. Blip Speech allows you to add a block to your flow to transcribe the audio messages received from the customer, enabling you to interact with them using voice only! How it works? Blip Speech is a Blip command, thus facilitating the integration of Blip's proprietary transcription technology into the Intelligent Contact. The integration allows: Easy integration of the technology into the conversational flow; Automatic transcription of audio messages in Brazilian Portuguese; The ability to transcribe audio messages in English, Spanish, and French. Activation Upon activating and connecting the integration on the AI Providers screen, it should be configured in the bot flow. Please be aware that by confirming the use of Blip Speech, you may incur a charge. Refer to the pricing table in the modal link to understand the costs. We are developing a screen that will show information about usage, which will be available soon. Implementation Before implementing Blip Speech in the conversational flow, some steps in the conversational flow are required. Type Validation The first step is to validate the type of message received by the bot. That is, allow the message to be transcribed only if its type is audio. Get the audio json URL In an input action in the block where the transcription will be performed, simply place the input variable referring to the audio message variable sent by the user, as shown in the image below: Still in this action, by clicking on SCRIPT, obtain the URL using the JavaScript code below: function run(input){ input = JSON.parse(input) return input['uri']} Lastly, set a return variable that will hold the URL value ready to be transcribed in the next step. Transcription To perform the transcription, it is necessary to process a command as an input action. The command must be filled out as shown in the image below. The response variable can be named as you prefer. In the example below, the variable that will be returned with the transcription is named transcriptionResult. By clicking on Resources, you will enter the JSON containing the necessary information to correctly communicate with Blip Speech. They are: url: Variable corresponding to the audio URL sent; guid: Variable with a unique alphanumeric identifier; contactId: Variable with the bot application's identity (same as 'identifier@domain'); maxDuration:Maximum duration of an audio to be transcribed, in seconds. If no maxDuration value is provided, it will default to 600 seconds. language: The language of the audios to be transcribed. If not provided, its default value will be “auto”, which makes the transcription system automatically detect the language of the sent audio before performing the transcription. As a result, you will have a JSON like this: { "url":"{{urlAudio}}", "guid":"{{random.guid}}", "contactId":"{{contact.identity}}", "maxDuration":240, "language":"pt"} Following the above steps, at the end of this flow you will have a variable containing the transcription of the audio sent, allowing you to proceed with your conversational flow. Or if you prefer, you can download this flow by clicking here, and import it into your smart contact builder. For more information, visit the discussion on the subject at our community or videos on our channel. 😃 Related articles Carousel Templates How to send email by the chatbot through Builder Sending WhatsApp Active Messages on Blip Desk Recording and Sending Audio Customized Link for WhatsApp