Repository navigation
Expand file tree
/
Copy pathconfig.example.toml
More file actions
121 lines (108 loc) · 3.17 KB
/
Copy pathconfig.example.toml
File metadata and controls
121 lines (108 loc) · 3.17 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
[runtime]
home_dir = "~/.vox"
wait_for_lock = true
lock_wait_timeout_sec = 1800
tts_small_base_max_parallel = 2
dictation_log_max_bytes = 5242880
dictation_log_backups = 3
[hf]
# 下载端点优先顺序:镜像在前,官方在后
endpoints = ["https://hf-mirror.com", "https://huggingface.co"]
# 可选:显式指定 HF 缓存目录
# cache_dir = "~/.cache/huggingface/hub"
[asr]
# auto | qwen-asr-1.7b-8bit | qwen-asr-1.7b-4bit | qwen-asr-0.6b-8bit | qwen-asr-0.6b-4bit
default_model = "auto"
memory_threshold_gb = 32
[tts]
default_model = "qwen-tts-0.6b-base-8bit"
default_custom_model = "qwen-tts-0.6b-customvoice-8bit"
default_design_model = "qwen-tts-0.6b-voicedesign-8bit"
[dictation.transforms]
# 识别最终结果的规则后处理
fullwidth_to_halfwidth = false
space_around_punct = false
space_between_cjk = false
strip_trailing_punctuation = false
[dictation]
# 当前激活的 LLM 配置集;UI 里切换的就是这个
llm_active_profile = "local-mlx"
[dictation.llm_profiles."local-mlx"]
# 本地 MLX 推荐:Qwen2.5-1.5B + spoken_clean
enabled = true
provider = "local-mlx"
base_url = "http://127.0.0.1:18080/v1"
model = "mlx-community/Qwen2.5-1.5B-Instruct-4bit"
# 对本地 loopback / local-mlx,留空也可以
api_key_env = ""
timeout_sec = 4.0
stream = true
temperature = 0.0
max_tokens = 96
prompt_preset = "spoken_clean"
[dictation.llm_profiles."aliyun"]
enabled = true
provider = "dashscope"
base_url = "https://dashscope.aliyuncs.com/compatible-mode/v1"
model = "qwen-turbo-latest"
api_key_env = "OPENAI_API_KEY"
timeout_sec = 4.0
stream = true
temperature = 0.0
max_tokens = 96
prompt_preset = "deep_clean"
# 只要兼容 OpenAI Chat Completions,都可以再加新的 profile:
# OpenAI: https://api.openai.com/v1
# OpenRouter: https://openrouter.ai/api/v1
# Moonshot: https://api.moonshot.cn/v1
# SiliconFlow: https://api.siliconflow.cn/v1
# 也可以填你自己的 LiteLLM / vLLM / OneAPI 网关
#
# [dictation.llm_profiles."my-provider"]
# enabled = true
# provider = "openai-compatible"
# base_url = "https://api.openai.com/v1"
# model = "gpt-4o-mini"
# api_key_env = "OPENAI_API_KEY"
# timeout_sec = 8.0
# stream = true
# temperature = 0.0
# max_tokens = 96
# prompt_preset = "default"
#
# # 留空时继承预设;需要单独微调时再显式覆盖
# system_prompt = """
# 自定义 system prompt
# """
# user_prompt_template = """
# {hints_block}
# {hotwords_block}
# {context_block}
# 语言: {language}
# 待处理文本:
# <<<
# {text}
# >>>
# """
[dictation.context]
# 焦点上下文采集;当前主要用于给 dictation LLM 润色提供额外上下文
enabled = false
# 注入 prompt 的上下文片段最大字符数;超出时保留尾部
max_chars = 1200
# 从按下录音开始计算的总采集预算;超过后不会继续阻塞最终输出
capture_budget_ms = 1200
[dictation.hotwords]
enabled = false
rewrite_aliases = true
case_sensitive = false
[[dictation.hotwords.entries]]
value = "潮汕"
aliases = ["潮上"]
[[dictation.hotwords.entries]]
value = "Codex CLI"
aliases = ["ColdX CLI", "CodeX CLI", "ColdX"]
[dictation.hints]
enabled = false
items = [
"说话人前后鼻音不分,优先纠正 an/ang、en/eng、in/ing 等常见混淆。",
]