Repository navigation
Expand file tree
/
Copy pathapplication-example.toml
More file actions
362 lines (288 loc) · 9.8 KB
/
Copy pathapplication-example.toml
File metadata and controls
362 lines (288 loc) · 9.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
### vanling Configuration
###
### THIS FILE IS GENERATED. CHANGES/CONTRIBUTIONS IN THE REPO WILL BE
### OVERWRITTEN!
###
### You should rename this file before configuring your server. Changes to
### documentation and defaults can be contributed in source code at
### src/config/mod.rs. This file is generated when building.
###
### Any values pre-populated are the default values for said config option.
###
### At the minimum, you MUST edit all the config options to your environment
### that say "YOU NEED TO EDIT THIS".
###
[global]
# Server hostname displayed to clients.
#
#server_name = "localhost.localdomain"
# Base data directory for model files. All model paths are relative to this.
#
#data_dir = "data"
# The default address (IPv4 or IPv6) will listen on.
#
# If you are using Docker or a container NAT networking setup, this must
# be "0.0.0.0".
#
#
#address = "127.0.0.1"
# The port(s) will listen on.
#
# If you are using Docker, don't change this, you'll need to map an
# external port to this.
#
#port = 3000
# Database connection URL.
#
#database_url = "sqlite://db.sqlite?mode=rwc"
# Secret key for signing JWT access tokens.
#
#auth_access_token_secret = "QLjJTeVblAlM47de"
# Access token expiry duration in seconds.
#
#auth_access_token_expires_in = 28800
# Secret key for signing JWT refresh tokens.
#
#auth_refresh_token_secret = "N8lI0uitNzJl6vYK"
# Refresh token expiry duration in seconds.
#
#auth_refresh_token_expires_in = 15897600
# JWT audience claim.
#
#auth_audience = "audience"
# JWT issuer claim.
#
#auth_issuer = "issuer"
# OAuth 2.0 client ID.
#
#auth_client_id = "d1aicsr57dijo7h963ig"
# OAuth 2.0 client secret.
#
#auth_client_secret = "ujTgh2lEQYy0PXhK"
# Named rate-limit resources matched by regex route patterns.
#
# Each entry is a table with:
# - `name`: unique resource name, surfaced via `x-ratelimit-resource`.
# - `limit` / `window_secs`: quota within the window.
# - `key_by`: `"ip"` (per peer address) or `"principal"` (per user).
# - `paths`: regex patterns against the request path; the FIRST resource
# with a matching pattern owns the request, so list order is priority
# (specific resources must precede broad ones such as `^/api/`).
# - `count`: optional, default `true`; `false` never records requests.
#
# Invalid names, duplicate patterns and unparseable regexes abort startup.
#
#security_rate_limit_resources = [{ name = "auth", limit = 20, window_secs = 900, key_by = "ip", paths = ["^/api/auth/"] }, { name = "ota", limit = 30, window_secs = 60, key_by = "ip", paths = ["^/api/ota"] }, { name = "mcp", limit = 5000, window_secs = 3600, key_by = "principal", paths = ["^/mcp"] }, { name = "core", limit = 5000, window_secs = 3600, key_by = "principal", paths = ["^/api/"] }]
# Per-account login failures allowed within the lockout window.
#
#security_login_fail_limit = 5
# Login failure lockout window in seconds.
#
#security_login_fail_window_secs = 900
# Security event retention in days before the cleanup loop deletes them.
#
#security_event_retention_days = 30
# Security retention cleanup interval in seconds.
#
#security_cleanup_interval_secs = 21600
# Whether every request matching `security_api_access_log_path_prefixes`
# is persisted to the access log table.
#
#security_api_access_log_enabled = true
# API access log retention in days before the cleanup loop deletes them.
#
#security_api_access_log_retention_days = 30
# Path prefixes whose requests are persisted to the access log table.
#
#security_api_access_log_path_prefixes = ["/api/", "/mcp"]
# WebSocket URL scheme (ws or wss).
#
#ws_schema = "ws"
# Available values: void, earshot.
#
# Voice Activity Detection model to use.
#
#vad_model = "earshot"
# Path to the VAD model file or directory.
#
#vad_path = "auto-derived from model+variant"
# Variant of the VAD model to load.
#
#vad_variant = "auto-detected"
# Number of threads for VAD inference.
#
#vad_num_threads = 4
# VAD detection threshold (0.0–1.0). Higher = fewer false positives, more false negatives.
#
#vad_threshold = 0.5
# VAD deactivation threshold for hysteresis. Must be < vad_threshold.
# Speech stops when score drops below this value during active speech.
#
#vad_deactivation_threshold = 0.35
# Minimum silence duration in ms before VAD considers speech ended.
#
#vad_min_silence_duration = 550
# Minimum continuous speech duration in ms before VAD triggers is_speech.
# Prevents short noise bursts from being classified as speech.
#
#vad_min_speech_duration = 300
# Available values: mute, matcha_tts.
#
# Text-to-Speech model to use.
#
#tts_model = "matcha_tts"
# Path to the TTS model file or directory.
#
#tts_path = "auto-derived from model manifest"
# Variant override for the active TTS model.
#
# When not set, the default variant is read from the embedded model manifest.
# This is useful for switching between different model variants without
# changing the model type.
#
#tts_variant = "auto-detected from model manifest"
# Variant override for the TTS reference audio.
#
#tts_reference_variant = "auto-detected from model manifest"
# Override the auto-derived prompt text from manifest.
#
#tts_reference_prompt_text = "auto-derived"
# Override the auto-derived prompt wav path from manifest.
#
#tts_reference_prompt_wav_path = "auto-derived"
# TTS model-specific options as a JSON object.
#
# For MatchaTTS:
# - num_threads: inference threads (default 2)
# - noise_scale: generation noise parameter (default 0.667)
# - length_scale: speed scaling (default auto-detected)
# - speed: playback speed (default 1.0)
# - debug: debug output (default false)
# - dict_dir: pronunciation dictionary directory
# - data_dir: espeak-ng data directory
# - acoustic_model: onnx path (auto-discovered)
# - vocoder: onnx path (auto-discovered)
#
#tts_options = {}
# Available values: xasr, void.
#
# Automatic Speech Recognition model to use.
#
#asr_model = "x_asr"
# Path to the ASR model file or directory.
#
#asr_path = "auto-derived from model+variant"
# Variant of the ASR model to load.
#
#asr_variant = "auto-detected from model manifest"
# Available values: local_qwen3, local_echo, remote_open_ai_compatible.
#
# LLM provider to use.
#
#llm_provider = "local_qwen3"
# Path to the local LLM model file or directory.
# Only used with local providers (local_qwen3, local_echo).
#
#llm_path = "auto-derived from model+variant"
# Model variant for the local LLM.
# Only used with local providers (local_qwen3, local_echo).
#
#llm_variant =
# Base URL for the remote OpenAI-compatible API.
# Only used with remote_open_ai_compatible provider.
#
#llm_api_url = "http://localhost:11434/v1/"
# API key for remote OpenAI-compatible providers.
# Leave empty for local-only setups.
#
#llm_api_key =
# Remote model identifier sent to the API.
# Only used with remote_open_ai_compatible provider.
#
#llm_model = "qwen3.5:4b"
# Output audio sample rate in Hz.
#
#audio_output_sample_rate = 16000
# Number of output audio channels.
#
#audio_output_channel = 1
# Output audio frame duration in milliseconds.
#
#audio_output_frame_duration = 20
# Time in ms before closing connection when no activity detected.
#
#session_close_connection_no_activity_time = 30000
# Silence timeout in ms during active voice session.
#
#session_silence_voice_timeout = 1200
# Default system prompt (persona) injected into each Ling instance.
#
#ling_system_prompt = "你是一个知识丰富的语音对话助手,用亲切自然的语气与用户交流。回答必须有实质内容,直接提供有价值的信息。避免只问不答——先给出信息,再视情况补充。必须使用中文口述。禁止使用 Markdown、emoji、特殊符号、HTML 标签、英文标点符号。必须使用中文标点符号(。!?,;:)分隔句子,每句话末尾必须带句号、问号或感叹号。禁止使用换行符代替标点来分隔内容。所有数字必须用中文书写(二十三而不是23),日期用中文(七月二十四日)。如果用户输入为空,请求用户描述清楚。",
# Maximum number of prompt tokens.
#
#session_max_prompt_len = 3000
# Barge-in lockout duration in ms. After TTS starts or stops,
# barge-in is suppressed for this duration to prevent echo-triggered interruptions.
#
#session_barge_in_lockout_ms = 250
# List of MCP server configurations. Each entry uses one of three auth modes:
# - `self_signed = true`: server signs its own token for the local `/mcp`.
# - `token`: static token for external servers. It is a bare token; the
# Streamable HTTP transport adds the `Bearer ` prefix itself.
# - neither: no Authorization header is sent (open server).
#
#mcp_server_list = [{ uri = "http://127.0.0.1:3000/mcp", self_signed = true }]
# Enable Matrix messaging integration.
#
#matrix_enable = false
# Matrix client application name.
#
#matrix_client_name = "vanling"
# Matrix homeserver URL.
#
#matrix_homeserver = "http://127.0.0.1:8008"
# Matrix client user ID.
#
#matrix_client_username = "@vanling:localhost.localdomain"
# Matrix client password.
#
#matrix_client_password =
# Enable console logging
#
#log_console_enabled = true
# Console log level (trace, debug, info, warn, error)
#
#log_console_level = "info"
# Console log format (text, json, compact, pretty)
#
#log_console_format = "text"
# Enable file logging
#
#log_file_enabled = false
# File log level (trace, debug, info, warn, error)
#
#log_file_level = "info"
# File log format (text, json, compact, pretty)
#
#log_file_format = "json"
# File log directory
#
#log_file_directory = "./logs"
# File log name prefix
#
#log_file_name = "server"
# Max log files to retain
#
#log_file_max_files = 10
# Log rotation (daily, hourly, never)
#
#log_file_rotation = "daily"
# Enable tracing-flame profiling output
#
#log_flame_enabled = false
# Flame graph output directory
#
#log_flame_directory = "./flame"
# Enable tokio-console
#
#log_tokio_console_enabled = false