speechSynthesis

Issue #12030281 • Assigned to Travis L.

Details

Author
Gerald R.
Created
May 16, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Edge implements text-to-speech of W3C’s Web Speech API https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html but does not follow the errata at https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi-errata.html

In particular, the SpeechSynthesisUtterance onerror EventHandler handler is called with an object of type SpeechSynthesisEvent. According to the errata, the call should use an object of type SpeechSynthesisErrorEvent. The new event type has an error attribute.

    function speechBogus() {
        var u = new SpeechSynthesisUtterance();
        u.text = 'Ich gelobe der Fahne der Vereinigten Staaten von Amerika und der Republik, die sie darstellt, Treue: eine Nation vor Gott, unteilbar, mit Freiheit und Gerechtigkeit für alle.';
        // bogus lang to induce error
        u.lang = 'xx-US-bogus';
        // errorCode should be an errata extension. Everything is undefined.
        u.onerror = function (event) {
            // Edge: event is [object SpeechSynthesisEvent] should be [object SpeechSynthesisErrorEvent]
            // Errata extends with error
            console.log("u.onerror() event = " + event);
            console.log("utterance " + event.utterance);
            alert("Error fired: " + event.error + " charIndex " + event.charIndex + " elapsedTime " + event.elapsedTime);
        }
        speechSynthesis.speak(u);
    }

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Travis L.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in