• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    speechSynthesis timing

    Opera for Windows
    2
    3
    1424
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • farjo
      farjo last edited by

      I am developing a website using SST via speechSynthesis. It is working on Chrome however I would like to be able to recommend Opera as well.

      Take a look at this page using Opera and compare with Chrome or Safari: http://codepen.io/matt-west/details/wGzuJ

      In Chrome/Safari the 'Voice' select box has the voices of various languages to choose from, but in Opera there is only 'native'. This means that whilst it will speak "It works in English" correctly, a foreign phrase e.g. "Creo que no funciona" gets read as if they are English words (e.g. que pronounced "queue" instead of "ke").

      My question is twofold:
      Whilst in Opera ('speechSynthesis' in window) returns true, can it work for languages other than English?

      If so what is the timing of the getVoices method? The above mentioned web page uses this code:

          // Fetch the list of voices and populate the voice options.
          function loadVoices() {
            // Fetch the available voices.
          	var voices = speechSynthesis.getVoices();
            
            // Loop through each of the voices.
      	voices.forEach(function(voice, i) {
          // Create a new option element.
      		var option = document.createElement('option');
          
          // Set the options value and text.
      		option.value = voice.name;
      		option.innerHTML = voice.name;
      		  
          // Add the option to the voice selector.
      		voiceSelect.appendChild(option);
      	});
      }
      
      // Execute loadVoices.
      loadVoices();
      
      // Chrome loads voices asynchronously.
      window.speechSynthesis.onvoiceschanged = function(e) {
        loadVoices();
      };
      

      This calls speechSynthesis.getVoices() after the event window.speechSynthesis.onvoiceschanged, as Chrome loads the voices asynchronously.

      Does Opera load the voices in a different way? Does Opera use a different event?

      Thank you for reading such a long post and for any (helpful!) replies.

      Reply Quote 0
        1 Reply Last reply
      • farjo
        farjo last edited by

        Where can I post this so that the Opera developers will read it and reply?

        Reply Quote 0
          1 Reply Last reply
        • lando242
          lando242 last edited by

          There is no such place.

          Reply Quote 0
            1 Reply Last reply
          • First post
            Last post

          Computer browsers

          • Opera for Windows
          • Opera for Mac
          • Opera for Linux
          • Opera beta version
          • Opera USB

          Mobile browsers

          • Opera for Android
          • Opera Mini
          • Opera Touch
          • Opera for basic phones

          • Add-ons
          • Opera account
          • Wallpapers
          • Opera Ads

          • Help & support
          • Opera blogs
          • Opera forums
          • Dev.Opera

          • Security
          • Privacy
          • Cookies Policy
          • EULA
          • Terms of Service

          • About Opera
          • Press info
          • Jobs
          • Investors
          • Become a partner
          • Contact us

          Follow Opera

          • Opera - Facebook
          • Opera - Twitter
          • Opera - YouTube
          • Opera - LinkedIn
          • Opera - Instagram

          © Opera Software 1995-