Assumes you have node.js and npm.
Create a file ~/.facebook-auth containing your login email and password in the format [email protected]:my-password.
Assumes you have node.js and npm.
Create a file ~/.facebook-auth containing your login email and password in the format [email protected]:my-password.
| package example | |
| import voiceit2.VoiceIt2 | |
| import scala.concurrent.Future | |
| import scala.util.parsing.json.JSON | |
| object Example { | |
| def main(args : Array[String]): Unit = { |
| const voiceit2 = require('voiceit2-nodejs'); | |
| let myVoiceIt = new voiceit2("<apiKey>", "<apiToken>"); | |
| //Pass your 36 character apiKey and apiToken as a parameter | |
| //(visit https://voiceit.io/settings to see your credentials) |
| myVoiceIt.createUser((jsonResponse)=>{ | |
| const userId = jsonResponse["userId"]; // Save generated userId to use later | |
| }); |
| myVoiceIt.createUser((jsonResponse)=>{ | |
| let userId = jsonResponse["userId"]; // Save generated userId to use later | |
| myVoiceIt.createVideoEnrollment({ | |
| userId: userId, | |
| contentLanguage : "en-us", | |
| videoFilePath : "/Users/username/Downloads/enroll.mp4" | |
| },(jsonResponse)=>{ | |
| console.log(jsonResponse); | |
| }); | |
| }); |
| myVoiceIt.createUser((jsonResponse)=>{ | |
| let userId = jsonResponse["userId"]; // Save generated userId to use later | |
| myVoiceIt.getAllEnrollments((jsonResponse)=>{ | |
| console.log(jsonResponse); | |
| }); | |
| }); |
| //... | |
| myVoiceIt.videoVerification({ | |
| userId: userId, | |
| contentLanguage : "en-us", | |
| videoFilePath : "/Users/username/Downloads/verify.mp4" | |
| },(jsonResponse)=>{ | |
| if (jsonResponse["responseCode"] === "SUCC") { | |
| // Add behavior for when user is successfully authenticated | |
| } else { | |
| // Add behavior for when video verification failed |
| mfcc := exec.Command("mfcc.sh", "/output/"+fileheader.Filename+".raw", strconv.Itoa(frameLength), strconv.Itoa(frameLengthOutput), strconv.Itoa(framePeriod), strconv.Itoa(mgcOrder)) | |
| mfccout, mfccerr := mfcc.Output() | |
| if mfccerr != nil { | |
| log.Println("Error executing mfcc.sh") | |
| log.Println("error:", mfccerr) | |
| http.Error(w, http.StatusText(404)+": "+mfccerr.Error(), 404) | |
| return | |
| } | |
| arr := make([]float64, 0) |
| root@f5c960513f28:/mount# strace -s300 -f ./gegl.ermine | |
| execve("./gegl.ermine", ["./gegl.ermine"], 0x7ffcfd077ff0 /* 9 vars */) = 0 | |
| readlink("/proc/self/exe", "/mount/gegl.ermine", 4096) = 18 | |
| stat("/mount/gegl.ermine", {st_mode=S_IFREG|0755, st_size=10426208, ...}) = 0 | |
| uname({sysname="Linux", nodename="f5c960513f28", ...}) = 0 | |
| open("/mount/gegl.ermine", O_RDONLY) = 3 | |
| fstat(3, {st_mode=S_IFREG|0755, st_size=10426208, ...}) = 0 | |
| mmap(0x1003b000, 20480, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x7e000) = 0x1003b000 | |
| close(3) = 0 | |
| mmap(0x10035000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x10035000 |