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
6bc22f77
Commit
6bc22f77
authored
May 29, 2025
by
赵文静
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
5ca41ec9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
9 deletions
+19
-9
c2c.http
c2c.http
+2
-2
service/speechNlu/domain.go
service/speechNlu/domain.go
+17
-7
No files found.
c2c.http
View file @
6bc22f77
...
...
@@ -14,7 +14,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": {}
}
...
...
@@ -33,7 +33,7 @@ Content-Type: application/json
},
"nluRet": {
"asr_recongize": "",
"text": "
城春草木深下一句
"
"text": "
春望的释义
"
}
},
"version": "v0"
...
...
service/speechNlu/domain.go
View file @
6bc22f77
...
...
@@ -244,24 +244,34 @@ func ancientpoemDomain(params *model.SpeechDomainParams) []byte {
res
.
Header
.
Semantic
.
Domain
=
"ancient_poem"
res
.
Header
.
Semantic
.
Intent
=
"search_tangshi"
var
content
string
if
params
.
SpeechWsResp
.
Dm
.
IntentName
==
"查询诗词释义"
{
res
.
Header
.
Semantic
.
Intent
=
"search_ancientpoem_meaning"
if
params
.
SpeechWsResp
.
Dm
.
Widget
.
Extra
.
ContentTranslation
==
""
{
//如果返回列表,整机是播放content里的消息
content
=
params
.
SpeechWsResp
.
Dm
.
Nlg
}
else
{
res
.
ListItems
=
append
(
res
.
ListItems
,
map
[
string
]
interface
{}{
"content"
:
params
.
SpeechWsResp
.
Dm
.
Widget
.
Extra
.
ContentTranslation
,
"title"
:
params
.
SpeechWsResp
.
Dm
.
Widget
.
Extra
.
Title
,
"type"
:
"TEXT"
,
//原来是 TEXT,看看是否能播放
"url"
:
""
,
"mediaId"
:
""
,
})
content
=
params
.
SpeechWsResp
.
Dm
.
Widget
.
Extra
.
ContentTranslation
}
res
.
ListItems
=
append
(
res
.
ListItems
,
map
[
string
]
interface
{}{
"content"
:
content
,
"title"
:
params
.
SpeechWsResp
.
Dm
.
Widget
.
Extra
.
Title
,
"type"
:
"TEXT"
,
//原来是 TEXT,看看是否能播放
"url"
:
""
,
"mediaId"
:
""
,
})
res
.
Header
.
Semantic
.
SkillId
=
res
.
Header
.
Semantic
.
Domain
+
"."
+
res
.
Header
.
Semantic
.
Intent
return
Marshal
(
params
,
res
)
}
else
if
params
.
SpeechWsResp
.
Dm
.
IntentName
==
"查询诗句"
{
res
.
Header
.
Semantic
.
Intent
=
"search_ancientpoem_chains"
res
.
Header
.
Semantic
.
SkillId
=
res
.
Header
.
Semantic
.
Domain
+
"."
+
res
.
Header
.
Semantic
.
Intent
res
.
ListItems
=
append
(
res
.
ListItems
,
map
[
string
]
interface
{}{
"content"
:
params
.
SpeechWsResp
.
Dm
.
Nlg
,
"title"
:
params
.
SpeechWsResp
.
Dm
.
Widget
.
Extra
.
Title
,
"type"
:
"TEXT"
,
//原来是 TEXT,看看是否能播放
"url"
:
""
,
"mediaId"
:
""
,
})
return
Marshal
(
params
,
res
)
}
...
...
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