# react-native-speech-command

> React Native module for speech command classification.

Latest version **0.1.3** (published 2023-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-speech-command
pnpm add react-native-speech-command
yarn add react-native-speech-command
bun add react-native-speech-command
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2023-04-06 |
| First published | 2023-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 16.0.0 |
| Dependencies | 0 |
| Unpacked size | 53.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | vhuynh19 |
| Maintainers | vhuynh19 |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-speech-command
- Repository: https://github.com/vohuynh19/react-native-speech-command
- Homepage: https://github.com/vohuynh19/react-native-speech-command#readme
- Issues: https://github.com/vohuynh19/react-native-speech-command/issues
- npm.io page: https://npm.io/package/react-native-speech-command

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2023-04-06
- 0.1.2 — 2023-04-02
- 0.1.1 — 2023-04-02
- 0.1.0 — 2023-04-02

## README

# react-native-speech-command

React Native module for speech command classification.

## Installation

```sh
npm install react-native-speech-command  
```
or 
```sh
yarn add react-native-speech-command
```

# Pre installing

## Android

```
 dependencies {
        ...
        classpath("de.undercouch:gradle-download-task:4.1.2")
    }
```

Create download_model.gradle in android/app/ folder
```gradle
task downloadAudioClassifierModel(type: Download) {
    src 'https://storage.googleapis.com/download.tensorflow.org/models/tflite/task_library/audio_classification/android/lite-model_yamnet_classification_tflite_1.tflite'
    dest project.ext.ASSET_DIR + '/yamnet.tflite'
    overwrite false
}

task downloadSpeechClassifierModel(type: Download) {
    // This model is custom made using Model Maker. A detailed guide can be found here:
    // https://www.tensorflow.org/lite/models/modify/model_maker/speech_recognition
    src 'https://storage.googleapis.com/download.tensorflow.org/models/tflite/task_library/audio_classification/android/speech_commands.tflite'
    dest project.ext.ASSET_DIR + '/speech.tflite'
    overwrite false
}

preBuild.dependsOn downloadAudioClassifierModel, downloadSpeechClassifierModel
```

Add below lines to android/app/build.gradle
```gradle
apply plugin: 'de.undercouch.download' 

...
...

// import DownloadModels task
project.ext.ASSET_DIR = projectDir.toString() + '/src/main/assets'
project.ext.TEST_ASSET_DIR = projectDir.toString() + '/src/androidTest/assets'
apply from:'download_model.gradle'

```

Add below lines to android/build.gradle

```
minSdkVersion = 23

dependencies {
    ...
    classpath("de.undercouch:gradle-download-task:4.1.2")
}
```

## IOS
Add speech_commands.tflite to xcode project
## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)

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