Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added .setVoice() to override default #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

therebelrobot
Copy link

Love the library! The one thing I needed was the ability to override the default language voice, it seemed pretty restrictive before. The way I'm now using this is like:

artyom
        .initialize({
          lang: "en-US",
          continuous: true,
          debug: true, 
          listen: true,
          name: "Archimedes",
        })
        .then(() => {
          artyom.setVoice("Google UK English Female");
          // artyom.setVoice("Tessa");
          // artyom.setVoice("Veena");
        });

I found that trying to set it in the initialize function wasn't working because getVoices wasn't populated yet. putting it afterwards, though, seemed to work.

Let me know if you want more documentation or cleanup, happy to hop back in and tighten this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant