API
FPT.AI Speech - Speech to Text
Request
Request Url
POST https://api.fpt.ai/hmi/asr/general
Request Headers
| Parameter | Required | Default | Description | 
|---|---|---|---|
| api_key | Yes | Your api key ( get from console.fpt.ai ) | 
Request Body
Audio file
Sample Request
curl -X Post \
-H "api_key: xxxxxxx" \
-T "/path/of/file/voice" \
"https://api.fpt.ai/hmi/asr/general"
Response
JSON contains the result of the recognized text or error message.
JSON
| Field Name | Description | 
|---|---|
| status | 
 | 
| hypotheses | Array of sentences | 
| id | Request id for further information | 
Sample Response: Success
Note: The Vietnamese language in JSON is encoded by UTF-8
{
    "status": 0,
    "hypotheses": [{
            "utterance": "ch\u00e0o m\u1eebng b\u1ea1n"
        }
    ],
    "id": "adab73e2-a1d9-46c2-ba5e-30e575b6c3fc"
}
Sample Response: Error
{
  "status": 9,
  "message": "Not available.",
  "id": "8afce928-8b87-4114-bc6f-33d1eaac4fe5"
}
