Skip to content

can not start service #1

Description

@ag-ni

Hi,

Tried installing and running the voice-engine but ended up with errors --

npm start

voice-engine@1.0.0 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! voice-engine@1.0.0 start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the voice-engine@1.0.0 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions