0

I have a simple java script program that I would like to transfer over the the Amazon Echo, however I cannot figure out how to transfer over some variables from text based to voice. for example:

var rhyme = prompt('Enter the word to rhyme with'); //input
console.log('rhyming words API call result:', getNRhymingWords(rhyme, 5)); //output

I have set up a custom intent and slots for every word in the dictionary, but I can still not get the slot to work. I am planning to simply call rhyme variable at the start of the function and the output at the end. Any help is greatly appreciated!

Derek Brown
  • 4,232
  • 4
  • 27
  • 44
burrowfestor
  • 37
  • 1
  • 4
  • `but I can still not get the slot to work` - which part of your code tries this? – Jaromanda X Oct 12 '17 at 02:44
  • Sorry, the examples I tried were `var rhyme = this.event.request.intent.slots.words.value;` and `this.emit(:tell,'your word' ${word}','rhymes with',rhymingWords);` – burrowfestor Oct 12 '17 at 03:07

0 Answers0