$ curl -X POST -u "057e842a-ece8-4825-8199-e77053a64a9e":"xxx" --header "Content-Type: audio/flac" --data-binary "@meeting2.flac" "https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?timestamps=true&customization_id=0ae89a90-955e-11e7-9e8b-53863e154a1c"
curl: (55) SSL_write() returned SYSCALL, errno = 32
{ "code" : 500 , "error" : "Server Error" , "description" : "2017-09-09T10:36:46-04:00, Error WATSNGWERR-0x0113001c occurred when accessing https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?timestamps=true&customization_id=0ae89a90-955e-11e7-9e8b-53863e154a1c, Tran-Id: stream-dp01-2524637048 - Watson Gateway Error" }
and
$ curl -X GET -u "057e842a-ece8-4825-8199-e77053a64a9e":"xxx" "https://stream.watsonplatform.net/speech-to-text/api/v1/customizations/0ae89a90-955e-11e7-9e8b-53863e154a1c"
{
"owner": "410e0660-26a8-4ee0-ba09-e101df7961e0",
"base_model_name": "en-US_BroadbandModel",
"customization_id": "0ae89a90-955e-11e7-9e8b-53863e154a1c",
"dialect": "en-US",
"created": "2017-09-09T12:54:40.057Z",
"name": "sprint2",
"description": "sprint2",
"progress": 0,
"language": "en-US",
"status": "ready"
}
The model exists, and it seems to be ready (however, I'd expect progress = 100 in this case but anyway), but for some reason, I can't use it.
Any clue on what this error message mean?
Ps. if I use the default model (not the customized one) it works
The status ready
means it is ready for training, not ready for using.
So you need to invoke the /train
API to make it available
for using and the progress
will be 100
once it is available
.
To invoke the /train
API:
$ curl -X POST -u "057e842a-ece8-4825-8199-e77053a64a9e":"xxx" \
"https://stream.watsonplatform.net/speech-to-text/api/v1/customizations/0ae89a90-955e-11e7-9e8b-53863e154a1c/train"
Optional, you can specify a customization weight while training.
Wait a while, you should get
$ curl -X GET -u "057e842a-ece8-4825-8199-e77053a64a9e":"xxx" "https://stream.watsonplatform.net/speech-to-text/api/v1/customizations/0ae89a90-955e-11e7-9e8b-53863e154a1c"
{
"owner": "410e0660-26a8-4ee0-ba09-e101df7961e0",
"base_model_name": "en-US_BroadbandModel",
"customization_id": "0ae89a90-955e-11e7-9e8b-53863e154a1c",
"dialect": "en-US",
"created": "2017-09-09T12:54:40.057Z",
"name": "sprint2",
"description": "sprint2",
"progress": 100,
"language": "en-US",
"status": "available"
}
This document is helpful: https://console.bluemix.net/docs/services/speech-to-text/language-create.html#trainModel