I have created IBM Speech to Text service. Then I have performed the trial call using the following IBM instructions:
Try an API call
Call the POST /v1/recognize method to request a basic transcription of a FLAC audio file with no additional request parameters.
First, download the sample audio file audio-file.flac.
Then, issue the following command to call the service's /v1/recognize method for basic transcription with no parameters. The example uses the Content-Type header to indicate the type of the audio, audio/flac. The example uses the default language model, en-US_BroadbandModel, for transcription. Be sure to modify {path_to_file} to specify the location of the audio-file.flac file.
curl -X POST \ -u "apikey:{apikey}" \ --header "Content-Type: audio/flac" \ --data-binary @{path_to_file}audio-file.flac \ "{url}/v1/recognize"
The service returns the following transcription results:
{ "results": [ { "alternatives": [ { "confidence": 0.8691191673278809, "transcript": "several tornadoes touch down as a line of severe thunderstorms swept through colorado on sunday" } ], "final": true } ], "result_index": 0 }
I have tried execute this substituting my STT service credentials, but I received error message instead of transcript result:
<HTML><HEAD><TITLE>Error</TITLE></HEAD><BODY>
An error occurred while processing your request.<p>
Reference #179.24f01502.1545478256.101ee90d
</BODY></HTML>
I have tried different {path_to_file} variants - using slashes /, backslashes \ and double backslashes \ \ but all of them returned the same error. What's wrong with my request or my STT service?
apikey
can be used to get anaccess_token
and then call the service with that. Take a look at this page console.bluemix.net/docs/services/watson/…. It shows the process to do a Discovery API call but it's the same for Speech to Text – German Attanasio