feat: 实现本地热词管理,移除平台绑定
- 使用 corpus.context 参数直接传递热词列表(豆包文档支持)
- 移除 boosting_table_id 配置,避免绑定火山引擎控制台
- 实现 BuildHotwordsContext 函数,将本地热词转换为 JSON 格式
- 热词配置完全本地化,便于迁移到其他 ASR 平台
配置示例:
hotwords:
- 张三
- 李四
- VoicePaste
程序自动转换为豆包 API 要求的格式:
{"hotwords":[{"word":"张三"},{"word":"李四"},{"word":"VoicePaste"}]}
This commit is contained in:
@@ -6,7 +6,11 @@ doubao:
|
||||
app_id: "" # env: DOUBAO_APP_ID
|
||||
access_token: "" # env: DOUBAO_ACCESS_TOKEN
|
||||
resource_id: "volc.seedasr.sauc.duration" # env: DOUBAO_RESOURCE_ID
|
||||
boosting_table_id: "" # 可选:热词表 ID(从控制台 https://console.volcengine.com/speech/hotword 创建)
|
||||
hotwords: # 可选:本地热词列表
|
||||
# - 张三
|
||||
# - 李四
|
||||
# - VoicePaste
|
||||
# - 人工智能
|
||||
|
||||
# 服务配置
|
||||
server:
|
||||
|
||||
Reference in New Issue
Block a user