Skip to content

Commit

Permalink
Move STT timing to start at recording end
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed May 14, 2024
1 parent def7415 commit 71f2e03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions neon_speech/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
from tempfile import mkstemp
from threading import Lock, Event
from time import time

from ovos_utils.process_utils import ProcessState
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 +137,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

0 comments on commit 71f2e03

Please sign in to comment.