Registering Words in User Dictionary
POST/profilewords/:dgn/:pid
You can replace words in the user dictionary for the specified speech recognition engine and profile ID.
The request body format differs depending on the engine.
- Hybrid engine: Register words with
written(the written form) andspoken(the reading).classname(the class name) is optional. - End to End engine: Emphasize words by replacing
written(the written form) withalternativewritten(the alternative written form). Specify the strength withbiasing(the biasing level, 0 to 1, default 0.5).
With the End to End engine, it's possible to specify multiple alternative written forms for the same written form. In this case, the same biasing level is applied to words with the same written form. If different biasing levels are specified for the same written form in the request, the value of the first occurrence in the request is adopted. For example, if you specify two entries for the same written form "AMI", one with a biasing level of 0.8 and one with no specification, the value "0.8" applied to the first occurrence is uniformly applied.
Request
Responses
- 200
- 400
- 401
- 404
- 422
- 500
Returns a list of registered words in JSON format.
Returned when the request body is not correct.
| Response body | Error situation |
|---|---|
{"code":"-","message":"missing request body"} | When a POST method is requested but no request body is specified |
{"code":"-","message":"invalid request body (<optionalMessage>)"} | When the request body is not valid JSON |
Returned when authentication of the API key (service authentication key string) fails.
| Response body | Error situation |
|---|---|
{"code":"-","message":"can't verify service authorization"} | When authentication of the API key fails |
{"code":"-","message":"service authorization has expired: <expirationTime> (<expiresIn>)"} | When the API key has expired |
Returned when path parameters are not specified.
| Response body | Error situation |
|---|---|
{"code":"?","message":"missing dictation grammar file name"} | When the connection engine name <dgn> is not specified |
{"code":"?","message":"missing profile id"} | When the profile ID <pid> is not specified |
Returned when the JSON specified in the request body is not in the expected format.
| Response body | Error situation |
|---|---|
{"code":"?","message":"missing profile words"} | When the JSON is not in the expected format |
{"code":"?","message":"invalid written: <written>"} | When the written is incorrect |
{"code":"?","message":"invalid spoken: <spoken>"} | When the spoken is incorrect |
{"code":"?","message":"invalid class name: <className>"} | When the word class is incorrect |
{"code":"?","message":"invalid alternative written: <alternativeWritten>"} | When the alternative written is incorrect |
Returned when an unexpected exception occurs.
| Response body | Error situation |
|---|---|
{"code":"?","message":"unexpected exception occurred (<optionalMessage>)"} | When an unexpected exception occurs |