Closed f1yn closed 6 years ago
Just a heads up, while the integration should not break the existing Google Speech one, I have not been able to test if this breaks it or not. As implemented, it shouldn't break it.
Wow, Evan, that was a very quick implementation. I am going to try it today. Thanks a lot.
Regards
@ag-ni I'm not @evancohen but I'm flattered that you'd think I am. The integrations branch (before it's merged) can be installed via npm i flynnham/sonus#feature/integrations
.
At first glance this is awesome! I'll dig into it tonight 👍
@flynnham : my bad, I should have checked carefully. But your work is impressive. I am in the process of implementing your version as we speak. Thanks a lot for awesome work. You were really fast. Thank you.
@flynnham : Can you please post some instructions how to use your version of Sonus. For example - do we have to install "npm i flynnham/sonus#feature/integrations" on top of Sonus, where do we configure the watson api url , username, password etc. Regards
@ag-ni There is a simple example on my branch outlining what's required to use the IBM Watson Integration: https://github.com/flynnham/sonus/blob/feature/integrations/examples/watson-example.js
In summary (from the updated README),
const watsonClass = require('watson-developer-cloud/speech-to-text/v1');
const watsonSpeech = new watsonClass({
"url": "https://stream.watsonplatform.net/speech-to-text/api",
"username": "<username>",
"password": "<password>"
})
const speech = require('sonus/integrations').watson(watsonSpeech)
const hotwords = [{ file: 'resources/snowboy.umdl', hotword: 'snowboy' }]
const sonus = Sonus.init({ hotwords }, speech)
@flynnham : Thanks a lot for quick response. Yes, indeed you have posted the example.js file already. Actually, I am unable to install, there is an error - npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json
Below are my versions of node and npm -- pi@raspberrypi:~ $ node -v v9.2.1 pi@raspberrypi:~ $ npm -v 5.6.0
I am wondering if this needs to be installed on top of sonus ??
Regards
@ag-ni You need to install it inside of an already existing npm project (using the method I've given above). You also need to install the Watson API in the same project directory with npm i watson-developer-cloud
.
+ @ashishsc What do you think about this approach to support multiple streaming recognizers?
Ok, so I'm going to be in Peru for the next week and I want @ashishsc to have the chance to review this before I merge. It seems like there's a work-around way to use this in the meantime so I'm inclined to wait until I get back.
@flynnham that sound ok to you?
@evancohen Sounds good to me.
@flynnham : Thanks for the suggestion. I tried to install under existing Sonus directory but I got duplicate error -- npm ERR! code ENOSELF npm ERR! Refusing to install package with name "sonus" under a package npm ERR! also called "sonus". Did you name your project the same npm ERR! as the dependency you're installing?
Any suggestion ? Thank you.
@ashishsc any chance you'll have time to review sometime this week?
Yeah I can review this week. Sorry I've been gone
Looks good to me!
Boom! Thanks folks :)
hi @ashishsc @flynnham @evancohen : Seems IBM Watson API has changed/updated. It can not be called by watson-developer-cloud/speech-to-text/v1 Rather it seems that we need to use ibm-watson/speech-to-text/v1
Is there any plant to change the integration / wrapper ?
Regards
Added custom integration hook implementation (including those for websockets), and added support for IBM Watson speech to text service.
I also removed Google Speech as a dependency as it is no longer the only speech engine. The README has also been updated to reflect the new integrations.
I apologize in advance for any formatting errors, my Atom instance uses tabs as the primary tabbing character.