Getting started

This section contains basic information for getting started with the V‑Blaze REST API.

All examples shown in this document use cURL , a command line utility that sends HTTP client requests. The cURL application is freely available for Linux, Windows, and macOS operating systems.

Submitting transcription requests

A transcription session is initiated by issuing an HTTP POST to the appropriate URL. The following is an example of an appropriate URL:

http://vblaze_name:17171/transcribe

Where vblaze_name is the name of your V‑Blaze server.

Note: The V‑Blaze REST API service monitors port 17171 by default, but this can be changed if necessary. If transmission encryption is required you can use HTTPS rather than HTTP.

Single-part POST

Important: This method requires V‑Blaze version 7.2 or greater.

Query the V-Blaze API using a simple, single-part POST:

curl -s -X POST \
-T 'sample1.wav' \
'vblaze_name:17171/transcribe'

Parameters may be included in the query string or as headers. For the sake of simplicity, parameters should always be placed in the query string. Headers should be reserved for heavy parameters, such as JSON-encoded data, or parameters that are inconvenient to place in the query string.

curl -s -X POST \
-T 'sample1.wav' \
'vblaze_name:17171/transcribe?model=eng1:callcenter&output=text'
curl -s -X POST \
-T 'sample1.wav' \
-H 'X-Voci-Model: eng1:callcenter' \
-H 'X-Voci-Output: text' \
'vblaze_name:17171/transcribe'

These examples transcribe a file named sample1.wav using a V‑Blaze REST API instance running on a server named vblaze_name; both parameters can be changed without altering the function of any commands.

Tip: This method is recommended for best performance.

Single-part PUT

Important: This method requires V‑Blaze version 7.3 or greater.

Query the V-Blaze API using a simple, single-part put:

curl -s -X PUT \
-T 'sample1.wav' \
'vblaze_name:17171/transcribe'

Parameters may be included in the query string or as headers. For the sake of simplicity, parameters should always be placed in the query string. Headers should be reserved for heavy parameters, such as JSON-encoded data, or parameters that are inconvenient to place in the query string.

curl -s -X PUT \
-T 'sample1.wav' \
'vblaze_name:17171/transcribe?model=eng1:callcenter&output=text'
curl -s -X PUT \
-T 'sample1.wav' \
-H 'X-Voci-Model: eng1:callcenter' \
-H 'X-Voci-Output: text' \
'vblaze_name:17171/transcribe'

These examples transcribe a file named sample1.wav using a V‑Blaze REST API instance running on a server named vblaze_name; both parameters can be changed without altering the function of any commands.

Tip: This method is recommended for best performance.

Receiving transcription results

The transcript is returned in the HTTP response to a POST call to the /transcribe method by default. Optionally, transcripts can be returned via HTTP POST; this method is known as a "callback" and is described in Receiving results via callback.

Important: The file field must be the last field specified in the request, as shown in the following example.

Example HTTP response

Description:

Transcribe a short audio file and return text in the HTTP response.

Command:

curl -F output=text \
     -F model=eng1:callcenter \
     -F file=@sample7.wav \
     http://vblaze-name:17171/transcribe

For more information on the output , model , and file parameters, refer to Common tags.

Result:


    Thank you for calling center point energy technical support. I understand you need to report a gas leak and I have your name please. My name is Joe. What is your address or account number my address and then one Martin Houston, Texas is there. Anyone inside the house? I know everyone is out of the house. I notice the strange smell when I got home and I called you I am sending and gas technician to your home to fix the problem. Could you give me a good number to reach you at. You can call 28195345. Thank you, please be safe and wait for the technician to arrive call us back if anything changes. Thank you, bye. Good bye and thank you for calling center point energy.