Files
voicepaste/config.example.yaml
imbytecat 48c8444b3f refactor: 重构配置结构,解耦热词、统一认证、移除 TLS 开关
- 新增 ASRConfig,热词从 doubao 提升为 provider 无关配置
- 移除 SecurityConfig,token 移入 ServerConfig
- 移除 tls_auto 配置项,TLS 始终启用(getUserMedia 要求 HTTPS)
- validate() 改为基于 provider 白名单验证,增加 resource_id 校验
- 简化 main.go:移除 scheme 变量和 HTTP 降级分支
- 更新 config.example.yaml 为新结构并修正环境变量前缀
2026-03-02 04:36:22 +08:00

23 lines
794 B
YAML
Raw Permalink 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: VOICEPASTE_)
# ASR 通用配置
asr:
provider: doubao # env: VOICEPASTE_ASR_PROVIDER — ASR 引擎(目前支持: doubao
hotwords: # 可选:热词列表,提升特定词汇识别准确率
# - 张三
# - 李四
# - VoicePaste
# - 人工智能
# 火山引擎豆包 ASR 凭证
doubao:
app_id: "" # env: VOICEPASTE_DOUBAO_APP_ID
access_token: "" # env: VOICEPASTE_DOUBAO_ACCESS_TOKEN
resource_id: "volc.seedasr.sauc.duration" # env: VOICEPASTE_DOUBAO_RESOURCE_ID
# 服务配置
server:
port: 8443 # env: VOICEPASTE_SERVER_PORT
token: "" # env: VOICEPASTE_SERVER_TOKEN — 留空则不需要认证;填写后访问需携带 token 参数