Unable to upload large file to Speech To Text IBM Watson - speech-to-text

When I tried to upload large file (from observation is greater than 8MB, around 3-4mins), I got "request is aborted" error.
Anyone experiencing similar issue?
I am using C# and uses the HTTP REST Interface of Speech to Text using sessionless method.
This is the url I am hitting: https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?timestamps=true≺ofanity_filter=false&max_alternatives=3&word_confidence=true&word_alternatives_threshold=0.7&model=en-US_NarrowbandModel&continuous=true∈activity_timeout=600
I tried both using "Transfer-Encoding: chunked" and without.
Please help. Thanks.

Split on chunks and upload separately. Or use other services like speechmatics or even open soruce implementation, they work with very large files.

you can push files/streams of up to 100MBs in a single request using Watson STT API. If you are using C# please take a look at the .NET SDK, that may be a good start for you: https://github.com/watson-developer-cloud/dotnet-standard-sdk. And, of course, nothing like getting started with a curl command to build confidence, see details here: https://www.ibm.com/watson/developercloud/doc/speech-to-text/getting-started.html

Related

What is the fastest way to generate an POST or GET SOAP XML payload for SuiteTalk Web services?

Hopefully someone can help me.
I am currently using POSTMAN to run SOAP web service tests on NetSuite.
Annoyingly, I am having to generate the body of an XML request from scratch, and would really like a method whereby a basic template is generated for me, and I simply fill in the gaps. Creating an XML web request from scratch is prone to errors hence my question. I tried SOAPUI but it does not
Any ideas is most appreciated!
hope you remember me!! The easiest way would be to download any of the existing working SOAP web request from any running build and modify that to suit your need. There is no out of the box built in template that you could build on at least as per my knowledge. Please specify the record for which you are building the SOAP request
The easiest way is to not use POSTMAN.
I used to do a lot of this and what I'd do is:
generate the java client for SuiteTalk
install a recording proxy (I think WireMock does this -- the one I used to use doesn't seem to be around anymore)
use JUnit tests to hit SuiteTalk
in the test setup override the SSL config to ignore host name verification
test an API call
extract the complete working SOAP from the proxy logs
templatize the SOAP and use it where needed.

How to store and handle big data string (around 2mb) in node js

I have a frontend in angular and the API is in nodejs. The frontend sends me the encrypted file and right now I am storing it in MongoDB. But when I send this file to a frontend, the call will sometimes break. So please suggest me how can I solve this call break issue.
Your question isn't particularly clear. As I understand it, you want to send a large file from the Node backend to the client. If this is correct, then read on.
I had a similar issue whereby a long-running API call took several minutes to compile the data and send the single large response back to the client. This issue I had was a timeout and I couldn't extend it.
With Node you can use 'streams' to stream the data as it is available to the client. This approach worked really well for me as the server was streaming the data, the client was reading it. This got round the timeout issue as there is frequent 'chatter' between the server and client.
Using Streams did take a bit of time to understand and I spent a while reading various articles and examples. That said, once I understood, it was pretty straightforward to implement.
This article on Node Streams on the freeCodeCamp site is excellent. It contains a really useful example where it creates a very large text file, which is then 'piped' to the client using streams. It shows how you can read the text file in 'chunks', make transformations to those checks and sent it to the client. What this article doesn't explain is how to read this data in the client...
For the client-side, the approach is different from the typical fetch().then() approach. I found another article that shows a working example of reading such streams from the back-end. See Using Readable Streams on the Mozilla site. In particular, look at the large code example that uses the 'pump' function. This is exactly what I used to read the data from streamed from the back-end.
Sorry I can't give a specific answer to your question, but I hope the links get you started.

Use nodeJS server with symfony

I have a huge symfony app and I wanted to add some feature that I could only do with a nodeJS server .
So I have a big JSON file which result from my nodeJS run, this file have to go in Symfony.
And symfony have to be able to send some pdf file to the node server (the one which will be transform in JSON by my node server).
Is anyone have some starting idea ?
thansk for help :D
No one is going to be able to provide a full answer with so few details, but generally speaking messaging and remote procedure calls are excellent for interop between parts of a large app.
You could send a message from Symfony (which includes the path of the PDF, or the contents itself), and node will provide the result. You can encode that as JSON, and send it as an answer.
RabbitMq is widely supported, allows both produce-consume or RPC-style use.

Dialogflow/ API.AI for Google Home Mini App

This is my very first question and seems to be easy but coding it is somehow difficult...
So, basically I've got an Agent that should just call a URL and get the content of the website. This should then be spoken out by the smart speaker.
I already have a webhook working but now I'm stuck at getting the web-content..
Would be awesome if someone could please help me out here.
Best regards
Getting the web content is not easy . you have to parse the content in a web page using program , a simple logic is to detect '<' and '>' and remove all strings in between using string functions
Best of luck with that

Node.js NTLM HTTP Authentication, how to handle the 3 types

I'm trying to get NTLM Authentication working w/ Node.js. I've been reading this ( http://davenport.sourceforge.net/ntlm.html#theNtlmMessageHeaderLayout ). I send the header and get a Base64 authentication header.
I tried converting it from Base64 to UTF8 by making a new Buffer with base64 encoding and then calling toString('utf8') which returns a string something like
NTLMSSP\u0000\u0001\u0000\u0000\u0000\u0007�\b�\u0000
This is where I need help. I understand the NTLMSSP\u0000 is the null terminated signature, but and what the rest is supposed to indicate, but to me it's just garbage. It's unicode characters, but how am I supposed to get actual data out of that? I may be converting it incorrectly, which may be adding to my troubles, but I'm hoping someone can help.
Have a look at http://www.innovation.ch/personal/ronald/ntlm.html
What you receive is a Type-2 Message. The pages explains it in a very practical way. You have to extract the server challenge (nonce) and the server flags.
I just implemented a module for node.js to do just that: https://github.com/SamDecrock/node-http-ntlm
Have you looked at NTLMAPS?
You may be able to solve your problem by using it as a proxy server, but if you really want to implement NTLM auth in Javascript, then NTLMAPS provides lots of working code to study.
Sam posted the best resource I've seen for understanding what's going on.
jclulow on GitHub seems to have implemented it in a Samba library he built.
Take a look here:
https://github.com/jclulow/node-smbhash
under lib\ntlm.js you can see how he's handled the responses.
I've built client a couple of months ago using javascript, ntlm.js. Maybe that can help you get along. It was based on the documentation # innovation.ch and Microsofts own official documentation (see the references on the github page).

Resources