Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can change the speech settings of your Voice agent by changing the properties in the Bot Provider V2 node.

...

Property

...

Description

...

"languageCode": "en-US"

...

You can select the language accent in which you want the output voice using this property.

You can choose from the below:

Arabic — ar-XA, Bengali (India) — bn-IN, Chinese (Hong Kong) — yue-HK, Czech (Czech Republic) — cs-CZ, Danish (Denmark) — da-DK, Dutch (Netherlands) — nl-NL, English (Australia) — en-AU, English (India) — en-IN, English (UK) — en-GB, English (US) — en-US, Filipino (Philippines) — fil-PH, Finnish (Finland) — fi-FI, French (Canada) — fr-CA, French (France) — fr-FR, German (Germany) — de-DE, Greek (Greece) — el-GR, Gujarati (India) — gu-IN, Hindi (India) — hi-IN, Hungarian (Hungary) — hu-HU, Indonesian (Indonesia) — id-ID, Italian (Italy) — it-IT, Japanese (Japan) — ja-JP, Kannada (India) — kn-IN, Korean (South Korea) — ko-KR, Malayalam (India) — ml-IN, Mandarin Chinese — cmn-CN, Norwegian (Norway) — cmn-TW, Polish (Poland) — nb-NO, Portuguese (Brazil) — pl-PL, Portuguese (Portugal) — pt-BR, Romanian (Romania) — pt-PT, Russian (Russia) — ro-RO, Slovak (Slovakia) — ru-RU, Spanish (Spain) — sk-SK, Swedish (Sweden) — es-ES, Tamil (India) — sv-SE

...

"ssmlGender": "FEMALE"

...

You can also choose the gender for the voice output.

You can choose from FEMALE and MALE.

...

"name": "en-US-Wavenet-G"

...

You can try out different variations on how the voice output can be with this property.
Please refer to Google documentation on voices

This property will override the language and ssmlGender properties.

...

"audioEncoding": "MP3"

...

You can choose the audio encoding of your choice from the below mentioned.

  1. LINEAR16 - Uncompressed 16-bit signed little-endian samples (Linear PCM).

  2. MP3 - MP3 audio.

  3. OGG_OPUS - Opus encoded audio wrapped in an ogg container.

...

The login directive enables the admin users to add a login button to your chatbot flow. The button click redirects the user to Orbita’s user login page in a new tab. If the user successfully logs in, the login tab closes automatically.

In the below example, we will use the flow studio and prompt the user to login to continue chatting with the chatbot.

Flow studio

We will create a flow studio flow and add a Custom control followed by a Single input control at the beginning of the flow (as shown below) to prompt the user to login.

...

Then we add an Evaluate node to check if the user logged in successfully.
If true, the flow continues
If anything else, the flow ends with an authentication error message.

...

Experience Designer

Use the below code in a function node to enable the login directive as shown below.

...

Code Block
if(!msg.payload.orbita) {
msg.payload.orbita = {};
}
if(!msg.payload.orbita.directive) {
msg.payload.orbita.directive = [];
}
msg.payload.orbita.directive.push({
    type: 'login', 
    successUtterance: 'success', 
    html: `<button class="smrtBtn chattheme chatthemeborderbuttons">Login</button>`
})
msg.payload.logoutUrls = [{
    'type': 'window', 
    url:'http://localhost:3030/oauth/logout?'
}]; 

return msg;

You have to set a session variable to know if a user successfully logged in. Use the below code in the function node.

Code Block
msg.orbita.session.isLogin = true;
return msg;

Render Login page in the chat bubble

You can make use of the HTML directive and load the Login page within the Chat bubble.

...

You should know the URL of the login page for your instance.

The easiest way to get the URL is to use the login directive and copy the URL of the login tab (this will be opened in a new tab) when you click the login button.

Sample code

Code Block
msg.payload.orbita.directive = [{
    type: "html5",
    options: {
        template: '500x600',
        url :"https://environment.orbita.cloud:8443/oauth/login?response_type=code&redirect_uri=https://environment.orbita.cloud:8443/oeapi/bot/support&scope=personaldata&client_id=*****"
    },
    loginSuccessUtterance: 'success'
}]

You can use successUtterance: 'Intent_Name' or loginSuccessUtterance: 'Intent_Name', to invoke the Intent after the HTML content is rendered.

Attachments
previewfalse
uploadfalse
oldfalse
patterns.*json
Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@130ff
sortmodified
showSpacefalse
reversetrue
typepage
cqllabel in ( "ssml" , "chatbot" )= "directive" and type = "page" and space = "OCS"
labelsdirective