Skip to main content

Speechly On-premise

Transcribe large quantities of pre-recorded audio accurately and asynchronously on-premise or in your private cloud.

Most speech recognition solutions are SaaS products. This requires sending large amounts of audio over the Internet to be processed in the cloud. However, for services that require asynchronous processing of tens of thousands of hours of audio per day, cloud-based solutions are often too expensive or there might be privacy concerns. These difficulties are easily overcome by deploying the speech recognition software on-premise or in your private cloud.

Speechly on-premise is at its core an instance of Speechly Batch API that's deployed on-premise or in your private cloud. It uses the same proprietary speech recognition models trained on tens of thousands of hours of speech that also power Speechly cloud.

Enterprise feature

Deploying Speechly on-premise is available on Enterprise plans.

Overview

Deploying Speechly on-premise is different to deploying it in the cloud:

  1. Adapt a model to your specific domain in co-operation with the Speechly team.
  2. Deploy an instance of Speechly Batch API to your on-premise environment or private cloud.
  3. Use Speechly Batch API to transcribe pre-recorded audio files asynchronously.

Speechly Batch API example

How to use Speechly Batch API for transcribing pre-recorded audio files asynchronously. Please note that this instance of Speechly Batch API is running in our cloud and is meant for demonstration purposes only.

The intended use is to send single files to the API for transcription using the ProcessAudio method without actively waiting for the results. If you need to transcribe multiple files you just need to loop through the files and keep track of the operations. To query the status of an operation, you'll use the QueryStatus method.

The API is only meant for transcribing audio and it has no NLU features.

Requesting an authorization token

1. Start by opening the terminal and store the App ID of your Speechly application as a shell variable:

SPEECHLY_APP_ID=YOUR_APP_ID

2. Request an authorization token by calling the Login.. method:

curl -X POST https://api.speechly.com/speechly.identity.v2.IdentityAPI/Login \
-H 'Context-Type: application/json' \
-d \
'{
"deviceId": "'`uuidgen`'",
"application": {
"appId": "'$SPEECHLY_APP_ID'"
}
}'
Example response
{
"token": "YOUR_TOKEN",
"validForS": 86399,
"expiresAtEpoch": "1662131221",
"expiresAt": "2022-09-02T15:07:01.334717+00:00"
}

3. Copy the token value from the response and store it in a shell variable:

SPEECHLY_AUTH_TOKEN=YOUR_TOKEN

Sending a file for transcription

1. Queue a bucket URI for processing by calling the ProcessAudio method:

curl -X POST https://api.speechly.com/speechly.slu.v1.BatchAPI/ProcessAudio \
-H 'Context-Type: application/json' \
-H 'authorization: Bearer '$SPEECHLY_AUTH_TOKEN \
-d \
'[{
"appId": "'$SPEECHLY_APP_ID'",
"config": {
"encoding": 1,
"sampleRateHertz": 16000,
"channels": 1
},
"uri": "https://docs.speechly.com/audio/test1_en.wav"
}]'
Example response
{
"operation": {
"id": "9630d854-2345-46b7-8829-cb81c3c85f65",
"reference": "",
"status": "STATUS_QUEUED",
"languageCode": "",
"appId": "5020f75c-3b3c-4615-a8e1-880c6e501c1d",
"deviceId": "B12D2904-44CD-42D6-A73B-7A7B730D0274",
"transcripts": [],
"error": ""
}
}

2. Copy the id value from the response and store it in a shell variable:

SPEECHLY_OPERATION_ID=YOUR_ID

Checking the transcription operation result

1. Query the status of the transcription operation by calling the QueryStatus method:

curl -X POST https://api.speechly.com/speechly.slu.v1.BatchAPI/QueryStatus \
-H 'Context-Type: application/json' \
-H 'authorization: Bearer '$SPEECHLY_AUTH_TOKEN \
-d \
'{
"id": "'$SPEECHLY_OPERATION_ID'"
}'
Example response
{
"operation": {
"id": "9630d854-2345-46b7-8829-cb81c3c85f65",
"reference": "",
"status": "NOT_DONE",
"languageCode": "en",
"appId": "5020f75c-3b3c-4615-a8e1-880c6e501c1d",
"deviceId": "B12D2904-44CD-42D6-A73B-7A7B730D0274",
"transcripts": [
{
"word": "bananas",
"index": 0,
"startTime": 1020,
"endTime": 1500
},
{
"word": "apples",
"index": 1,
"startTime": 3780,
"endTime": 4860
}
],
"error": ""
}
}

2. Call the method until status goes to STATUS_DONE:

{
"operation": {
"id": "9630d854-2345-46b7-8829-cb81c3c85f65",
"reference": "",
"status": "STATUS_DONE",
"languageCode": "en",
"appId": "5020f75c-3b3c-4615-a8e1-880c6e501c1d",
"deviceId": "B12D2904-44CD-42D6-A73B-7A7B730D0274",
"transcripts": [
{
"word": "bananas",
"index": 0,
"startTime": 1020,
"endTime": 1500
},
{
"word": "apples",
"index": 1,
"startTime": 3780,
"endTime": 4860
},
//...
],
"error": ""
}
}

API reference

Speechly Batch API