Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move STT timing to start at recording end #199

Merged
merged 2 commits into from
May 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions neon_speech/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from tempfile import mkstemp
from threading import Lock, Event
from time import time

from pydub import AudioSegment
from speech_recognition import AudioData
from neon_utils.file_utils import decode_base64_string_to_file
Expand Down Expand Up @@ -135,9 +136,9 @@ def __init__(self, ready_hook=on_ready, error_hook=on_error,
LOG.info("Skipping api_stt init")
self.api_stt = None

def _record_begin(self):
def _record_end_signal(self):
self._stt_stopwatch.start()
OVOSDinkumVoiceService._record_begin(self)
OVOSDinkumVoiceService._record_end_signal(self)

def _stt_text(self, text: str, stt_context: dict):
self._stt_stopwatch.stop()
Expand Down
Loading