Skip to content

Commit

Permalink
Remove quotes from API endpoint (#200)
Browse files Browse the repository at this point in the history
# Description
Ensures any surrounding quotes are removed from STT strings

# Issues
<!-- If this is related to or closes an issue/other PR, please note them
here -->

# Other Notes
Potentially obviated by
OpenVoiceOS/ovos-stt-http-server#20

Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored Jun 18, 2024
1 parent fb6104b commit 35c8a24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions neon_speech/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from ovos_utils.log import LOG, log_deprecation
from neon_utils.configuration_utils import get_neon_user_config
from neon_utils.metrics_utils import Stopwatch
from neon_utils.parse_utils import clean_quotes
from neon_utils.user_utils import apply_local_user_profile_updates
from ovos_bus_client import Message
from ovos_config.config import update_mycroft_config
Expand Down Expand Up @@ -572,6 +573,8 @@ def _get_stt_from_file(self, wav_file: str,
LOG.warning("Transcriptions is a str, no alternatives provided")
transcriptions = [transcriptions]

transcriptions = [clean_quotes(t) for t in transcriptions]

get_stt = float(_stopwatch.time)
with _stopwatch:
audio, audio_context = self.transformers.transform(audio_data)
Expand Down

0 comments on commit 35c8a24

Please sign in to comment.