Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
robot_behaviour
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
Antonio Andriella
robot_behaviour
Commits
bef9c0da
Commit
bef9c0da
authored
4 years ago
by
Antonio Andriella
Browse files
Options
Downloads
Patches
Plain Diff
code refactoring
parent
d87a52ec
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/robot_behaviour/speech_reproducer.py
+2
-12
2 additions, 12 deletions
src/robot_behaviour/speech_reproducer.py
with
2 additions
and
12 deletions
src/robot_behaviour/speech_reproducer.py
+
2
−
12
View file @
bef9c0da
...
@@ -41,6 +41,7 @@ class Speech():
...
@@ -41,6 +41,7 @@ class Speech():
def
doneCb
(
self
,
state
,
result
):
def
doneCb
(
self
,
state
,
result
):
rospy
.
loginfo
(
"
Action server is done.
"
)
rospy
.
loginfo
(
"
Action server is done.
"
)
self
.
reproduction_has_ended
=
True
self
.
reproduction_has_ended
=
True
return
self
.
reproduction_has_ended
def
text_to_speech
(
self
,
text
,
locked
=
False
):
def
text_to_speech
(
self
,
text
,
locked
=
False
):
...
@@ -61,18 +62,7 @@ class Speech():
...
@@ -61,18 +62,7 @@ class Speech():
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
speech
=
Speech
(
"
en_GB
"
)
speech
=
Speech
(
"
en_GB
"
)
text
=
"
The solution is 112
"
text
=
"
Hola
"
speech
.
text_to_speech
(
text
,
True
)
speech
.
text_to_speech
(
text
,
True
)
print
(
speech
.
reproduction_has_ended
)
print
(
speech
.
reproduction_has_ended
)
speech
.
reproduction_has_ended
=
False
print
(
speech
.
reproduction_has_ended
)
if
speech
.
reproduction_has_ended
==
False
:
speech
.
text_to_speech
(
text
,
True
)
print
(
speech
.
reproduction_has_ended
)
#
# t0 = time.time()
# elapsed_time = 0
# while(elapsed_time<5):
# elapsed_time = time.time()-t0
# print("Reproduction has ended? ",speech.reproduction_has_ended)
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