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.
LINEAR16
- Uncompressed 16-bit signed little-endian samples (Linear PCM).MP3
- MP3 audio.OGG_OPUS
- Opus encoded audio wrapped in an ogg container.
...
In this document, you will learn to use the Login Directive in the Flow Studio and prompt the user to login to continue chatting with the chatbot.
Flow studio
Create a conversation flow using the Flow Studio.
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.
...
When execution reaches the Custom control, Orbita directs the response to the 3rd pin of the Flow Manager node in Experience Designer. (See Flow Manager Node documentation for more information.)
In the Experience Designer, connect a Function node to the 3rd pin of the Flow Manager node to execute your custom logic (Login Directive in this example).
...
Experience Designer
Add a Function node to the 3rd pin of the Flow Manager Node.
If you have multiple Custom controls in the Flow Studio flow, you can connect a Switch node to the third pin to forward the message to the corresponding outputs based on the matching rules (Custom Control IDs in this example).
...
The property path for Control ID
Code Block |
---|
msg.payload.session.attributes.orbitaSession.flowInfo.controlId |
Design a flow as shown below in the Experience Designer. See, Guide to Flow Studio
...
Use the below code in the Login Directive function node. For more information on Login Directive, see How to use Login Directive
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="loginButton">Login</button>`
})
return msg; |
Create an intent that contains success as one of its utterances.
Add a function node (Setting sessionvariable) to the intent and connect it to the Flow Manager node.
You have to set a session variable to know if a user successfully logged in. Use the below code in the Setting sessionvariable function node for the same.
Code Block |
---|
msg.orbita.session.isLogin = true;
return msg; |
The property msg.orbita.session.isLogin
is added to the Evaluate control in the Flow Studio to check if the user login is successful.
In the conversation flow in the Flow Studio, add an Evaluate control to check if the login is successful.
Choose Custom in the input node list.
In the input field add the property
msg.orbita.session.isLogin
.For Pin P1, create a logic if the input property equals “true”.
If true, the pin P1 will get triggered
If anything else, the pin named Default pin will get triggered.
...
To render inline Login
You can make use of the HTML directive and load the Login page within the Chat bubble.
...
For the inline login, you should note the login page URL of your instance.
To get the login page URL of your instance, use the Login Directive and click the Login button. Copy the URL of the login tab (opens in a new tab) and place it in the URL property in the code below.
To use the inline Login, replace the code in the Login Directive function node with the below code in the Experience Designer.
Sample code
Code Block |
---|
if(!msg.payload.orbita) {
msg.payload.orbita = {};
}
if(!msg.payload.orbita.directive) {
msg.payload.orbita.directive = [];
}
msg.payload.orbita.directive = [{
type: "html5",
options: {
template: '450x500',
url :"<Login page URL of your Instance>"
},
loginSuccessUtterance: 'success'
}]
return msg; |
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|