This can be used to check if a word already exists in the base model lexicon or return a list of words that sound similar. Using the similar word list, the user can validate the system's phonetic generation.
Use the Query available transcribe models method to determine if a model supports the custom vocabulary feature.
User request completion callback
When submitting a request, an optional HTTP callback can be specified which will be invoked when the request completes or fails. The callback is an HTTP POST to the exact URL provided. Only one attempt is made to reach the URL provided. The contents of the HTTP request match the response from the “Querying a request status and retrieving results” above.
Headers
x-requestid
- Contains the request_id received when the request was submittedx-status
- One of the following indicating the status of the request:
Status | Description |
---|---|
“Completed” | The request has finished processing and the user callback, if provided has been called. |
"Failed" | An error occurred processing the request. |
x-error
- If the request failed, this would contain an error message.x-userdata
- This will contain the user data supplied with the original request.
Body
If the status is “Completed” the body of the request is a json object with the input word list and the similar sounding words from the model lexicon. If the status is “Failed” the body of the request contains the same error message provided in the “x-error” header.
Submitting text in the BODY of the request
Users can submit larger text for processing by submitting the text as the body of the request.
curl -v "https://api.apptek.com/api/v2/userlexicon/suggest/en-us.bcn" -H "x-token: XXXXXXX" -H "Content-Type: application/json" --data-binary "@words.json"