Dear Developers,
It would greatly benefit potential and current customers if we could see different implementations of the speech-to-text sample app on various platforms. Due to the uniqueness and complexity of the speech-to-text service (compared to other Watson services), the importance of examples is even more relevant.
While there is only an nodeJS example at the moment, please consider showing how this can be done in an IOS (Swift and Obj-C)/Android App or document some reference material to how this can be done.
In reference to a mobile app, some questions I have are:
Is the best way to utilize Watson speech-to-text through websockets? Are there alternative ways?
I understand that RESTful is an architecture whereas a socket is more like a communication method. Can someone explain how sockets utilize REST for the speech-to-text api? Specifically, how is the RESTful speech-to-text webservice augmented with a a websocket-based API for real-time responses?
At large scale (hundreds of thousands of clients), will there need to be some special work done on the server to support large numbers of simultaneously connected sockets?
Are there any examples of a Swift implementation of the sample speech-to-text app?
Answer by German Attanasio Ruiz (4975) | May 12, 2015 at 08:10 AM
Hi @warpandas,
The service will support WebSocket soon, that will reduce drastically the amount of code that you need to write. YOu will write 10-20 lines total.
The idea behind a socket, is that it is a “port” through which data goes in and out of. On the other hand, with REST you always need to send a message that includes headers and the server always needs to spend time processing them.
For more details, see a general benchmark of WebSockets vs REST here.
The idea behind our services is to be able to support millions of requests from all our developers. However if you are planning on having millions of requests on a daily basis I would suggest you to become an EcoSystem partner.
We will be releasing SDKs for Android and IOs in a few weeks, everything will be in our GitHub organization.
Thanks for your feedback and Stay tuned.
Answer by warpandas (0) | May 13, 2015 at 01:36 AM
Thank you for your quick reply. It seems like there are substantial features in the pipeline to look forward to.
In the meantime, can you kindly provide an example of how to utilize sockets with the speech-to-text REST API in a general implementation for real time speech-to-text analysis? Although it's nice to have a wrapper for NodeJS users, what about other implementations such as HTTP long polling?
I'm also curious as to what the difference between using sockets to augment REST and using the websocket protocol. It appears that sockets/REST can coexist and are even interchangable in an application. It sounds like the same thing to me except that you are removing the REST communication methods and instead hooking events through the websocket protocol.
Can you provide some more information as to how the speech-to-text example encapsulates both sockets and REST? Am I correct in understanding that performance wise, we should be able to see Websocket > Socket + REST > REST when doing live transcription?
Answer by Glenn R. Fisher (196) | Mar 19, 2016 at 04:13 AM
Hi @warpandas.
Just want to let you know that the Watson Developer Cloud iOS SDK now includes support for Speech to Text. There is also an example application to demonstrate the Speech to Text service.