tlindener / node-voice-engine Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Hi,
Tried installing and running the voice-engine but ended up with errors --
npm start
[email protected] start /home/pi/voice-engine-proj
node server.js
{"name":"VoiceEngine","hostname":"raspberrypi","pid":5141,"level":30,"msg":"start keyword spotter","time":"2018-01-09T14:35:39.552Z","v":0}
{"name":"VoiceEngine","hostname":"raspberrypi","pid":5141,"level":30,"msg":"Online speech recognition started!","time":"2018-01-09T14:35:39.580Z","v":0}
{"name":"VoiceEngine","hostname":"raspberrypi","pid":5141,"level":30,"msg":"hasFlac true","time":"2018-01-09T14:35:39.601Z","v":0}
{"name":"VoiceEngine","hostname":"raspberrypi","pid":5141,"level":30,"msg":"create recognizeStream","time":"2018-01-09T14:35:39.732Z","v":0}
{"name":"VoiceEngine","hostname":"raspberrypi","pid":5141,"level":30,"msg":"Spawn microophone process","time":"2018-01-09T14:35:39.734Z","v":0}
/home/pi/voice-engine-proj/server.js:21
engine.synthesizeText(text);
^
ReferenceError: text is not defined
at Object. (/home/pi/voice-engine-proj/server.js:21:23)
at Module._compile (module.js:641:30)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Function.Module.runMain (module.js:682:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:613:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-01-09T14_35_39_794Z-debug.log
Below is my server.js file -
var VoiceEngine = require('voice-engine');
var sttengine = {
url: "https://stream.watsonplatform.net/speech-to-text/api",
username: "snip",
password: "snip"
}
var ttsengine = {
url:"https://stream.watsonplatform.net/text-to-speech/api",
username:"snip",
password:"snip"
}
var speech = {
model: "watson.pmdl",
sensitivity: 0.4
}
var engine = new VoiceEngine(sttengine, ttsengine, speech);
engine.startKeywordSpotting();
engine.startSttRecognition();
engine.synthesizeText(text);
//engine.synthesizeText(text);
engine.on('keyword', function() {
})
engine.on('recognition-stopped', function() {
})
engine.on('recognition', function(message) {
})
engine.on('synthesized', function(message) {
})
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.