V-Blaze and V-Cloud Online Help

V‑Blaze API Configuration (Optional)

The V‑Blaze API is configurable by placing a webapi.cfg file in /opt/voci/state/webapi.cfg. If the file does not exist, all configuration options assume a default value. webapi.cfg contains a number of optional parameters that override default V‑Blaze API behavior. The following list explains the optional webapi.cfg parameters:

port = 17171

port — Specifies the port to listen on for V-Blaze API requests. The default value of port is 17171.

maxstreams = -1
maxconns = -1
maxconnsadd = 50

maxstreams — Specifies the maximum number of incoming audio streams the V‑Blaze API can manage. Set maxstreams to -1 for vociserver to determine the appropriate value. The default value of maxstreams is -1.

maxconns — Specifies the maximum number of simultaneous connections to the V‑Blaze API. Set maxconns to -1 to automatically determine the appropriate value by calculating the sum of the maxstreams and maxconnsadd values. The default value of maxconns is -1.

maxconnsadd — Specifies the number to add to maxstreams to calculate maxconns. maxconnsadd only applies if the value of maxconns is -1. The default value of maxconnsadd is 50.

tmpdir = /opt/voci/ramfs/webapi
tmppre = .vociweb

tmpdir — Temporary directory used by the V‑Blaze API to store intermediate results. The default directory is /opt/voci/ramfs/webapi/

tmppre — Specifies the prefix for all sub-directories within tmpdir. Each stream that requires a temporary directory creates a sub-directory with the specified prefix followed by a randomly generated string. The default value of tmppre is .vociweb. Sub-directories created within tmpdir will look similar to the following directory: /opt/voci/ramfs/webapi/.vociwebfWqYak.

accesslog = false
accesslogpath = /var/log/vociwebapi/access.log

accesslog — Enables or disables an access log that logs every connection to the V‑Blaze API. Set the value of accesslog to true to enable logging. The default value of accesslog is false.

accesslogpath — Specifies the directory path to write the access log if accesslog=true. The default value of accesslogpath is /var/log/vociwebapi/access.log.

readtimeout = 30.0
sendtimeout = 30.0
cbtimeout = 30.0
cbresptimeout = 1.0
streamconntimeout = 5.0
scrubconntimeout = 5.0
datahdr = WAVE
stoptimeout = 60.0

readtimeout — Specifies the amount of time (seconds) to read V‑Blaze API requests before timing out. The default value of readtimeout is 30.0.

sendtimeout — Specifies the amount of time (seconds) for the V‑Blaze API to send a response to requester before timing out. The default value of sendtimeout is 30.0.

cbtimeout — Specifies the amount of time (seconds) for the V‑Blaze API to send a response to a callback server before timing out. The default value of cbtimeout is 30.0.

cbresptimeout — Specifies the amount of time (seconds) for the V‑Blaze API to receive a response from a callback server before timing out. The default value of cbresptimeout is 1.0.

streamconntimeout — Specifies the amount of time (seconds) to connect to vociserver before timing out. The default value of streamconntimeout is 5.0.

scrubconntimeout — Specifies the amount of time (seconds) to receive scrubbed audio from vociserver before timing out. The default value of scrubconntimeout is 5.0.

datahdr — Configures the default functionality of the datahdr transcription parameter. The default value of datahdr in webapi.cfg is WAVE, which assumes all /transcribe requests contain audio with WAVE headers. If the audio doesn't include headers, /transcribe requests should include the datahdr transcription parameter with the value set to NONE.

Other possible values of datahdr in webapi.cfg include and FILE and NONE:

  • If the value of datahdr in webapi.cfg is FILE, the datahdr transcription parameter defaults to WAVE when audio filenames include the .wav extension. If the audio filename in a /transcribe request doesn't have the .wav extension, the value of the datahdr transcription parameter defaults to NONE.

    • Tip

      Setting datahdr in webapi.cfg to FILE will revert the functionality of the datahdr transcription parameter to how it was prior to version 3.0.0-1 of the V‑Blaze API (version 7.2.1 of the ASR engine).

  • If the value of datahdr in webapi.cfg is NONE, the datahdr transcription parameter defaults to NONE. All /transcribe requests must define the datahdr transcription parameter appropriately or include the encoding, samprate, and sampwidth transcription parameters with values set to match the corresponding audio. Refer to Adjusting for Different Types of Input for additional information.

stoptimeout — Specifies the amount of time (seconds) to wait for streams to complete after executing a vociwebapi stop command. The default value of stoptimeout is 60.0.