vue-listen-voice

1.0.4 • Public • Published

Vue-listen-voice

Install

npm install vue-listen-voice

Usage

import Vue from 'vue'
import VueListenVoice from "vue-listen-voice";

Vue.use(VueListenVoice);
<template>
  <div>
    <button
      @click="isListen = !isListen"
      v-text="isListen ? 'stop' : 'start'"
    />

    <vue-listen-voice
      :listen="isListen"
      @textFromSpeech="textFromSpeech"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      isListen: false,
    }
  },
  methods: {
    textFromSpeech (text) {
      console.log('textFromSpeech: ', text)
    }
  }
}
</script>

Documentation

Properties

prop type default Descrtiption
listen Boolean false Can be used to start recording or stop recording
language String en-US language to recognize speech. you can check supported languages here

Events

Event Return Descrtiption
textFromSpeech String Returns the words that vue-listen-voice hears

Issues and features requests

If you find something that doesn't work, or a feature request at https://github.com/khucxuanquy/vue-listen-voice/issues

Package Sidebar

Install

npm i vue-listen-voice

Weekly Downloads

5

Version

1.0.4

License

ISC

Unpacked Size

23.3 kB

Total Files

6

Last publish

Collaborators

  • khucxuanquy