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:
- Indian English
- Singapore English
- United Kingdom English
- United States English
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
Language Codes are as follows :
|United Kingdom English||en-GB|
|United States English||en-US|
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 :
|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.
- 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 email@example.com
- 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
|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 firstname.lastname@example.org or raise an issue on github.|
Here are the list of sample codes.
Support or Contact
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 email@example.com. Also if you are having trouble please raise an issue or mail to us at firstname.lastname@example.org