* fix issues when remote excepts out
* Remove explicit clear_cache from MimicTTS
* Updates for using singleton TTS playback thread
- Cache is called on all tts's registered as using the thread
- Begin audio and end audio is handled by the playback thread
- Further changes from self.playback to TTS.playback for consistency
* Remove redundant try/except
* Consolidate general and TTS-specific sentence splitting
This performs all sentence-splitting at the same stage. This fixes a
subtle issue where a TTS splits a sentence into chunks and throws an
error on only one of those chunks. The fallback would generate a
sentence for the original un-chunked sentence. possibly saying the same
parts twice.
This also pre-compiles the regexes used to speed things up a bit.
Co-authored-by: Ken <ken.smith@mycroft.ai>
All modules registered under the entrypoint group "mycroft.plugin.audioservice"
These shall refer to a module with either an autodetect function or a
load_service function.
Events (any python threading in general) don't use monotonic time and
can be affected by an ntp sync.
This replaces the normal event with the MonotonicEvent class handling jumps
into the future.
The new wait_for_loaded() method will wait until services has been
loaded. It has a 3 minute timeout (default)
This improves the audio service readiness indication to not trigger
until the services are loaded.
- skills
- audio
- speech client
- messagebus service
- enclosure
The main functions now accepts the arguments ready_hook and error_hook
allowing a service or runner script to catch these states and perform
actions accordingly.
This is useful for things like systemd or a desktop launcher.
Fix audio service startup
Added a RemoteTTSException exception for non-timeout exceptions, Mimic2
will consider HTTP status code 200-299 as OK while other responses will
trigger raise RemoteTTSException.
If the server doesn't support getting the http head for the feed a 501
may be generated the guess_mime function will in turn fail if the url
ends with "?arg=x" or similar. This does an extra parsing step trying to
remove such arguments.
If rendering a chunk of a sentence takes too long time, the audio queue
may run out and trigger the listening.
This moves the listening trigger to after the last chunk.
Major refactoring of the skills startup sequence
- Restructure to a less nested structure
- Remove usage of globals by wrapping a lot of state variables into a class this allows for things like caching a negative pairing status throughout the startup process