Configuration#
Load Order#
The service loads configuration in this order:
config.yamlEnvironment variables with the
AUDIO_ANALYZER__...prefix
The same config.yaml is used for both Docker and standalone runs. In Docker, config.yaml is bind-mounted into the container, so edits on the host take effect on docker compose restart.
Config File#
config.yaml: single source of truth for both standalone and container runs.
Environment Variables#
AUDIO_ANALYZER_CONFIG_PATH: alternate base config file (advanced)AUDIO_ANALYZER_ENV_FILE: optional.envfile to preload before config parsingAUDIO_ANALYZER_SERVER_HOST: host used bypython main.pyAUDIO_ANALYZER_SERVER_PORT: port used bypython main.py
Targeted config overrides use the AUDIO_ANALYZER__... prefix.
Example:
AUDIO_ANALYZER__MODELS__ASR__DEVICE=GPU python main.py
Key Sections#
models.asr: backend provider, model name, device, export precision, decoding settingsaudio_preprocessing: chunk size, silence detection, denoise settings, chunk directoryaudio_util: max file size, allowed extensions, upload read chunk sizeminio: external MinIO endpoint/credentials, used only byPOST /transcriptionswhen a MinIO source is supplied instead of a direct file uploadpipeline.delete_chunks_after_use: whether temporary chunks are removed after processingsentiment: enablement, provider, model, device, aggregation settings
Common Values#
models.asr.provider:openai|openvino|whispercppmodels.asr.device:CPU|GPU|NPUmodels.asr.weight_format: OpenVINO export precision such asint8,fp16, ornull; forwhispercpp, quantization such asq5,q5_0,q5_1,q8,q8_0,int5,int8, ornullsentiment.enabled:trueorfalsesentiment.provider:openvinoorpytorchsentiment.weight_format: optional OpenVINO export precision such asint8,fp16, ornull
ASR Provider Notes#
openai: usesopenai-whisperand downloads PyTorch Whisper weights on first use.openvino: exports the configured Whisper model to OpenVINO IR undermodels/openvino/...and supportsCPU,GPU, andNPU(when available and correctly configured).whispercpp: downloads the matching whisper.cppggmlmodel undermodels/whispercpp/...and runs onCPUonly.
ASR Provider/Device Matrix#
openai:CPUonlywhispercpp:CPUonlyopenvino:CPU|GPU|NPU
If an invalid provider/device combination is configured, startup fails with a clear validation error.
OpenVINO NPU Configuration#
Use this config structure:
models:
asr:
provider: openvino
device: NPU
For Docker Compose, ensure:
ACCEL_MOUNT_PATHpoints to the host NPU node (host path is machine-specific; for example/dev/accel/accel0on many Meteor Lake systems)ZE_ENABLE_ALT_DRIVERS=libze_intel_npu.soremains set in the container environment
Path mapping semantics:
Host path (configurable):
ACCEL_MOUNT_PATH=<host device node>Container path (fixed):
/dev/accel/accel0
Compose mapping in docker-compose.yml:
devices:
- ${ACCEL_MOUNT_PATH:-/dev/null}:/dev/accel/accel0
This keeps CPU/GPU usage independent of NPU availability:
If
ACCEL_MOUNT_PATHis set, Compose maps that host device into/dev/accel/accel0.If
ACCEL_MOUNT_PATHis not set, Compose maps/dev/nullto/dev/accel/accel0so CPU/GPU workflows still run without a host NPU device.
Verify host node availability and resolved mapping:
ls -l /dev/accel/
docker compose config
Validation performed by the service at startup:
Requested provider/device from config is valid.
Requested OpenVINO device is visible in
ov.Core().available_devicesinside the running environment.OpenVINO can compile a probe model on the requested device.
For
NPU, initialization of the NPU compiler/runtime stack succeeds.
Provider-specific models.asr fields:
weight_format: used byopenvinofor IR export precision and bywhispercppfor model quantization.beam_size,best_of,threads,word_timestamps: used only bywhispercpp.
MinIO (External Dependency)#
MinIO is not bundled with Audio Analyzer. It is not defined as a service
in docker-compose.yml and is not started, managed, or shipped by this
component. When a caller invokes POST /transcriptions with a MinIO source
(minio_bucket/video_id/video_name) instead of uploading a file directly,
the service downloads that single source audio/video object from the bucket,
transcribes it locally, and uploads the resulting transcript back into the
same bucket. Only the source object and the final transcript object move
through MinIO — internal ASR chunking (audio_preprocessing.chunk_duration_sec)
happens entirely on local/container storage and is never written to MinIO.
See the API Reference for full request/response
details.
To use that path, run MinIO as a separate, externally managed service (your own container, Compose stack, or existing deployment) and provide its endpoint/credentials to Audio Analyzer through configuration. Audio Analyzer never starts or bundles MinIO itself.
Config keys (config.yaml):
minio:
endpoint: "" # e.g. "minio-server:9000"; empty disables MinIO support
access_key: ""
secret_key: ""
secure: false
Equivalent environment variable overrides (targeted AUDIO_ANALYZER__...
overrides, per Load Order):
AUDIO_ANALYZER__MINIO__ENDPOINTAUDIO_ANALYZER__MINIO__ACCESS_KEYAUDIO_ANALYZER__MINIO__SECRET_KEYAUDIO_ANALYZER__MINIO__SECURE
Example (do not commit real credentials; use a local .env file or your
secret-management mechanism):
AUDIO_ANALYZER__MINIO__ENDPOINT=minio-server:9000
AUDIO_ANALYZER__MINIO__ACCESS_KEY=<your-access-key>
AUDIO_ANALYZER__MINIO__SECRET_KEY=<your-secret-key>
AUDIO_ANALYZER__MINIO__SECURE=false
This form applies directly to standalone runs (python main.py). For Docker
Compose, docker-compose.yml only forwards the environment variables it
explicitly lists, so setting these in .env alone does not reach the
container — see
MinIO (External Object Storage)
for the Compose-specific options (editing config.yaml directly, or adding
these variables under services.audio-analyzer.environment).
If minio.endpoint is left empty, MinIO support is disabled and a MinIO
source request to POST /transcriptions returns 503.
The Audio Analyzer container must be able to reach the configured MinIO
endpoint over the network (for example, the same Docker network or a
routable host/port). For container-to-container setups, verify and
troubleshoot connectivity as described in
Run With Docker Compose.