Making “Translation Please” (Part 3) – Recording a Sentence -> Intermediate

Since this tutorial is for Intermediate users of Voiceflow, I will assume that you know how to create a project. The only other thing that may give you a problem, is how to get your skill to properly ‘record’ the user input needed to translate to a different language.

For those of you reading this section that do not have sufficient knowledge to do a complete skill from beginning to end yet, I have also decided to create a multi-part tutorial on the complete making of a different skill, from initial planning, right up to certification.

In order to have an English sentence, phrase, or word to translate, you have to have an Interaction Block that can properly get the input from your user. This shows the blocks needed to accomplish it. The first block (top left) tells the user exactly what they have to do to get the translation.

Please say translate, followed by a sentence or phrase.

The “huh?” just looks after the ELSE.  The “You said” Speak Block just repeats what was said. The Interaction Block is where all the ‘action’ takes place!

 

I’m showing the SLOT tab first. You can name it anything you want to, but I like to make things obvious, so I called the slot “slot_you_said”. Next I chose Amazon’s “SearchQuery” as the slot type because it seemed to work best at acquiring a number of words that could be almost anything (rather than a specific type, like City, First Name,etc.).

The next thing you have to do is enter some slot type examples. As you can see, I tried to enter a few phrases that a person might enter.  It doesn’t matter what you enter here. Just make sure that you enter at least 3 or 4 groups of words. Remember to press ENTER after typing in each group of words.

That looks after the SLOT tab.

 

Next, we complete the INTENT tab by creating an Intent. Again, I kept it simple, and made it obvious which slot I was using by naming my Intent “intent_you_said”. Previously I told you that in my Speak Block that precedes this Interaction Block, I asked them to:

Please say translate, followed by a sentence or phrase.

So, I entered “translate, followed by the slot we created. To get the slot type here you just press the left square bracket key, “[” and select it from the list. Then I added a couple more possible synonyms to complete the Intent.

Then, I create a Choice, by selecting the Intent we created above. And finally, I mapped the slot “[slot_you_said]” to a global variable that I had created earlier. That allowed me to save what the user said.

And, that is the value that I saved to Column B in my Google Sheet. Since the next 4 columns (in the same row, automatically translated that value to a different language, all of the work that needs to be explained here, is done.

I hope you have enjoyed and understood how I did this. I’ll create another tutorial soon to explain a simple step by step, multi-part tutorial for making a generic project/skill.

Search

About This Site

This site was created as a place for users of our Alexa skill to find more information about creating their own skills, without programming.