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
c3e78176
Commit
c3e78176
authored
Jun 20, 2025
by
赵文静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加黄历查询
parent
b6f8f363
Pipeline
#5455
passed with stage
in 0 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
6 deletions
+27
-6
CHANGELOG.md
CHANGELOG.md
+1
-0
c2c.http
c2c.http
+4
-4
service/speechNlu/constant.go
service/speechNlu/constant.go
+2
-2
service/speechNlu/domain.go
service/speechNlu/domain.go
+19
-0
service/speechNlu/register.go
service/speechNlu/register.go
+1
-0
No files found.
CHANGELOG.md
View file @
c3e78176
...
...
@@ -3,6 +3,7 @@
### Changed
-
增加音乐兜底
-
增加星座运势
-
增加黄历查询
## [0.0.1-beta.3] - 2025.6.6-6.14
### Changed
...
...
c2c.http
View file @
c3e78176
...
...
@@ -5,7 +5,7 @@ Content-Type: application/json
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mid": "11011",
"query":"
播放时政热点
",
"query":"
水瓶座今年的运势咋样
",
"requestId": "123456111"
}
...
...
@@ -17,7 +17,7 @@ Content-Type: application/json
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mid": "11011",
"query":"
r
",
"query":"
二十四节气
",
"requestId": "123456111"
}
...
...
@@ -38,7 +38,7 @@ Content-Type: application/json
"trafficParameter": "mode=childxxx;macWifi=28b77c218ed1;mid=10f05;vender=7e000025;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;"
},
"nluRet": {
"text": "
我想听故事
"
"text": "
骨头属于什么垃圾
"
},
"postProc": {}
}
...
...
@@ -79,7 +79,7 @@ Content-Type: application/json
"trafficParameter": "mode=childxx;macWifi=ece154a73d38;mid=11011;macVoice=testyuntiancloud;ver=3.0;scenario=smarthome;filterName=nlu;req_nlu_length=1;returnType=json;fullDuplex=true;appendLength=1;additionalService=geli_nlu2;version=0.5;filterUrl=https://testnlu.gree.com:443/semantic/unisoundc2c/querys;"
},
"nluRet": {
"text": "
双鱼座和什么星座最配
"
"text": "
哪天适合结婚
"
},
"postProc": {}
}
...
...
service/speechNlu/constant.go
View file @
c3e78176
...
...
@@ -93,9 +93,9 @@ const (
WASTESORTING
=
"垃圾分类"
FOOD
=
"食物营养查询"
ASTRO_FORTUNE
=
"星座运势"
ALMANAC
=
"黄历查询"
SOUND
=
"sound"
ALMANAC
=
"almanac"
GENERALQA
=
"general_question_answering"
COMMONQA
=
"common_qa"
...
...
service/speechNlu/domain.go
View file @
c3e78176
...
...
@@ -1092,6 +1092,25 @@ func astroFortuneDomain(params *model.SpeechDomainParams) []byte {
return
Marshal
(
params
,
res
)
}
func
almanacDomain
(
params
*
model
.
SpeechDomainParams
)
[]
byte
{
res
,
err
:=
baseParse
(
params
)
if
err
!=
nil
{
global
.
Logger
.
WithFields
(
logger
.
Fields
{
"requestId"
:
params
.
RequestId
,
"mac"
:
params
.
Mac
,
"mid"
:
params
.
Mid
,
"vender"
:
params
.
MidType
,
})
.
Error
(
"almanacDomain baseParse error."
)
return
replyWithChat
(
error_reply
,
"doudi"
)
}
res
.
Header
.
Semantic
.
Domain
=
"almanac"
res
.
Header
.
Semantic
.
Intent
=
"search_almanactime"
res
.
Header
.
Semantic
.
SkillId
=
res
.
Header
.
Semantic
.
Domain
+
"."
+
res
.
Header
.
Semantic
.
Intent
return
Marshal
(
params
,
res
)
}
func
Marshal
(
params
*
model
.
SpeechDomainParams
,
res
*
model
.
ResponseBody
)
[]
byte
{
if
res
.
Header
.
Semantic
.
Domain
==
""
{
res
.
Header
.
Semantic
.
Domain
=
"chat"
...
...
service/speechNlu/register.go
View file @
c3e78176
...
...
@@ -53,6 +53,7 @@ func register() {
DomainRegister
(
WASTESORTING
,
speechOtherDomain
)
DomainRegister
(
FOOD
,
speechOtherDomain
)
DomainRegister
(
ASTRO_FORTUNE
,
astroFortuneDomain
)
DomainRegister
(
ALMANAC
,
almanacDomain
)
DomainRegister
(
""
,
speechOtherDomain
)
//
...
...
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