0
votes

I'm new to IBM Watson but I need to use the SpeechtoText service with asynchronous calls. I found in their documentation two solutions but I don't know what's the difference between them and which one should I use.

The first one:

To call a method asynchronously, use the enqueue method of the ServiceCall interface to receive a callback when the response arrives. The ServiceCallback interface of the method's argument provides onResponse and onFailure methods that you override to handle the callback.

The second:

The asynchronous HTTP interface of the Speech to Text service provides methods for transcribing audio via non-blocking calls to the service. The interface employs user-specified secret strings and digital signatures to provide a level of security for requests that are made over the HTTP protocol. To use the asynchronous interface, you can register a callback URL to be notified by the service of the job status and the results automatically. Poll the service to obtain the job status and the results manually.

1

1 Answers

0
votes

The second method works for any programming language. The first is for Java only and implemented by the JAVA SDK for the Watson Developer Cloud, most probably making use of the second method.

ie. If you use the second method, you will probably have to write boiler plate making it look like the enqueue version. So why not just use the first method - ie. enqueue.