Skip to content

Commit

Permalink
feat: 增加语音识别结果回复
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwang committed Mar 17, 2023
1 parent a2f0c77 commit 9a64d20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/handlers/event_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package handlers
import (
"context"
"fmt"
larkim "github.com/larksuite/oapi-sdk-go/v3/service/im/v1"
"os"
"start-feishubot/initialization"
"start-feishubot/services"
"start-feishubot/services/openai"
"start-feishubot/utils"
"start-feishubot/utils/audio"

larkim "github.com/larksuite/oapi-sdk-go/v3/service/im/v1"
)

type MsgInfo struct {
Expand Down Expand Up @@ -279,6 +280,8 @@ func (*AudioAction) Execute(a *ActionInfo) bool {
sendMsg(*a.ctx, fmt.Sprintf("🤖️:语音转换失败,请稍后再试~\n错误信息: %v", err), a.info.msgId)
return false
}

replyMsg(*a.ctx, fmt.Sprintf("🤖️:识别结果:\n\n %s", text), a.info.msgId)
//fmt.Println("text: ", text)
a.info.qParsed = text
return true
Expand Down

0 comments on commit 9a64d20

Please sign in to comment.