Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
speech_nlu_parse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵文静
speech_nlu_parse
Commits
ee5e9986
Commit
ee5e9986
authored
Jun 26, 2025
by
赵文静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加换一个故事
parent
7d7afa37
Pipeline
#5477
passed with stage
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
2 deletions
+24
-2
CHANGELOG.md
CHANGELOG.md
+1
-0
c2c.http
c2c.http
+2
-2
service/speechNlu/domain.go
service/speechNlu/domain.go
+18
-0
service/speechNlu/speech.go
service/speechNlu/speech.go
+3
-0
No files found.
CHANGELOG.md
View file @
ee5e9986
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
-
故事返回增加专辑字段
-
故事返回增加专辑字段
-
http入口新增需要AppKey校验
-
http入口新增需要AppKey校验
-
增加换一首歌
-
增加换一首歌
-
增加换个故事
## [0.0.1-beta.3] - 2025.6.19
## [0.0.1-beta.3] - 2025.6.19
### Changed
### Changed
...
...
c2c.http
View file @
ee5e9986
...
@@ -25,7 +25,7 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db
...
@@ -25,7 +25,7 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db
"ip": "14.215.222.17",
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mac": "ece154a865eb",
"mid": "11011",
"mid": "11011",
"query":"换
一首歌
",
"query":"换
个故事
",
"requestId": "123456111"
"requestId": "123456111"
}
}
...
@@ -39,7 +39,7 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db
...
@@ -39,7 +39,7 @@ X-AppKey: 391b50b5ed634fc49a3db7cfd6bc40db
"ip": "14.215.222.17",
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mac": "ece154a865eb",
"mid": "11011",
"mid": "11011",
"query":"
播放音乐
",
"query":"
换个故事
",
"requestId": "123456111"
"requestId": "123456111"
}
}
...
...
service/speechNlu/domain.go
View file @
ee5e9986
...
@@ -642,6 +642,24 @@ func fmDomain(params *model.SpeechDomainParams) []byte {
...
@@ -642,6 +642,24 @@ func fmDomain(params *model.SpeechDomainParams) []byte {
return
replyWithChat
(
error_reply
,
"doudi"
)
return
replyWithChat
(
error_reply
,
"doudi"
)
}
}
query
:=
params
.
SpeechWsResp
.
Dm
.
Input
if
params
.
CheckDmCommand
()
{
if
params
.
SpeechWsResp
.
Dm
.
Command
.
Api
!=
""
{
switch
params
.
SpeechWsResp
.
Dm
.
Command
.
Api
{
case
"DUI.MediaController.Pause"
:
return
transformGreeProtocolReply
(
query
,
"PlayControl"
,
"control_pause"
,
nil
)
case
"DUI.MediaController.Play"
:
return
transformGreeProtocolReply
(
query
,
"PlayControl"
,
"control_resume"
,
nil
)
case
"DUI.MediaController.Stop"
:
return
transformGreeProtocolReply
(
query
,
"PlayControl"
,
"control_stop"
,
nil
)
case
"DUI.MediaController.Next"
,
"DUI.MediaController.Switch"
:
return
transformGreeProtocolReply
(
query
,
"PlayControl"
,
"control_next"
,
nil
)
case
"DUI.MediaController.Prev"
:
return
transformGreeProtocolReply
(
query
,
"PlayControl"
,
"control_previous"
,
nil
)
}
}
}
res
.
Header
.
Semantic
.
Domain
=
"fm"
res
.
Header
.
Semantic
.
Domain
=
"fm"
res
.
Header
.
Semantic
.
Intent
=
"play_radio"
res
.
Header
.
Semantic
.
Intent
=
"play_radio"
res
.
Header
.
Semantic
.
SkillId
=
res
.
Header
.
Semantic
.
Domain
+
"."
+
res
.
Header
.
Semantic
.
Intent
res
.
Header
.
Semantic
.
SkillId
=
res
.
Header
.
Semantic
.
Domain
+
"."
+
res
.
Header
.
Semantic
.
Intent
...
...
service/speechNlu/speech.go
View file @
ee5e9986
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"github.com/gorilla/websocket"
"github.com/gorilla/websocket"
"log"
"speech-nlu-parse/dao"
"speech-nlu-parse/dao"
"speech-nlu-parse/global"
"speech-nlu-parse/global"
"speech-nlu-parse/model"
"speech-nlu-parse/model"
...
@@ -164,6 +165,8 @@ func receiveMessage(conn *websocket.Conn, done chan struct{}, dataChan chan<- []
...
@@ -164,6 +165,8 @@ func receiveMessage(conn *websocket.Conn, done chan struct{}, dataChan chan<- []
"time"
:
fmt
.
Sprintf
(
"%.3fs"
,
time
.
Since
(
start
)
.
Seconds
()),
"time"
:
fmt
.
Sprintf
(
"%.3fs"
,
time
.
Since
(
start
)
.
Seconds
()),
})
.
Info
(
"speech origin data"
)
})
.
Info
(
"speech origin data"
)
log
.
Println
(
string
(
message
))
//思必驰nlu回复
//思必驰nlu回复
var
resp
model
.
SpeechWsResp
var
resp
model
.
SpeechWsResp
if
err
:=
json
.
Unmarshal
(
message
,
&
resp
);
err
!=
nil
{
if
err
:=
json
.
Unmarshal
(
message
,
&
resp
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment