npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-voiceit

v1.3.10

Published

This plugin is a Cordova VoiceIt plugin for that encapsulates VoiceIt's Voice Authentication(Voice Biometrics) API

Downloads

68

Readme

Cordova VoiceIt Plugin

An Apache Cordova plugin that lets you easily integrate VoiceIt's Voice Authentication API into your Cordova Based iOS and Android apps.

For more information on VoiceIt and its features, see the website and getting started docs

Supported Platforms

  • Android
  • iOS

Getting Started

To use the VoiceIt Cordova Plugin in your Cordova Project, if you haven't already, please Sign Up for a free Developer Id at http://voiceit.tech. Then follow the installation instructions below.

Installation

First please cd into your Cordova App's root directory via the terminal/command line and then run the following command, you can add your own micrphone usage description, this is required for recording on the ios platform, and description is shown to the user when requesting access to the mic:

$ cordova plugin add cordova-plugin-voiceit --variable MICROPHONE_USAGE_DESCRIPTION="This app needs to access to your microphone for voice biometrics"

API Calls

Here are code snippets that show you how you can call the Various VoiceIt API Calls inside of your Cordova Project JavaScript Files.

Create User

To create a new user call the createUser function like this with the following parameters: developerID, userId, password(not encrypted, just in text form the plugin encrypts the password using SHA256 for you), first name, last name

VoiceIt.createUser({
  developerID: "DEVELOPER_ID_HERE",
  userId: "cordovaUserId",
  password: "password"
}, function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});

Get User

To retrieve an existing user call the getUser function like this with the following parameters: developerID, userId, password(not encrypted, just in text form the plugin encrypts the password using SHA256 for you)

VoiceIt.getUser({
  developerID: "DEVELOPER_ID_HERE",
  userId: "cordovaUserId",
  password: "password"
}, function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});

Delete User

To delete an existing user call the deleteUser function like this with the following parameters: developerID, userId, password(not encrypted, just in text form the plugin encrypts the password using SHA256 for you)

VoiceIt.deleteUser({
  developerID: "DEVELOPER_ID_HERE",
  userId: "cordovaUserId",
  password: "password"
}, function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});

Create Enrollment

To create a new enrollment template for the specified user profile use the createEnrollment function like this with the following parameters: developerID, userId, password(not encrypted, just in text form the plugin encrypts the password using SHA256 for you) and optionally a content language.

Please Note: Unlike other wrappers, this createEnrollment function actually has recording inbuilt(supporting both Android and iOS platforms), it records the user saying their VoicePrint phrase for 5 seconds and then makes the Create Enrollment API call to send that audio file as an enrollment.

The recorder starts recording as soon as the createEnrollment function is called, it is also recommended that you either provide a visual or auditory indication to the user before the recording is about to start for example "playing a beep".

VoiceIt.createEnrollment({
  developerID: "DEVELOPER_ID_HERE",
  userId: "cordovaUserId",
  password: "password",
  contentLanguage: "en-US"
}, function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});

Get Enrollments

To get a list of the existing enrollments simply call the getEnrollments method for the specific user like this with the following parameters: developerID, userId, password(not encrypted, just in text form the plugin encrypts the password using SHA256 for you)

VoiceIt.getEnrollments({
  developerID: "DEVELOPER_ID_HERE",
  userId: "cordovaUserId",
  password: "password"
}, function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});

Delete Enrollment

To delete an enrollment simply call the deleteEnrollment method for the specific user like this with the following parameters: developerID, userId, password(not encrypted, just in text form the plugin encrypts the password using SHA256 for you), enrollmentId

VoiceIt.deleteEnrollment({
  developerID: "DEVELOPER_ID_HERE",
  userId: "cordovaUserId",
  password: "password",
  enrollmentId:"2461"
}, function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});

Authentication

This REST API call is used to authenticate the specified user profile within the Voiceprint Developer Portal (VPDP) service.

It authenticates the specified user profile in the VPDP service database and returns success or failure.

Please Note: The Voiceprint Phrase's (VPP's) are Text-Dependent. The Minimum length of a VPP is 1.5 second. Please note: You cannot use the same sound file for an enrollment and then an authentication. This is because of our anti- spoofing technology.

To manage the VPPs associated with your DeveloperID, please login to the developer portal and navigate to Voiceprint Phrases section.

To authenticate the user profile use the authentication method like this with the following parameters: userId, password(not encrypted, just in text form the plugin encrypts the password using SHA256 for you) and optionally content language.

Please Note: Unlike other wrappers, this authentication function actually has recording inbuilt(supporting both Android and iOS platforms), it records the user saying their VoicePrint phrase for 5 seconds and then makes the Authentication API call to send that audio file in for authentication.

The recorder starts recording as soon as the authentication function is called, it is also recommended that you either provide a visual or auditory indication to the user before the recording is about to start for example "playing a beep".

VoiceIt.authentication({
  developerID: "DEVELOPER_ID_HERE",
  userId: "cordovaUserId",
  password: "password",
  contentLanguage: "en-US"
}, function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});

Playback

This is a special method for this plugin that simply plays back the most recent recording if called right after either the createEnrollment or authentication method.

VoiceIt.playback( function(response) {
  alert('Result: ' + response);
}, function(error) {
  alert('Error: ' + error);
});