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

@@ -111,9 +111,8 @@ type RequestMeta struct {
ShowUtterances bool `json:"show_utterances"`
ResultType string `json:"result_type,omitempty"`
EnableNonstream bool `json:"enable_nonstream,omitempty"`
EndWindowSize int `json:"end_window_size,omitempty"`
BoostingTableID string `json:"boosting_table_id,omitempty"` // 热词表 ID
BoostingTableName string `json:"boosting_table_name,omitempty"` // 热词表名称
EndWindowSize int `json:"end_window_size,omitempty"`
BoostingTableID string `json:"boosting_table_id,omitempty"` // 热词表 ID
}
// EncodeFullClientRequest builds the binary message for the initial handshake.
// nostream mode: header(4) + payload_size(4) + gzip(json)