Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_tiago_tts_module
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
ros
platforms
TIAGo
iri_tiago_tts_module
Commits
6345748c
Commit
6345748c
authored
7 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Implemented the API functions of the TTS module.
parent
f35bb707
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/tiago_modules/tts_module.h
+3
-3
3 additions, 3 deletions
include/tiago_modules/tts_module.h
src/tts_module.cpp
+12
-9
12 additions, 9 deletions
src/tts_module.cpp
with
15 additions
and
12 deletions
include/tiago_modules/tts_module.h
+
3
−
3
View file @
6345748c
...
...
@@ -29,7 +29,8 @@ class CTTSModule : public CModule<tts_module::TTSModuleConfig>
tts_module
::
TTSModuleConfig
config
;
CModuleAction
<
pal_interaction_msgs
::
TtsAction
>
tts_action
;
pal_interaction_msgs
::
TtsGoal
goal
;
pal_interaction_msgs
::
TtsGoal
speech_goal
;
std
::
string
speaker
;
//Variables
tts_module_state_t
state
;
...
...
@@ -44,9 +45,8 @@ class CTTSModule : public CModule<tts_module::TTSModuleConfig>
public:
//CTTSModule(const std::string &name);
CTTSModule
(
const
std
::
string
&
name
,
const
std
::
string
&
name_space
=
std
::
string
(
""
));
void
set_language
(
std
::
string
&
language
);
void
set_speaker
(
std
::
string
&
speaker
);
void
say
(
std
::
string
&
text
,
double
delay
=
0.0
);
void
say
(
const
std
::
string
&
text
,
const
std
::
string
&
language
=
std
::
string
(
"en_GB"
),
double
delay
=
0.0
);
void
stop
(
void
);
bool
is_finished
(
void
);
tts_module_status_t
get_status
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/tts_module.cpp
+
12
−
9
View file @
6345748c
...
...
@@ -30,7 +30,7 @@ void CTTSModule::state_machine(void)
break
;
case
TTS_MODULE_START
:
ROS_DEBUG
(
"CTTSModule: Start"
);
switch
(
this
->
tts_action
.
make_request
(
this
->
goal
))
switch
(
this
->
tts_action
.
make_request
(
this
->
speech_
goal
))
{
case
ACT_SRV_SUCCESS
:
this
->
state
=
TTS_MODULE_WAIT
;
ROS_DEBUG
(
"CTTSModule : goal start successfull"
);
...
...
@@ -110,19 +110,22 @@ void CTTSModule::reconfigure_callback(tts_module::TTSModuleConfig &config, uint3
this
->
unlock
();
}
void
CTTSModule
::
set_language
(
std
::
string
&
language
)
{
}
void
CTTSModule
::
set_speaker
(
std
::
string
&
speaker
)
{
this
->
lock
();
this
->
speaker
=
speaker
;
this
->
unlock
();
}
void
CTTSModule
::
say
(
std
::
string
&
text
,
double
delay
)
void
CTTSModule
::
say
(
const
std
::
string
&
text
,
const
std
::
string
&
language
,
double
delay
)
{
this
->
lock
();
this
->
speech_goal
.
rawtext
.
text
=
text
;
this
->
speech_goal
.
rawtext
.
lang_id
=
language
;
this
->
speech_goal
.
wait_before_speaking
=
delay
;
this
->
speech_goal
.
speakerName
=
this
->
speaker
;
this
->
new_speech
=
true
;
this
->
unlock
();
}
void
CTTSModule
::
stop
(
void
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment