acoti / articulate.js

A jQuery plugin that lets the browser speak to you.
http://articulate.purefreedom.com
MIT License
139 stars 28 forks source link

Set new default voice #4

Open coldes opened 7 years ago

coldes commented 7 years ago

How to set new default voice rather than using the dropdown menu each time, eg Daniel en-GB?

acoti commented 7 years ago

You can set a default voice in the code without using the dropdown menu by using any of the three methods described in the "Get and Set Voices" section on the following page:

http://articulate.purefreedom.com/guide.htm

I hope this helps.

Adam

coldes commented 7 years ago

...yes was on that page, I must be missing something, I forked one of the codepens and this is what I edited that is not working function speak(obj) { $(obj).articulate('getVoices').articulate('setVoice','Daniel',voice).articulate('speak'); }; Any assistance appreciated, thank you

acoti commented 7 years ago

How about this? function speak(obj) { $(obj).articulate('setVoice','name','Daniel').articulate('speak'); }

coldes commented 7 years ago

...found the problem with codepen external link

WORKS USING [even though insecure http] http://articulate.purefreedom.com/assets/js/articulate.min.js

NOT WORKING WITH [only default voice does] https://s3-us-west-2.amazonaws.com/s.cdpn.io/915932/articulate.min.js

pinecreativelabs commented 7 years ago

How would I make it have a female voice?

acoti commented 7 years ago

There isn't an option in the speechsynthesis API that allows choosing a voice based on gender. Each platform/OS combination usually does have at least one male and female voice, but you would have to find out which ones on your own.