Documentation

Documentation

  • Conversation
  • Reader
  • Speech
  • Console
  • Languages iconJanpanese
    • Tiếng Việt
    • English

›API

概要

  • Text to Speech
  • Speech to Text

API

  • Text to Speech
  • Speech to Text

チュートリアル

  • Text to Speech
  • Speech to Text

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
  • 0 Success
  • 1 No voice
  • 2 Canceled
  • 9 System busy
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"
}
← Text to SpeechText to Speech →
  • Request
    • Request Url
    • Request Headers
    • Request Body
    • Sample Request
  • Response
    • JSON
    • Sample Response: Success
    • Sample Response: Error
Conversation
DocumentationAPI ReferenceTutorials (Video)
Reader
DocumentationAPI ReferenceTutorials
Speech
DocumentationAPI ReferenceTutorials
Copyright © 2023 FPT Corporation