ibm-watson

1006 Error code in IBM Watson speech-to-text API

假如想象 提交于 2019-11-29 17:26:10
I'm using Ratchet to connect to IBM Watson websockets, and it always seems to work fine for smaller files (I've tested up to a 66-minute 23 MB mp3 file), but it always fails for larger files (such as 2-hour 56 MB mp3). This is my log: [2019-03-17 21:43:23] local.DEBUG: \Ratchet\Client\connect bf4e38983775f6e53b392666138b5a3a50e9c9c8 [2019-03-17 21:43:24] local.DEBUG: startWatsonStream options = {"content-type":"audio\/mpeg","timestamps":true,"speaker_labels":true,"smart_formatting":true,"inactivity_timeout":-1,"interim_results":false,"max_alternatives":1,"word_confidence":false,"action":"start

Watson dialog cURL conversation post request not passing form data

你说的曾经没有我的故事 提交于 2019-11-29 17:13:15
When making a post cURL request as below to try and continue a created conversation watson instead returns a new conversation. curl -u "USERNAME":"PASSWORD" -X POST --form conversation_id=CONVOID --form client_id=CLIENTID --form input="What type of toppings do you have?" "https://gateway.watsonplatform.net/dialog/api/v1/dialogs/DIALOGID/conversation" If i use the below cURL it works fine. curl -u "USERNAME":"PASSWORD" --data "conversation_id=CONVOID&client_id=CLIENTID&input=What type of toppings do you have?" https://gateway.watsonplatform.net/dialog/api/v1/dialogs/DIALOGID/conversation My

Watson STT Java - Varying results between Websockets Java and HTTP POST

不想你离开。 提交于 2019-11-29 15:19:21
问题 I'm trying to build an app that takes a streamed audio input (eg: a line in microphone) and does Speech-to-Text using IBM Bluemix (Watson). I briefly modified the example Java code found here. This example sends a WAV but instead I'm sending a FLAC... this is [should] be irrelevant. The results are bad, very bad. This is what I get when using the Java Websockets code: { "result_index": 0, "results": [ { "final": true, "alternatives": [ { "transcript": "it was six weeks ago today the terror ",

How do I play audio returned from an XMLHTTPRequest using the HTML5 Audio API

泪湿孤枕 提交于 2019-11-29 07:24:20
I'm failing to be able to play audio when making an "AJAX" request to my server side api. I have backend Node.js code that's using IBM's Watson Text-to-Speech service to serve audio from text: var render = function(request, response) { var options = { text: request.params.text, voice: 'VoiceEnUsMichael', accept: 'audio/ogg; codecs=opus' }; synthesizeAndRender(options, request, response); }; var synthesizeAndRender = function(options, request, response) { var synthesizedSpeech = textToSpeech.synthesize(options); synthesizedSpeech.on('response', function(eventResponse) { if(request.params.text

How to get exact answers instead of the whole document using Watson Discovery?

痞子三分冷 提交于 2019-11-29 03:42:54
问题 After testing the discovery service , it seems useless to me at least or I might be missing something. When I query, it matches the document and returns the whole document . If my document is huge, then for all queries it returns the whole document matching the query text, which is useless. Now Do I have to create a separate document for every query? If that's the case, API.AI or WIT.AI is a better option. Please clear me on what I am missing in here! 回答1: For now with Discovery, you would

NPM ELIFECYCLE error - using node server.js command

瘦欲@ 提交于 2019-11-29 02:28:28
问题 I am deploying test-bot on ibm watson as described here https://github.com/eciggaar/text-bot and when I am trying to deploy code locally using CLI foundry it is getting the following errors. I am using Nodejs version 6.10.3 and npm version 5.0.4 can someone please help me with this. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! text-bot@0.1.2 start: `node server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the text-bot@0.1.2 start script. npm ERR! This is probably not a problem

How to remove a context variable in Watson Assistant service on IBM Cloud

﹥>﹥吖頭↗ 提交于 2019-11-28 02:10:35
I am using this, but this only sets it to empty, { "context": { "time": "", "place": "", "things": "", "transport": "" }, "output": {} } I also tried "time": "null" and "time": "$time.remove" For those using Watson Assistant on an older API version: The best is to use context.remove() in the output section . I usually have an extra child node for cleanup. { "output": { "text": {}, "deleted": "<? context.remove('eventName') ?> <? context.remove('queryPredicate') ?>" } } Because deleted is not part of the context section it won't be carried forward. For those on recent API versions of Watson

How do I play audio returned from an XMLHTTPRequest using the HTML5 Audio API

左心房为你撑大大i 提交于 2019-11-28 01:35:28
问题 I'm failing to be able to play audio when making an "AJAX" request to my server side api. I have backend Node.js code that's using IBM's Watson Text-to-Speech service to serve audio from text: var render = function(request, response) { var options = { text: request.params.text, voice: 'VoiceEnUsMichael', accept: 'audio/ogg; codecs=opus' }; synthesizeAndRender(options, request, response); }; var synthesizeAndRender = function(options, request, response) { var synthesizedSpeech = textToSpeech

Stream audio from mic to IBM Watson SpeechToText Web service using Java SDK

北战南征 提交于 2019-11-27 16:52:13
问题 Trying to send a continuous audio stream from microphone directly to IBM Watson SpeechToText Web service using the Java SDK. One of the examples provided with the distribution ( RecognizeUsingWebSocketsExample ) shows how to stream a file in .WAV format to the service. However, .WAV files require that their length be specified ahead of time, so the naive approach of just appending to the file one buffer at a time is not feasible. It appears that SpeechToText.recognizeUsingWebSocket can take a

How to make Watson Conversation Api Invoke a web Application Url when User Enters an Input?

血红的双手。 提交于 2019-11-27 14:53:33
I have a spring mvc application and I would like to make my user call a bot and the bot based on user input should access a url and based on the response provide an answer.How could I achieve this in Java? There is no direct way to do it. However, Watson Conversation does provide a mechanism to handle such requests. You will need to tell the calling Java app that a url needs to be invoked. This is done by using two features: Context.request skip_user_input A request is a special context variable that has args, name and result. It is used to tell the calling app that it should do some action