3 Commits
2 changed files with 2 additions and 6 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ func buildRequest(opts Options) ([]byte, error) {
body := requestBody{ body := requestBody{
User: ttsUser{UID: opts.UID}, User: ttsUser{UID: opts.UID},
Namespace: "BidirectionalTTS", Namespace: "UnidirectionalTTS",
ReqParams: ttsReqParams{ ReqParams: ttsReqParams{
Text: opts.Text, Text: opts.Text,
Speaker: opts.Speaker, Speaker: opts.Speaker,
+1 -5
View File
@@ -105,11 +105,7 @@ func ParseStream(body io.Reader, started time.Time) (*ParsedStream, error) {
gotFirstChunk = true gotFirstChunk = true
} }
case "": case "":
// 无 event 字段的元数据行(上游 TTSSentenceStart 偶发省略 event), // 传输帧,跳过
// debug 模式打印便于排查;正常情况静默跳过。
if common.DebugLog && resp.Code == 0 {
log.Printf("volcano: 无 event 字段 code=%d sequence=%d sentence=%s data_len=%d", resp.Code, resp.Sequence, resp.SentenceText(), len(resp.Data))
}
default: default:
if common.DebugLog { if common.DebugLog {
log.Printf("volcano: 忽略未识别事件 event=%q sequence=%d sentence=%s data_len=%d", resp.Event, resp.Sequence, resp.SentenceText(), len(resp.Data)) log.Printf("volcano: 忽略未识别事件 event=%q sequence=%d sentence=%s data_len=%d", resp.Event, resp.Sequence, resp.SentenceText(), len(resp.Data))