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
b6f8f363
Commit
b6f8f363
authored
Jun 20, 2025
by
赵文静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加星座运势
parent
296dcdb6
Pipeline
#5452
passed with stage
in 0 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
9 deletions
+35
-9
CHANGELOG.md
CHANGELOG.md
+5
-0
c2c.http
c2c.http
+5
-5
go.mod
go.mod
+1
-1
service/speechNlu/constant.go
service/speechNlu/constant.go
+4
-3
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 @
b6f8f363
# 更新日志
# 更新日志
## [0.0.1-beta.3] - 2025.6.19
### Changed
-
增加音乐兜底
-
增加星座运势
## [0.0.1-beta.3] - 2025.6.6-6.14
## [0.0.1-beta.3] - 2025.6.6-6.14
### Changed
### Changed
-
更改为redis存储sessionId
-
更改为redis存储sessionId
...
...
c2c.http
View file @
b6f8f363
...
@@ -5,7 +5,7 @@ Content-Type: application/json
...
@@ -5,7 +5,7 @@ Content-Type: application/json
"ip": "14.215.222.17",
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mac": "ece154a865eb",
"mid": "11011",
"mid": "11011",
"query":"
你喜欢吃零食吗
",
"query":"
播放时政热点
",
"requestId": "123456111"
"requestId": "123456111"
}
}
...
@@ -17,7 +17,7 @@ Content-Type: application/json
...
@@ -17,7 +17,7 @@ Content-Type: application/json
"ip": "14.215.222.17",
"ip": "14.215.222.17",
"mac": "ece154a865eb",
"mac": "ece154a865eb",
"mid": "11011",
"mid": "11011",
"query":"
谁是你爸
",
"query":"
r
",
"requestId": "123456111"
"requestId": "123456111"
}
}
...
@@ -38,7 +38,7 @@ Content-Type: application/json
...
@@ -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;"
"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": {
"nluRet": {
"text": "
谁是你爸
"
"text": "
我想听故事
"
},
},
"postProc": {}
"postProc": {}
}
}
...
@@ -57,7 +57,7 @@ Content-Type: application/json
...
@@ -57,7 +57,7 @@ Content-Type: application/json
},
},
"nluRet": {
"nluRet": {
"asr_recongize": "",
"asr_recongize": "",
"text": "
谁是你爸
"
"text": "
打开列表循环
"
}
}
},
},
"version": "v0"
"version": "v0"
...
@@ -79,7 +79,7 @@ Content-Type: application/json
...
@@ -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;"
"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": {
"nluRet": {
"text": "
我是你的谁
"
"text": "
双鱼座和什么星座最配
"
},
},
"postProc": {}
"postProc": {}
}
}
...
...
go.mod
View file @
b6f8f363
...
@@ -15,6 +15,7 @@ require (
...
@@ -15,6 +15,7 @@ require (
github.com/json-iterator/go
v1.1.12
github.com/json-iterator/go
v1.1.12
github.com/parnurzeal/gorequest
v0.2.16
github.com/parnurzeal/gorequest
v0.2.16
github.com/rabbitmq/amqp091-go
v1.10.0
github.com/rabbitmq/amqp091-go
v1.10.0
github.com/soheilhy/cmux
v0.1.5
github.com/spf13/viper
v1.16.0
github.com/spf13/viper
v1.16.0
github.com/tidwall/gjson
v1.14.4
github.com/tidwall/gjson
v1.14.4
go.uber.org/zap
v1.24.0
go.uber.org/zap
v1.24.0
...
@@ -60,7 +61,6 @@ require (
...
@@ -60,7 +61,6 @@ require (
github.com/pelletier/go-toml/v2
v2.2.2 // indirect
github.com/pelletier/go-toml/v2
v2.2.2 // indirect
github.com/pkg/errors
v0.9.1 // indirect
github.com/pkg/errors
v0.9.1 // indirect
github.com/smartystreets/goconvey
v1.8.0 // indirect
github.com/smartystreets/goconvey
v1.8.0 // indirect
github.com/soheilhy/cmux
v0.1.5 // indirect
github.com/spf13/afero
v1.9.5 // indirect
github.com/spf13/afero
v1.9.5 // indirect
github.com/spf13/cast
v1.5.1 // indirect
github.com/spf13/cast
v1.5.1 // indirect
github.com/spf13/jwalterweatherman
v1.1.0 // indirect
github.com/spf13/jwalterweatherman
v1.1.0 // indirect
...
...
service/speechNlu/constant.go
View file @
b6f8f363
...
@@ -89,9 +89,10 @@ const (
...
@@ -89,9 +89,10 @@ const (
CONVERT
=
"单位换算"
CONVERT
=
"单位换算"
HOLIDAY
=
"节假日查询"
HOLIDAY
=
"节假日查询"
//SLEEPMUSIC = "声音博物馆"
//SLEEPMUSIC = "声音博物馆"
RELATION
=
"亲戚关系计算"
RELATION
=
"亲戚关系计算"
WASTESORTING
=
"垃圾分类"
WASTESORTING
=
"垃圾分类"
FOOD
=
"食物营养查询"
FOOD
=
"食物营养查询"
ASTRO_FORTUNE
=
"星座运势"
SOUND
=
"sound"
SOUND
=
"sound"
ALMANAC
=
"almanac"
ALMANAC
=
"almanac"
...
...
service/speechNlu/domain.go
View file @
b6f8f363
...
@@ -1073,6 +1073,25 @@ func childMusicDomain(params *model.SpeechDomainParams) []byte {
...
@@ -1073,6 +1073,25 @@ func childMusicDomain(params *model.SpeechDomainParams) []byte {
return
Marshal
(
params
,
res
)
return
Marshal
(
params
,
res
)
}
}
func
astroFortuneDomain
(
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
(
"astroFortuneDomain baseParse error."
)
return
replyWithChat
(
error_reply
,
"doudi"
)
}
res
.
Header
.
Semantic
.
Domain
=
"astro"
res
.
Header
.
Semantic
.
Intent
=
"search_fastfate"
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
{
func
Marshal
(
params
*
model
.
SpeechDomainParams
,
res
*
model
.
ResponseBody
)
[]
byte
{
if
res
.
Header
.
Semantic
.
Domain
==
""
{
if
res
.
Header
.
Semantic
.
Domain
==
""
{
res
.
Header
.
Semantic
.
Domain
=
"chat"
res
.
Header
.
Semantic
.
Domain
=
"chat"
...
...
service/speechNlu/register.go
View file @
b6f8f363
...
@@ -52,6 +52,7 @@ func register() {
...
@@ -52,6 +52,7 @@ func register() {
DomainRegister
(
RELATION
,
speechOtherDomain
)
DomainRegister
(
RELATION
,
speechOtherDomain
)
DomainRegister
(
WASTESORTING
,
speechOtherDomain
)
DomainRegister
(
WASTESORTING
,
speechOtherDomain
)
DomainRegister
(
FOOD
,
speechOtherDomain
)
DomainRegister
(
FOOD
,
speechOtherDomain
)
DomainRegister
(
ASTRO_FORTUNE
,
astroFortuneDomain
)
DomainRegister
(
""
,
speechOtherDomain
)
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