/
/
/
Ansible role that deployes services on my runner machine
1# ==============================================================================
2# DND-STT (Speaches) ENVIRONMENT
3# OpenAI-compatible speech-to-text used by the D&D session agent.
4#
5# Settings are pydantic BaseSettings; nested fields use a __ delimiter
6# (WHISPER__COMPUTE_TYPE -> whisper.compute_type).
7# ==============================================================================
8
9# Model is selected per request (OpenAI-style), not globally.
10#
11# NOTE: this setting is accepted but does NOT fetch the weights in 0.8.3 - the
12# cache stays empty and /v1/models returns 500 until something downloads them.
13# The deploy therefore pulls the model explicitly via POST /v1/models/<id>.
14# Kept because it is the documented intent and may start working upstream.
15PRELOAD_MODELS=["{{ dnd_stt_model }}"]
16
17# int8_float16 keeps distil-large-v3 near 1.5 GB on the 12 GB card, which
18# matters because this shares the GPU with the cue-selection model during a
19# session. Raise to float16 if accuracy proves insufficient.
20WHISPER__COMPUTE_TYPE={{ dnd_stt_compute_type }}
21WHISPER__INFERENCE_DEVICE={{ 'cuda' if gpu_enabled else 'cpu' }}
22
23# Seconds an idle model stays resident; -1 never unloads. Sessions have long
24# gaps between speech, so unloading would add a cold load to every re-entry.
25STT_MODEL_TTL={{ dnd_stt_model_ttl }}
26
27UVICORN_HOST=0.0.0.0
28UVICORN_PORT=8000
29
30# Gradio UI is unnecessary for an API-only service and costs memory.
31ENABLE_UI=false
32LOG_LEVEL={{ dnd_stt_log_level }}
33