fix(asr): 一句话识别 sourceType=1 时支持显式 voiceFormat(test-0415 反馈3-1 续修)
- 老逻辑:req.setVoiceFormat(getVoiceFormat(request.getUrl())) sourceType=1 时 url 为空 → 默认 wav → 把 mp3 数据当 wav 给腾讯云 → "Audio decoding failed" - 修复:TencentAsrRequest 新增 voiceFormat 字段(前端已透传 'mp3') ToolTencentAsrServiceImpl.sentenceRecognition 优先使用 request.getVoiceFormat(), 缺省回落到 getVoiceFormat(url) 兼容老调用 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -50,4 +50,7 @@ public class TencentAsrRequest {
|
||||
|
||||
@ApiModelProperty(value = "是否显示词级别时间戳")
|
||||
private Boolean wordInfo;
|
||||
|
||||
@ApiModelProperty(value = "音频格式(sourceType=1 时必传:mp3/wav/m4a/aac/pcm/silk)", example = "mp3")
|
||||
private String voiceFormat;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user