POST /speech/languagemodels
Train a custom language model using pharases provided by user. Returning a languageModelId for accessing the language model later and using this custom language model to transcribe audios. Using custom language models will boost accuracy for specific keywords/phrases and can be used for a domain-specific speech recognition.
Body Required
A json object including a name and a corpora. Corpora is a array of text data to train a custom model. This text data can be keywords/phrases. All values in the array must be a string. Name is an arbitary string you set for the custom language model name.
-
corpora array[string] Required
An array of text data to train a custom model. This text data can be keywords/phrases, or historical transcripts (transcriptionId of previous speechRecognitionResult). All values in the array must be a string.
At least
1
but not more than10000
elements. -
name string
The name of the custom language model being created.
Responses
-
• 201
OK. Processing and Training Language Model.
-
• 400
This response means that server could not understand the request due to invalid syntax.
-
• 401
Authentication is needed to get requested response. This is similar to 403, but in this case, authentication is possible.
-
• 403
Client does not have access rights to the content so server is rejecting to give proper response.
-
• 405
The request method is known by the server but has been disabled and cannot be used.
-
• 429
The user has sent too many requests in a given amount of time ("rate limiting").
-
• 500
The server has encountered a situation it doesn't know how to handle.
-
• 501
The request method is not supported by the server and cannot be handled.
curl \
-X POST https://api.amerandish.com/v1/speech/languagemodels \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"corpora":["string"],"name":"string"}'
{
"corpora": [
"string"
],
"name": "string"
}
{
"languageModelId": "string",
"name": "string",
"status": "queued"
}
{
"code": 400,
"message": "Bad Request. Invalid JSON object."
}
{
"code": 401,
"message": "Unautherized. Invalid Authorization Token."
}
{
"code": 403,
"message": "Forbidden. Do not have access right to resource."
}
{
"code": 405,
"message": "Method Not Allowed."
}
{
"code": 429,
"message": "Too Many Requests. Your request is blocked due to exceeding rate limiting."
}
{
"code": 500,
"message": "Internal Server Error. Please retry later."
}
{
"code": 501,
"message": "Not Implemented. This functionality is not implemented yet."
}