AmiVoice API Reference
AmiVoice API is a speech recognition Web API that converts speech into text. This reference describes the endpoints, request parameters, responses, and protocol specifications of the synchronous HTTP interface, the asynchronous HTTP interface, the WebSocket interface, and related APIs. For the HTTP APIs, OpenAPI definitions are also provided.
If you are using it for the first time, please start with Getting Started in the manual.
Types of Interfaces
There are three interfaces for speech recognition, depending on your use case. For the differences between them and criteria for choosing one, please see Types of Interfaces and How to Use Them in the manual.
| Interface | Use |
|---|---|
| Synchronous HTTP Interface | Sends a short audio file (16MB or less) via HTTP POST and receives recognition results synchronously. This is the easiest method to implement. |
| Asynchronous HTTP Interface | Registers long audio as a job and retrieves the results by polling. Intended for batch processing of call recordings and meeting recordings. Speaker diarization is also available. |
| WebSocket Interface | A bidirectional communication protocol over a WebSocket connection that allows you to receive intermediate recognition results while an utterance is in progress. Suitable for real-time captioning and voice interaction. |
In addition, the following APIs associated with speech recognition are provided.
| API | Use |
|---|---|
| API Key Issuance | Issues an API key with an expiration time and source IP address restrictions from a service ID and service password. |
| User Dictionary Registration | Imports and exports word registrations (keyword biasing) to improve recognition accuracy. |
| Word Registration Class Names | Retrieves a list of class names used for word registration. |
| Retrieving the List of Sentiment Parameters | Retrieves a list of definitions of the parameters included in sentiment analysis results. |
If you want to integrate the API into your application without using HTTP directly, the client library (Hrp/Wrp) common to each language is also available.
Authentication
An API key (service authentication key string) is required to use all APIs.
How to specify the API key
- Common to all APIs: All APIs support authentication via the HTTP request header.
Authorization: Bearer {API_KEY}
- Speech recognition requests: In addition to specifying it in the header, you can also set it via a request parameter (the
uparameter for the synchronous and asynchronous HTTP interfaces, or theauthorizationparameter of thescommand for the WebSocket interface).
How to obtain and check the API key
For details, see How to Issue API Keys in the manual.
OpenAPI Definitions
The reference pages for the HTTP APIs are generated from OpenAPI definition files. The definition files (YAML) can be downloaded below.
- Synchronous HTTP Interface
- Asynchronous HTTP Interface
- API Key Issuance
- User Dictionary Registration
- Word Registration Class Names
- Retrieving the List of Sentiment Parameters
Related Information
- Request Parameters — Parameters common to speech recognition requests
- Audio Format — Audio data formats that can be sent
- Response Codes and Messages — List of codes in case of errors
- Limitations — Limits such as audio file size and the number of simultaneous connections