Global Configuration (config.yaml)
OneASR is configured via a single central config.yaml file located in the root of the project directory.
Complete Reference Configuration
yaml
# OneASR Unified Configuration
# Master API Key for endpoint authentication
api_key: sk-oneasr-v1-p_L3kXm9QZ8sT2vA4wE7rY1u
# Global ASR Toolkit & Audio Preprocessing
ASR-Toolkit:
vad:
model: "silero_vad" # VAD Engine: silero_vad
threshold: 0.5 # Probability threshold (0.0 - 1.0)
min_speech_duration_ms: 250 # Minimum speech duration
min_silence_duration_ms: 300 # Silence duration to trigger split
padding_ms: 100 # Audio buffer padding
chunking:
target_chunk_duration: 6.0 # Ideal subtitle chunk length (seconds)
max_chunk_duration: 8.0 # Hard ceiling for long audio split
min_pause_duration: 0.4 # Natural pause threshold
min_sentence_duration: 2.0 # Min semantic duration
post_process:
remove_repeats: true # Strip hallucinated repetitions
normalize_text: true # Format punctuation and spacing
# ASR Providers & Engine Loading
ASR-Providers:
# 1. Realtime Streaming Engine (Sherpa-ONNX Zipformer)
xasr:
enable: true
engine: xasr
load:
model_name: xasr-zh-en
tokens_path: models/chunk-160ms-model/tokens.txt
encoder_path: models/chunk-160ms-model/encoder-160ms.onnx
decoder_path: models/chunk-160ms-model/decoder-160ms.onnx
joiner_path: models/chunk-160ms-model/joiner-160ms.onnx
provider: cpu
sample_rate: 16000
decoding_method: greedy_search
properties:
categories:
- RealtimeASR
languages: zh, en
# 2. Faster-Whisper File Transcription
faster-whisper:
enable: true
engine: faster-whisper
load:
model_name: medium
model_path: models/faster-whisper-medium
device: cuda # or cpu
compute_type: float16 # or int8
properties:
categories:
- FileASR
languages: zh, en, ja, ko, fr, de, es, it, ru, ptEnvironment Variable Overrides
Any configuration key can be overridden with environment variables during container launch:
ONEASR_API_KEY: Overridesapi_keyONEASR_PORT: Server listening port (default:8000)ONEASR_WORKERS: Number of Uvicorn worker processes (default:1)
