Welcome to GNANI API Service
Use our API to convert your Speech to Text
Here is a quick set-up guide to integrate Gnani speech API into your system.
Gnani speech API supports multiple languages:
- Kannada
- Hindi
- Indian English
- Singapore English
- United Kingdom English
- United States English
- Tamil
- Telugu
- Gujarati
- Marathi
- Bengali
- Malayalam
- Punjabi
- Urdu
Authentication
To get access to our API(s) visit gnani.ai to register yourself.
Prequisites for setting up the API
- Token, accesskey and certificate received from gnani to your registered email id. This is mandatory to access the api.
- API URL : asr.gnani.ai
- PORT: 443
- Audio Format Supported : wav, amr-wb
- Audio Sampling Rate : 16kHz
- Number of Channels : 1
- Encoding Format : pcm16, amr-wb
Note
Language Codes are as follows :
Language | Code |
---|---|
Kannada | kn-IN |
Indian English | en-IN |
Singapore English | en-SG |
United Kingdom English | en-GB |
United States English | en-US |
Tamil | ta-IN |
Hindi | hi-IN |
Telugu | te-IN |
Gujarati | gu-IN |
Marathi | mr-IN |
Malayalam | ml-IN |
Bengali | bn-IN |
Punjabi | pa-guru-IN |
Urdu | ur-IN |
How to setup the API
- In your client grpc code, you are required to pass headers along with the audio chunks. The headers must contain token,accesskey sent to your email id, the language that you want to use, audioformat and encoding type as key value pairs. For example, the format to be followed is below :
Key | Value |
---|---|
token | eyJhbGcIIUz.iOiJIUzI1NiIs-5cC.N2N2OWxBRUsxT |
lang | en-IN |
accesskey | 7f550a9f4c44173a37664d938f1 |
audioformat | wav (if amr-wb audioformat use amr-wb) |
encoding | pcm16 (if amr-wb audioformat use amr-wb as encoding style) |
- You are required to add certficate (cert.pem) that was sent to the registered email id as part of your code.
Note
- Your request will not be authenticated if you fail to add any of these headers to your request.
- Each registered user can only send 250 grpc requests of 15 seconds audio each, beyond which the user will be blocked. Also, user is allowed to send only 5 concurrent requests per second. If you wish to opt for extension , please send a mail to hello@gnani.ai
- We currently support streaming through GRPC and audio with the following properties:
Audio Format | wav (if amr-wb audioformat use amr-wb) |
Encoding Format | pcm16 (if amr-wb audioformat use amr-wb as encoding style) |
Grpc Error codes
Code | Number | Description |
---|---|---|
OK | 0 | No error. Request is processed. |
CANCELLED | 1 | Operation was cancelled by the caller. |
PERMISSION_DENIED | 7 | The caller does not have permission to execute the specified operation. This occur if there is any issue in the header sent by the caller. Example : grpc_message:”You are not authorised to use this language” |
INTERNAL | 13 | This means that some invariants expected by the underlying system have been broken. You can fnd the custom error details sent through grpc_message. Example : grpc_message:”Token is Invalid!” , “Free quota is over!” |
UNAVAILABLE | 14 | The server is currently unavailable. Please wait for sometime and retry. If the problem persists contact hello@gnani.ai or raise an issue on github. |
Sample Code
Here are the list of sample codes.
GRPC Codes
REST Codes
Support or Contact
Disclaimer
The Speech APIs are completely proprietary and are the sole property of Gnani.ai. We reserve the right to remove users access at any point of time. Note that the free access to the APIs are purely for testing or experimental purposes, and will be available to the users for a limited amount of time, after which they will have to purchase the commercial version. Gnani.ai will immediately remove access if the user is found to be using the APIs for commercial purposes. If you wish to obtain unlimited access, you can make an enquiry on the website or write to us at hello@gnani.ai. Also if you are having trouble please raise an issue or mail to us at hello@gnani.ai