Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Speech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
Skills
Speech
Commits
c238a645
Commit
c238a645
authored
4 months ago
by
Timo Birr
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' into rtlntv
parents
850dfe2e
3f1f47ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!16
Combined changes from verbalization and rtlntv branch
,
!15
Familiar Object Verbalization
,
!14
Verbalization
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/asr_base/asr_base/audio_memory_asr.py
+2
-0
2 additions, 0 deletions
python/asr_base/asr_base/audio_memory_asr.py
python/asr_base/asr_base/base.py
+3
-3
3 additions, 3 deletions
python/asr_base/asr_base/base.py
with
5 additions
and
3 deletions
python/asr_base/asr_base/audio_memory_asr.py
+
2
−
0
View file @
c238a645
...
...
@@ -35,11 +35,13 @@ class AudioMemoryASR(BaseASR, ABC):
while
not
hasattr
(
self
,
'
_audio_reader
'
):
sleep
(
1
)
# Wait for Audio Memory to connect. Unfortunately, recorder_thread might get started before.
print
(
'
Subscribing to updates from
'
,
self
.
_audio_input_entity
)
sleep
(
1
)
while
True
:
try
:
self
.
_audio_reader
.
poll_updates
(
entity_id
=
self
.
_audio_input_entity
,
callback
=
self
.
_receive_audio_from_memory
)
except
LocalException
as
e
:
print
(
"
Audio Fallback...
"
)
self
.
_audio_reader
=
AudioReader
.
from_mns
(
self
.
_mns
)
...
...
This diff is collapsed.
Click to expand it.
python/asr_base/asr_base/base.py
+
3
−
3
View file @
c238a645
...
...
@@ -19,12 +19,10 @@ class BaseASR(abc.ABC):
):
super
().
__init__
()
self
.
log
=
logging
.
getLogger
(
name
=
output_provider_name
)
self
.
log
.
info
(
f
"
Getting MNS.
"
)
self
.
_mns
=
MemoryNameSystem
.
wait_for_mns
()
self
.
_writer
=
SpeechToTextWriter
.
from_mns
(
self
.
_mns
,
wait
=
True
)
self
.
_output_entity_id
=
self
.
_writer
.
make_entity_name
(
output_provider_name
)
self
.
_recorder_thread
=
threading
.
Thread
(
target
=
self
.
recording_loop
,
daemon
=
True
)
self
.
_channel
=
channel
...
...
@@ -46,6 +44,8 @@ class BaseASR(abc.ABC):
self
.
_writer
.
commit
(
self
.
_output_entity_id
,
text
=
hypo
,
confidence
=
confidence
,
speaker
=
speaker
)
self
.
log
.
info
(
f
"
Committing hypothesis
'
{
hypo
}
'
.
"
)
except
LocalException
as
e
:
print
(
"
Fallback
"
)
self
.
_mns
=
MemoryNameSystem
.
wait_for_mns
()
self
.
_writer
=
SpeechToTextWriter
.
from_mns
(
self
.
_mns
,
wait
=
True
)
...
...
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