Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-voice-to-text-custom

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-voice-to-text-custom

A React Native module that provides voice-to-text capabilities using Android's Speech Recognizer.

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

React Native Voice to Text Custom

A React Native module that provides voice-to-text capabilities using Android's Speech Recognizer.

Installation

To install the package, run:

npm install react-native-voice-to-text-custom

Setup (Android Only)

Make sure you have set up permissions for Android. Add the following permission to your AndroidManifest.xml:

<uses-permission android:name="android.permission.RECORD_AUDIO" />

Usage

import VoiceRecognition from 'react-native-voice-to-text';

// Request microphone permission first
VoiceRecognition.requestMicrophonePermission().then(() => {
  
// Start voice recognition
  VoiceRecognition.startRecognition('en-US')
    .then(() => console.log('Recognition started'))
    .catch((error) => console.error('Error:', error));
});

// Stop recognition when needed
VoiceRecognition.stopRecognition().then(() => {
  console.log('Recognition stopped');
});

API

requestMicrophonePermission()

Requests microphone permission from the user.

Returns: Promise<string>

startRecognition(locale: string)

Starts voice recognition with the given locale.

Arguments:

  • locale (string): The language code (e.g., 'en-US') to be used for voice recognition.

Returns: Promise<void>

stopRecognition()

Stops the voice recognition process.

Returns: Promise<void>

Contributing

Contributions are welcome! Current version is only working on Android and tested with the latest SDK, will be working for the iOS and will be posted the update. Please feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

react-native-voice-to-text

Keywords

FAQs

Package last updated on 17 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc