open-index/open-npm huggingface dataset:
npm package: @readybytes/rb-speech-to-text
Description: This is a speech to text converter build in Vue2. It provides speech translations in almost all languages.
Author: Ready Bytes
Latest version: 0.1.1

# rb-text-to-speech

![Demo](./src/assets/demo.gif)

## Demo
#### See live demo here at [codesandbox](https://codesandbox.io/s/rb-speech-to-text-e217bw).

## Installation

```
npm install --save rb-speech-to-text
```

or

```
yarn add rb-speech-to-text
```

## Declaration
```
<script>
import RBSpeechToText from "@readybytes/rb-speech-to-text";

export default {
  components: {
    RBSpeechToText
  }
}
<script>
```

## Basic Usage

#### Example-1

```
<template>
  <div>
    <textarea v-model="body"></textarea>
    <RBSpeechToText
      :text="body"
      @speechend="body = $event.text"
    ></RBSpeechToText>
  </div>
<template>

<script>
export default {
  name: "MyComponent",
  data() {
		return {
			body: "Hello World",
		};
	},
}
</script>
```

#### Example-2

```
<template>
  <div>
    <textarea v-model="body"></textarea>
    <RBSpeechToText
      :text="body"
      lang="fr-FR"
      @speechend="body = $event.text"
    ></RBSpeechToText>
  </div>
<template>

<script>
export default {
  name: "MyComponent",
  data() {
		return {
			body: "Bonjour le monde",
		};
	},
}
</script>
```
## Properties

  | Name | Type | Required | Default Value | Support Values |
  | ---- | ---- |--------- |------------ |--------------- |
  | text | String | Yes | - | any string|
  | lang | String | No | "en-US" | `<languageCode-countryCode>`. <br> [BCP-47 Languages Codes](https://cloud.google.com/speech-to-text/docs/languages#try-it-for-yourself) (Go to this link and search for BCP-47 language codes)|


## Events
- `speechend`

    This event will fire when user stop speaking and save the content. i.e-

  ```
   <template>
    <RBSpeechToText
      :text="text"
      @speechend="onSpeechEnd"
    >
    </RBSpeechToText>
   </template>

   <script>
    export default {
      methods:{
        onSpeechEnd(event) {
          console.log(event)
        }
      }
    }
   </script>