$(document).ready(function() {

  $('#show').on('click', displayList);
  $('#hide').on('click', hideList); 
  $('.say').on('click', sayText); 

  $(window).bind("pageshow", function(event) {
    if(event.originalEvent.persisted) {
      window.location.reload()
    }
  });
});

var displayList = function(event){  
  event.preventDefault();
  $('#display').show();
}

var hideList = function(event){ 
  event.preventDefault();
  $('#display').hide();
}

var sayText = function(event){ 
  event.preventDefault();
  var text = $(this).parent().children('.spoken_text').text();
  var msg = new SpeechSynthesisUtterance(text);
  msg.rate = 0.9;
  window.speechSynthesis.speak(msg);
  // text = encodeURIComponent(text);
  // var url = "https://translate.google.com/translate_tts?ie=UTF-8&q=" + text + "&tl=en"
  // $('audio').attr('src', url).get(0).play();
}


$(document).ready(function() {

  $('#show').on('click', displayList);
  $('#hide').on('click', hideList); 
  $('.say').on('click', sayText); 

  $(window).bind("pageshow", function(event) {
    if(event.originalEvent.persisted) {
      window.location.reload()
    }
  });
});

var displayList = function(event){  
  event.preventDefault();
  $('#display').show();
}

var hideList = function(event){ 
  event.preventDefault();
  $('#display').hide();
}

var sayText = function(event){ 
  event.preventDefault();
  var text = $(this).parent().children('.spoken_text').text();
  var msg = new SpeechSynthesisUtterance(text);
  msg.voice = speechSynthesis.getVoices().filter(function(voice) { return voice.name == 'Bruce'; })[0];
  msg.rate = 1.1;
  window.speechSynthesis.speak(msg);
  // text = encodeURIComponent(text);
  // var url = "https://translate.google.com/translate_tts?ie=UTF-8&q=" + text + "&tl=en"
  // $('audio').attr('src', url).get(0).play();
}


Change TTS voice to sound more like yoda, voice name = bruce
Change TTS voice to sound more like yoda, voice name = bruce
