refactor: 简化热词配置为豆包控制台 ID

- 移除本地热词列表配置,改为直接使用豆包控制台的热词表 ID
- 删除 internal/asr/hotwords.go(不再需要本地解析)
- 简化 client.go 逻辑,直接传递 boosting_table_id
- 移除 protocol.go 中的 boosting_table_name 字段
- 更新配置示例,添加控制台链接说明

使用方法:
1. 在豆包控制台创建热词表:https://console.volcengine.com/speech/hotword
2. 复制热词表 ID 到 config.yaml 的 boosting_table_id 字段
This commit is contained in:
2026-03-02 01:16:34 +08:00
parent 96d685fdf2
commit 4120d6451e
6 changed files with 24 additions and 152 deletions

View File

@@ -6,10 +6,10 @@ import (
// DoubaoConfig holds 火山引擎豆包 ASR credentials.
type DoubaoConfig struct {
AppID string `yaml:"app_id"`
AccessToken string `yaml:"access_token"`
ResourceID string `yaml:"resource_id"`
Hotwords []string `yaml:"hotwords"` // 热词列表,格式 "词|权重" 或 "词"
AppID string `yaml:"app_id"`
AccessToken string `yaml:"access_token"`
ResourceID string `yaml:"resource_id"`
BoostingTableID string `yaml:"boosting_table_id"` // 热词表 ID从控制台创建
}
// SecurityConfig holds authentication settings.