SpeechSynthesisVoice.voiceURI

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

The voiceURI read-only property of the SpeechSynthesisVoice interface returns the type of URI and location of the speech synthesis service for this voice.

Syntax

var myVoiceURI = speechSynthesisVoiceInstance.voiceURI;

Value

A DOMString representing the URI of the voice. This is a generic URI and can point to local or remote services, e.g. it could be a proprietary system URN or a a URL to a remote service.

Examples

for(i = 0; i < voices.length ; i++) {
  var option = document.createElement('option');
  option.textContent = voices[i].name + ' (' + voices[i].lang + ')';
 
  if(voices[i].default) {
    option.textContent += ' -- DEFAULT';
  }

  console.log(voices[i].voiceURI);
  // On Mac, this returns URNs, for example 'urn:moz-tts:osx:com.apple.speech.synthesis.voice.daniel'

  option.setAttribute('data-lang', voices[i].lang);
  option.setAttribute('data-name', voices[i].name);
  voiceSelect.appendChild(option);
}'

Specifications

Specification Status Comment
Web Speech API
The definition of 'voiceURI' in that specification.
Draft  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 33 44 (44) [1] Not supported Not supported Not supported
Feature Android Chrome Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support ? (Yes) ? 2.5 Not supported Not supported Not supported
  • [1] Can be enabled via the media.webspeech.synth.enabled flag in about:config.

See also

Document Tags and Contributors

 Contributors to this page: chrisdavidmills
 Last updated by: chrisdavidmills,