# trunghv-react-native-voice-manager

> ## Getting started

Latest version **0.2.7** (published 2019-12-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install trunghv-react-native-voice-manager
pnpm add trunghv-react-native-voice-manager
yarn add trunghv-react-native-voice-manager
bun add trunghv-react-native-voice-manager
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.7 |
| Published | 2019-12-12 |
| First published | 2019-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 796.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Trunghv |
| Maintainers | trunghv |
| Keywords | react-native, voice, google cloud api |

## Links

- npm: https://www.npmjs.com/package/trunghv-react-native-voice-manager
- Repository: https://github.com/gnurt250394/trunghv-react-native-voice-manager
- Homepage: https://github.com/gnurt250394/trunghv-react-native-voice-manager#readme
- Issues: https://github.com/gnurt250394/trunghv-react-native-voice-manager/issues
- npm.io page: https://npm.io/package/trunghv-react-native-voice-manager

## Recent versions

- 0.2.7 (latest) — 2019-12-12
- 0.2.6 — 2019-12-07
- 0.2.5 — 2019-12-02
- 0.2.4 — 2019-11-25
- 0.2.3 — 2019-11-25
- 0.2.2 — 2019-11-25
- 0.2.1 — 2019-11-25
- 0.2.0 — 2019-11-25
- 0.1.9 — 2019-11-25
- 0.1.8 — 2019-11-25
- 0.1.7 — 2019-11-25
- 0.1.6 — 2019-11-25
- 0.1.5 — 2019-11-25
- 0.1.4 — 2019-11-25
- 0.1.3 — 2019-11-25
- … 12 more at https://npm.io/package/trunghv-react-native-voice-manager/versions

## README

# react-native-voice-manager

## Getting started

`$ npm install trunghv-react-native-voice-manager --save`

### Mostly automatic installation

`$ react-native link trunghv-react-native-voice-manager`

### Manual installation


#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-voice-manager` and add `VoiceManager.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libVoiceManager.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android

1. Open up `android/app/src/main/java/[...]/MainApplication.java`
  - Add `import com.gnurt.VoiceManagerPackage;` to the imports at the top of the file
  - Add `new VoiceManagerPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
  	```
  	include ':trunghv-react-native-voice-manager'
  	project(':trunghv-react-native-voice-manager').projectDir = new File(rootProject.projectDir, 	'../node_modules/trunghv-react-native-voice-manager/android')
  	```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
  	```
      compile project(':trunghv-react-native-voice-manager')
  	```


## Usage
```javascript
import VoiceManager from 'trunghv-react-native-voice-manager';

class Example extends React.Component{
	constructor(props){
		super(props)
		VoiceManager.onResult = this.onSpeechResults;
	}
	 componentWillUnmount() {
        VoiceManager.stop()
	};

	// listener event speech to text
	onSpeechResults = (params) => {
		...
	};

	componentDidMount = async () => {
		// start listen voice
     	await VoiceManager.start()
    };
}
```

---
_Source: https://npm.io/package/trunghv-react-native-voice-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
