https://github.com/jairo-ab/simple-voice
Simples plugin de voz, para leitura de conteúdo.
https://github.com/jairo-ab/simple-voice
speechsynthesis vuejs2
Last synced: 4 months ago
JSON representation
Simples plugin de voz, para leitura de conteúdo.
- Host: GitHub
- URL: https://github.com/jairo-ab/simple-voice
- Owner: jairo-ab
- License: mit
- Created: 2023-01-05T20:38:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T02:56:56.000Z (over 2 years ago)
- Last Synced: 2025-03-02T07:02:47.737Z (5 months ago)
- Topics: speechsynthesis, vuejs2
- Language: JavaScript
- Homepage: https://jairoabreu.tk/posts/simple-voice
- Size: 680 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-voice [](https://www.npmjs.com/package/simple-voice) [](https://www.npmjs.com/package/simple-voice) [](https://www.npmjs.com/package/simple-voice)
A event voice for Vue.js, using [SpeechSynthesis](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis) browser natives, support both Vue 1.0 and 2.0. See Vue [documentation](https://vuejs.org/v2/guide/migration.html#Events) for more detail.
## Installation
You can install it via [yarn](https://yarnpkg.com) or [npm](https://npmjs.com).
```
$ yarn add simple-voice
$ npm install --save simple-voice
```When used with a module system, you must explicitly install the bus via Vue.use():
```js
import Vue from 'vue';
import SimpleVoice from 'simple-voice';Vue.use(SimpleVoice);
```You can optionally pass in some options:
```js
Vue.use(SimpleVoice, {
voice: 'pt-BR',
rate: 1.2
});
```The default is pt-BR.
See the full list of voices [here](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/getVoices).## Usage
#### Listen and clean
```js
// ...
mounted() {
this.voice();
},
methods: {
voice() {
this.$voice('Hello world!');
}
}
```## License
[MIT](https://opensource.org/licenses/MIT)