Farsava API
1.0.7

Farsava API. Speech Recognition and Text to Speech by applying powerful deep neural network models.

This is the documentation for version 1.0.7 of the API. Last update on Jul 7, 2019.

Base URL
https://api.amerandish.com/v1

POST /speech/languagemodels

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.


application/json

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 than 10000 elements.

  • name string

    The name of the custom language model being created.

Responses

  • 201

    OK. Processing and Training Language Model.

    Hide response attributes Show response attributes object
    • This is the language model id of a customized trained language model. You can train your own language models and then use them to recognize speech. Refer to languagemodel/train for more info.

      There are some pretrained language models which you can use.

      Model Description
      general Best for audio content that is not one of the specific language models. This is the default language model and if you are not sure which one to use, simply use 'general'.
      numbers Best for audio content that contains only spoken numbers. For examble this language model can be used for speech enabled number input fileds.
      yesno Best for audio content that contains yes or no. For examble this language model can be used to receive confirmation from user.
      country Best for audio content that contains only spoken country. For examble this language model can be used for speech enabled input fileds.
      city Best for audio content that contains only spoken city. For examble this language model

      can be used for speech enabled input fileds. career | Best for audio content that contains only spoken career names. For examble this language model can be used for speech enabled input fileds.

    • name string

      The name of the custom language model.

    • status string

      Status of the language model training process. After a language model training finishes it can be used for speech recognition using its languageModelId.

      Values are queued, training, or trained. Default value is queued.

  • 400

    This response means that server could not understand the request due to invalid syntax.

    Hide response attributes Show response attributes object
    • status string Required

      HTTP response status code.

    • detail string Required

      Message explaining the issue.

    • title string

      Error message title.

    • type string

      Error type.

  • 401

    Authentication is needed to get requested response. This is similar to 403, but in this case, authentication is possible.

    Hide response attributes Show response attributes object
    • status string Required

      HTTP response status code.

    • detail string Required

      Message explaining the issue.

    • title string

      Error message title.

    • type string

      Error type.

  • 403

    Client does not have access rights to the content so server is rejecting to give proper response.

    Hide response attributes Show response attributes object
    • status string Required

      HTTP response status code.

    • detail string Required

      Message explaining the issue.

    • title string

      Error message title.

    • type string

      Error type.

  • 405

    The request method is known by the server but has been disabled and cannot be used.

    Hide response attributes Show response attributes object
    • status string Required

      HTTP response status code.

    • detail string Required

      Message explaining the issue.

    • title string

      Error message title.

    • type string

      Error type.

  • 429

    The user has sent too many requests in a given amount of time ("rate limiting").

    Hide response attributes Show response attributes object
    • status string Required

      HTTP response status code.

    • detail string Required

      Message explaining the issue.

    • title string

      Error message title.

    • type string

      Error type.

  • 500

    The server has encountered a situation it doesn't know how to handle.

    Hide response attributes Show response attributes object
    • status string Required

      HTTP response status code.

    • detail string Required

      Message explaining the issue.

    • title string

      Error message title.

    • type string

      Error type.

  • 501

    The request method is not supported by the server and cannot be handled.

    Hide response attributes Show response attributes object
    • status string Required

      HTTP response status code.

    • detail string Required

      Message explaining the issue.

    • title string

      Error message title.

    • type string

      Error type.

POST /speech/languagemodels
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"}'
Request example
{
  "corpora": [
    "string"
  ],
  "name": "string"
}
Response examples (201)
{
  "languageModelId": "string",
  "name": "string",
  "status": "queued"
}
Response examples (400)
{
  "code": 400,
  "message": "Bad Request. Invalid JSON object."
}
Response examples (401)
{
  "code": 401,
  "message": "Unautherized. Invalid Authorization Token."
}
Response examples (403)
{
  "code": 403,
  "message": "Forbidden. Do not have access right to resource."
}
Response examples (405)
{
  "code": 405,
  "message": "Method Not Allowed."
}
Response examples (429)
{
  "code": 429,
  "message": "Too Many Requests. Your request is blocked due to exceeding rate limiting."
}
Response examples (500)
{
  "code": 500,
  "message": "Internal Server Error. Please retry later."
}
Response examples (501)
{
  "code": 501,
  "message": "Not Implemented. This functionality is not implemented yet."
}