sendRandomText
One of the most important best pracites of the voice design is adding variety.
That’s how Alexa Design Guide describes it:
Use variety to inject a natural and less robotic sound into a conversation and make repeat interactions sound less rote or memorized. For example, you can structure a dialog to randomly select from reasonable synonyms of the same prompt. Introduce variety if the customer will hear the same prompt frequently, such as in your opening and closing prompts. This kind of variety is a good way to add personality.
BotTalk makes following voice design best pracices easier, because most of them are built into BotTalk by design.
To add variety into your Alexa Skills and Google Actions use sendRandomText
:
- name: Initial Step
actions:
- sendRandomText:
- "Hey, what a wonderful day for JobBuddy!"
- >
Welcome to our job consulting skill!
Just say Alexa, ask JobBuddy
{{ random(["How do I become a programmer?",
"How much money doctors make?",
"What should I study to become Elton John"]) }}
- >
Welcome to JobBuddy.
To continue with the search,
just say Alexa, ask JobBuddy {{ random(["to continue search",
"carry on with search",
"continue where I left off"]) }}
BotTalk will randomly choose of the three prompts that voice assistant will greet the user with.
Moreover, inside of each prompt, you can introduce another level of variety by using Twig’s random function.