RADAR-base/RADAR-Cordova-OpenSmile-Plugin

Name: RADAR-Cordova-OpenSmile-Plugin

Owner: RADAR-CNS

Owner: RADAR-CNS

Description: A stand-alone OpenSmile plugin for the Cordova framework.

Created: 2016-11-28 11:18:15.0

Updated: 2017-10-25 12:43:08.0

Pushed: 2017-05-26 09:09:16.0

Homepage: null

Size: 17115

Language: C++

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Cordova opensmile Plugin

Plugin that create a binary file and store the output of opensmile tool for audio recordings.

This plugin can be used to get live output from oopensmile tool. It will create a binary file and store it in the specified location in the device.

Using

Create a new Cordova Project

$ cordova create opensmile com.example.opensmileapp OpenSmile

Install the plugin

$ cd /to/project/folder/

$ cordova plugin add https://github.com/RADAR-CNS/RADAR-Cordova-OpenSmile-Plugin.git

Edit www/js/index.js and add the following code inside onDeviceReady

var success = function(message) {
    alert(message);
}

var failure = function() {
    alert("Error calling OpenSmile Plugin");
}
To start opensmile
opensmile.start(fname, fpath, success, failure);
Params:
    fname: name of the csv file to store opensmile output.
    fpath: path of the csv file to store in the device.
    success: success callback.
    failure: failure callback.
To stop opensmile
opensmile.stop("Stop", success, failure);
Params:
    success: success callback.
    failure: failure callback.

Install Android platform

cordova platform add android

Run the code

cordova run 
More Info

For more information on setting up Cordova see the documentation

For more info on plugins see the Plugin Development Guide


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.