Files
voicepaste/config.example.yaml
imbytecat 96d685fdf2 feat: 添加豆包 ASR 热词功能支持
- 在 config.yaml 中添加 hotwords 配置项,支持本地管理热词列表
- 实现热词解析、格式化和表名生成工具(internal/asr/hotwords.go)
- 在 ASR 连接建立时自动将热词发送给豆包(boosting_table_name 参数)
- 支持热词权重配置(1-10,默认 4),格式:"词|权重" 或 "词"
- 支持配置热重载,修改热词后新连接自动生效
- 为未来动态热词功能预留扩展接口

热词格式示例:
  hotwords:
    - 张三|8
    - VoicePaste|10
    - 人工智能|6
2026-03-02 00:55:37 +08:00

24 lines
738 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# VoicePaste config
# Environment variables override these values (prefix: none, direct mapping)
# 火山引擎豆包 ASR 配置
doubao:
app_id: "" # env: DOUBAO_APP_ID
access_token: "" # env: DOUBAO_ACCESS_TOKEN
resource_id: "volc.seedasr.sauc.duration" # env: DOUBAO_RESOURCE_ID
hotwords: # 可选:热词列表,格式 "词|权重" 或 "词"(默认权重 4
# - 张三|8
# - 李四|8
# - VoicePaste|10
# - 人工智能|6
# - 测试
# 服务配置
server:
port: 8443 # env: PORT
tls_auto: true # env: TLS_AUTO — 自动 TLS (AnyIP + 自签名降级)
# 安全配置
security:
token: "" # 留空则不需要认证;填写后访问需携带 token 参数