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

react-native-text-to-speech-edge

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-text-to-speech-edge

TODO

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-text-to-speech-edge

react-native-text-to-speech-edge component for React Native (iOS and Android)

react-native-text-to-speech-edge is a mobile library for Android and iOS to convert Text in Speech using Speech Service Azure!

Installing (React Native >= 0.60.0)

$ npm install react-native-text-to-speech-edge --save

For iOS Configuration

Go to your ios folder and run:

pod install

_ IMPORTANT _

The Project Running in iOS 9.3 or higher

For Android Configuration

Open the AndroidManifest.xml and Verify your Permission

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

Open the android/build.gradle and add repository of microsoft

allprojects {
    repositories {
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
        mavenCentral()
        maven {
            url 'https://csspeechstorage.blob.core.windows.net/maven/'
        }
    }
}

And change your min-sdk-version to 19

    ext {
        buildToolsVersion = "28.0.3"
        minSdkVersion = 19
        compileSdkVersion = 28
        targetSdkVersion = 28
    }

_ IMPORTANT _

The Project Android Needs Min Android 4.4 KitKat (API 19)

Usage

For transform basic Text To Speech.

import { createTextToSpeechByText } from 'react-native-text-to-speech-edge';


createTextToSpeechByText(
      'Your Text For Speech in Here',
      'pt-BR-FranciscaNeural', //Your Neural Language [https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#neural-voices]
      'Your Key',
      'Your Region',
    )
      .then((success) => {
        // Your Success Boolean Return
      })
      .catch((error) => {
        // Your Error String Message
      });
  };

For transform Text To Speech using SSML.

import { createTextToSpeechByText } from 'react-native-text-to-speech-edge';


createTextToSpeechBySSML(
      'Your SSML String in Here',
      'pt-BR-FranciscaNeural', //Your Neural Language (https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#neural-voices)
      'Your Key',
      'Your Region',
    )
      .then((success) => {
        // Your Success Boolean Return
      })
      .catch((error) => {
        // Your Error String Message
      });
  };

For STOP audio text

import { stopEdge } from 'react-native-text-to-speech-edge';


stopEdge()

For listener on Audio Finish

For STOP audio text
```javascript
import TTSEdge from 'react-native-text-to-speech-edge';


TTSEdge.addEventListener('ttedge-finish', (event) =>
  console.log('ttedge-finish', event) // Your Listener To Finish Audio
);

Keywords

FAQs

Package last updated on 03 Aug 2020

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