The Speechmatics Batch Virtual Appliance exposes a REST Speech API to enable communication between a client application and the appliance over a HTTP connection. This provides the ability to convert a media file into a text transcript, providing words, speaker, and timing information.
For the purposes of this guide the following terms are used.
Term | Description |
---|---|
Client | An application connecting to the Batch Virtual Appliance using the Transcription API. The client will provide audio containing speech, and process the transcripts received as a result. |
Management API | The REST API that allows administrators to manage the virtual appliance over port 8080. To access the documentation you can use the following URI: https://${APPLIANCE_HOST}:8080/docs/, where ${APPLIANCE_HOST} is the IP address or hostname of your appliance. |
Speech API | The REST API that allows users of the appliance to submit ASR jobs over port 8082. The endpoint http://${APPLIANCE_HOST}:8082/v1.0/ is used. This is the API that is described in this document. |
Batch Virtual Appliance | The appliance (VM) that provides ASR transcription capability. |
In order to use the REST Speech API you need access to a Batch Virtual Appliance. See the Speechmatics Virtual Appliance Installation and Admin Guide on how to install and configure the appliance.
You do not need user credentials (such as an authorization token) to use the Speech API with the Batch Virtual Appliance. Otherwise the Speech API is very similar to the Speechmatics API V2 used to transcribe speech to text on the Speechmatics Speech as a Service (SaaS) platform (available from https://asr.api.speechmatics.com/v2/).
A variety of audio formats for input are supported; there is no need to specify the audio format when it is submitted for transcription; the Batch Virtual Appliance automatically detects the format and handles it using the correct decoder. The following formats have been tested: WAV, MP3, M4A.
Note: the native formats are 16KHz or 8KHz (PCM32 LE) WAV; for the best results and performance we recommend that you submit files in that format.
The legacy V1 API that the Batch Virtual Appliance currently supports will be discontinued in a future release as we align the product with the same V2 API used by the Speechmatics SaaS: https://asr.api.speechmatics.com/v2/docs. We recommend that customers familiarise themselves with the configuration object used to specify job configurations, and only use form parameters for callback notifications. Future notices will be provided to announce the end of life of the V1 API, and provide detailed instructions on migrations to the V2 API.
The same endpoint is used for both legacy V1 and V2 APIs: http://${APPLIANCE_HOST}:8082/v1.0/
There are three things to note here:
/v1.0
is used, even when using the newer V2 features.We recommend that you use the config object to access the appliance; the older V1 API will be retired in future. For full details of the new V2 API, see the Speechmatics ASR REST API section.
Three output formats for transcription are available: json
(the default), json-v2
, and txt
. The default format (json
) is the base output format similar to the Speechmatics V1 SaaS. The json-v2
format is a richer format that fully supports new features such as channel diarization, custom dictionary and advanced punctuation. If the output format is set to txt
, the file is returned in plain text rather than JSON format.
No authentication is required in order to call the API. SSL is not currently used for this API; all calls must use HTTP on port 8082.
If you have problems making a call, ensure that you are using exactly the same URI format as shown in this document. For instance, not including the trailing '/' character on the URIs will cause a 302 redirect response to be sent – if your client does not handle redirects then this may cause problems.