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

fix/speech #47

Merged
merged 3 commits into from
Feb 10, 2022
Merged

fix/speech #47

merged 3 commits into from
Feb 10, 2022

Conversation

NeonJarbas
Copy link

@NeonJarbas NeonJarbas commented Feb 5, 2022

bumps ovos utils to include OpenVoiceOS/ovos-utils#14

bumps ovos plugin manager to include OpenVoiceOS/ovos-plugin-manager#26

removes a hack with a TODO

refactors out the global config variable

wraps the fallback tts into a try: except:

@JarbasAl JarbasAl requested review from NeonDaniel and j1nx February 5, 2022 18:19
Copy link

@ChanceNCounter ChanceNCounter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goodbye, regex. I don't really get the removed hack. Was that compensating for Picroft, Pi, or Raspbian, and do we care?

mycroft/audio/speech.py Show resolved Hide resolved
mycroft/audio/speech.py Outdated Show resolved Hide resolved
Copy link
Member

@j1nx j1nx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will follow all related PR's, bump, test and report back.

Copy link
Member

@NeonDaniel NeonDaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If removed patch is no longer patching an RPi issue, this seems fine; otherwise consider putting it in a method with a config option to suppress splitting sentences

mycroft/audio/speech.py Show resolved Hide resolved
@j1nx
Copy link
Member

j1nx commented Feb 9, 2022

Testing this PR however following error is for all TTS output.

2022-02-09 19:56:15.139 - OVOS - mycroft.audio.speech:mute_and_speak:104 - ERROR - TTS execution failed.
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mycroft/audio/speech.py", line 99, in mute_and_speak
    tts.execute(utterance, ident, listen)
  File "/usr/lib/python3.8/site-packages/ovos_plugin_manager/templates/tts.py", line 418, in execute
    self._execute(sentence, ident, listen, **kwargs)
  File "/usr/lib/python3.8/site-packages/ovos_plugin_manager/templates/tts.py", line 449, in _execute
    audio_file, phonemes = self._synth(sentence, sentence_hash, **kwargs)
  File "/usr/lib/python3.8/site-packages/ovos_plugin_manager/templates/tts.py", line 506, in _synth
    audio.path, phonemes = self.get_tts(sentence, str(audio), **kwargs)
  File "/usr/lib/python3.8/site-packages/ovos_tts_plugin_mimic2/__init__.py", line 43, in get_tts
    results = requests.get(self.url, params=params).json()
  File "/usr/lib/python3.8/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-02-09 19:56:15.216 - OVOS - ovos_plugin_manager.templates.tts:_play:118 - ERROR - 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/ovos_plugin_manager/templates/tts.py", line 107, in _play
    self.p = play_audio(data)
  File "/usr/lib/python3.8/site-packages/ovos_utils/sound/__init__.py", line 22, in play_audio
    ext = uri.split("?")[0].split(".")[-1]
AttributeError: 'NoneType' object has no attribute 'split'

Used the default mycroft setup route utilizing the Mimic2 and selene pairing.

@j1nx
Copy link
Member

j1nx commented Feb 9, 2022

Following error is within voice.log but not sure if this related.

2022-02-09 19:58:47.774 - OVOS - mycroft.client.speech.listener:run:396 - DEBUG - Config has changed, reloading...
2022-02-09 19:58:47.817 - OVOS - mycroft.client.speech.listener:run:97 - ERROR - Exception in AudioProducer
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/mycroft/client/speech/listener.py", line 72, in run
    audio, lang = self.loop.responsive_recognizer.listen(
  File "/usr/lib/python3.8/site-packages/mycroft/client/speech/mic.py", line 802, in listen
    ww_data, lang = self._wait_until_wake_word(source, sec_per_buffer)
TypeError: cannot unpack non-iterable NoneType object

@JarbasAl
Copy link
Member

JarbasAl commented Feb 10, 2022

@j1nx

thats mimic2 plugin failing, all the errors are just logs but actually handled in code, try out OpenVoiceOS/ovos-plugin-manager#27 and see if it improves things, if fallback TTS is not triggering with that + #49 then we have a new issue

the second thing is a new issue, OpenVoiceOS/ovos-listener#22

@JarbasAl JarbasAl merged commit 1cfd733 into OpenVoiceOS:dev Feb 10, 2022
@JarbasAl JarbasAl added the bug Something isn't working label Feb 25, 2022
@NeonJarbas NeonJarbas deleted the fix/misc_tts branch June 8, 2022 21:06
@JarbasAl JarbasAl added this to the 0.0.8 milestone Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants