Transcribe a speech record into text.
- Basic usage
- Getting available providers
- Getting information about a provider
- Supported languages
- Setting your own language codes
To transcribe an audio recording, send a POST request to Intento API at https://api.inten.to/ai/speech/transcribe. Specify the source, source language and the desired provider in JSON body of the request as in the following example:
curl -XPOST -H 'apikey: YOUR_API_KEY' 'https://api.inten.to/ai/speech/transcribe' -d '{
"context": {
"source": "...",
"language": "en"
},
"service": {
"provider": "ai.speech.transcribe.alibaba.asr_api"
}
}'
The response contains the speech transcribe results:
{
"results": "...",
"meta": {},
"service": {
"provider": {
"id": "ai.speech.transcribe.alibaba.asr_api"
}
}
}
If the provider doesn't have capabilities (e.g. language) to process request, 413 error will be returned:
{
"error": {
"code": 413,
"message": "Provider ai.speech.transcribe.alibaba.asr_api constraint(s) violated."
},
"request_id": "..."
}
To get a list of available providers, send a GET request to https://api.inten.to/ai/speech/transcribe.
curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/speech/transcribe'
The response contains a list of the providers available for given constraints:
[
{
"id": "ai.speech.transcribe.ibm.watson_speech_to_text_api",
"api_id": "ibmwatsonspeechtotext",
"name": "IBM Watson",
"description": "Speech to Text",
"own_auth": true
}
]
More on provider flags and capabilities.
The list of providers may be further constrained by adding desired parameter values to the GET request:
curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/speech/transcribe?language=ru'
Response:
[
{
"id": "ai.speech.transcribe.alibaba.asr_api",
"name": "Alibaba Cloud",
"description": "ASR",
"integrated": false,
"own_auth": true,
"stock_model": false,
"custom_model": false,
"lang": ["en", "ar", "fr", "ru"]
},
...
]
To get information about a provider with a given ID, send a GET request to https://api.inten.to/ai/speech/transcribe/PROVIDER_ID
.
curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/speech/transcribe/ai.speech.transcribe.tencent.asr_api'
The response contains a list of the metadata fields and values available for the provider:
{
"id": "ai.speech.transcribe.tencent.asr_api",
"vendor": "Tencent",
"logo": "https://inten.to/static/img/api/tmt_translate.png",
"billing": true,
"description": "Text Classification API",
"production": false,
"integrated": false,
"billable": true,
"own_auth": true,
"stock_model": true,
"custom_model": false,
"languages": { ... }
}
Will return an array of supported languages, for each language:
- iso name
- localized name (if
locale
parameter is provided); if there is no localized name,null
is returned - intento code
- client code (if the client calling the method has its own codes)
curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/speech/transcribe/languages?locale=ru'
Response:
[
{
"iso_name": "Hebrew (modern)",
"name": "иврит",
"intento_code": "he"
}
]
For a given language code (intento internal or client’s) will show full metadata:
- iso name
- localized name (if
locale
parameter is provided); if there is no localized name,null
is returned - intento code
- iso codes (ones which are applicable)
- providers’ codes (which map to this internal code)
- client code (if the client calling the method has its own codes)
curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/ai/speech/transcribe/languages/he?locale=ru'
Response:
{
"iso_name": "Hebrew (modern)",
"name": "иврит",
"intento_code": "he",
"iso_639_1_code": "he",
"iso_639_2t_code": "heb",
"iso_639_2b_code": "heb",
"iso_639_3_code": "heb",
"provider_codes": {}
}
To define your aliases to language codes, send a POST request to Intento API at https://api.inten.to/settings/languages. After 60 seconds, you can start using them.
curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/settings/languages' --data '{"aliasforen":"en"}'
Response:
{
"aliasforen": "en"
}
Settings can be retrieved using the GET request
curl -H 'apikey: YOUR_INTENTO_KEY' 'https://api.inten.to/settings/languages'
Response:
{
"aliasforen": "en"
}