1.3.3 • Published 5 months ago

react-native-voiceit v1.3.3

Weekly downloads
24
License
MIT
Repository
github
Last release
5 months ago

react-native-voiceit

Getting started

$ npm install react-native-voiceit --save

Requirements

IOS Deployment Target (IOS Version)

Please make sure that the minimum Deployment Target for your project is IOS 11

Android SDK Version

The minumum Android SDK version (API level) should be set to 17 in your build.gradle file:

minSdkVersion: 17

Billing

In order to use en-US or other content languages you need to have a developer account that has funds. In order to add funds to your account please login at: https://voiceit.io/login and navigate to: https://voiceit.io/billing and add funds.

Voiceprint Phrases

Make sure you review your Voiceprint Phrases by navigating to: https://voiceit.io/phraseManagement in order to know what to pass for voicePrintPhrase parameter

Plist Permissions

For IOS, please make sure your project has Camera and Microphone permissions in the info.plist file. Also, make sure that the app runs in light theme. Add the following inside the XML:

<key>NSCameraUsageDescription</key>
<string>This app requires to access your camera for biometric services</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app requires to access your microphone for biometric services</string>
<key>UIUserInterfaceStyle</key>
<string>Light</string>

Mostly automatic installation

$ react-native link react-native-voiceit

Local Installation

Firstly, to use the SDK locally, please clone the repo and drag it into your root React Native project. In the Package.json, replace to "react-native-voiceit": "file:./VoiceIt2-React-Native-SDK"

Android

Get the Android-SDK locally by doing the following:

IOS

Please navigate to the podfile of your main IOS folder, and replace to:

  pod 'react-native-voiceit', :path => '../VoiceIt2-React-Native-SDK'
  pod "VoiceIt2-IosSDK", :path => './VoiceIt2-IosSDK'

Usage

import {NativeModules} from 'react-native';
const Voiceit = NativeModules.Voiceit;

//  Initialize the VoiceIt Native Module
//  Voiceit.init("API_KEY","API_TOKEN",(res)=>{
//  console.log(res);
//  } ;

//  Call the methods with the same signature as the IOS/Android SDK. For instance
//  Voiceit.encapsulatedFaceEnrollment("USR_ID",(res)=>{
//  console.log(res);
//  });

Functions

Initialize the module as follows:

import {NativeModules} from 'react-native';
const Voiceit = NativeModules.Voiceit;
Voiceit.initVoiceIt("API_KEY","API_TOKEN",(res)=>{
console.log(res);
};

The React Native SDK wraps the IOS and Android SDKs, and hence the methods exposed are the same as those. Please refer to the The Android SDK/The IOS SDK for complete method reference. For instance

voiceItModule.encapsulatedFaceVerification("USER_ID","CONTENT_LANGUAGE", LIVENESS_BOOLEAN, AUDIO_LIVENESS_BOOLEAN, (res)=>{
callback(res);
});

User Token

To initialize Voiceit Module with User token and not use your API key and token, first generate a user token: https://api.voiceit.io/#user-token-generation Initialize Voiceit by placing the generated user token in palce of the API Key, and leave the API token as blank:

Voiceit.initVoiceIt("GENERATED_USER_TOKEN","",(res)=>{
console.log(res);
};

Theme

To set a theme color, please initialize the voiceit Object as follows:

Voiceit.initVoiceItWithTheme("API_KEY","API_TOKEN", "HEX_COLOR_VALUE",(res)=>{
console.log(res);
};

Example:

Voiceit.initVoiceItWithTheme("key_...","tok_.....", "#fbc132",(res)=>{
console.log(res);
};
1.3.3

5 months ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago