Skip to content

jairo-ab/simple-voice

Repository files navigation

simple-voice Downloads Version License

A event voice for Vue.js, using SpeechSynthesis browser natives, support both Vue 1.0 and 2.0. See Vue documentation for more detail.

Installation

You can install it via yarn or npm.

$ yarn add simple-voice
$ npm install --save simple-voice

When used with a module system, you must explicitly install the bus via Vue.use():

import Vue from 'vue';
import SimpleVoice from 'simple-voice';

Vue.use(SimpleVoice);

You can optionally pass in some options:

Vue.use(SimpleVoice, {
  voice: 'pt-BR',
  rate: 1.2
});

The default is pt-BR. See the full list of voices here.

Usage

Listen and clean

// ...
mounted() {
  this.voice();
},
methods: {
  voice() {
    this.$voice('Hello world!');
  }
}

License

MIT

About

Simples plugin de voz, para leitura de conteúdo.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published