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.
Pulseaudio allows corking / ducking for streams with prioritized roles
This sets the role for the mycroft speech to "phone" and all other to
"music" if the config tts->pulse_duck is set to true.
the old "__metaclass__" has been ignored since the switch to python 3
this restores the metaclass functionality by updating it to the new
class kwarg syntax
When the mimic2 TTS instance is created the phrases from mycroft-core and mycroft-wifi setup (if available) is generated and stored locally (defaults to /opt/mycroft/preloaded_cache but can be changed with the mimic2 config parameter "preloaded_cache"
On startup the cache will be copied into the cache directory to speed up default interactions.
* Fix mimic 2 long sentences
Fixes bug in the second and third chunking pass incorrectly by
concatinating strings with lists resulting in chunks of single
characters.
* Handle mimic2 chunking correctly
- Move preprocessing from get_tts() to a method called from tts execute,
this allows all parts to be spoken and the caching to work correctly
- Remove duplicate of phonetic spelling in mimic2_tts
Mimic2 voices has several issues:
* Numeric generation was all goofed up for decimal numbers. It was
independently doing number to speech for the values before and after
the period on a decimal number. E.g. 1.100 became "one.one hundred".
Removed local normalization altogether since it is handled
correctly on the Mimic2 server now.
* Sentence splitting was being applied in the middle of things like
numbers or abbreviations. E.g. "I.B.M."
* Chunker algorithms were making unnecessary copies of string arrays
While in there I also:
* Removed several unused imports
* Cleaned up docstrings
* Prefixed private helpers with _
* Added debug logging of mimic2 request text
* Remove the old single viseme message
Instead a single viseme message is sent
* Correct the spelling of viseme.
Ref: https://en.wikipedia.org/wiki/Viseme
* Remove debug print.
This was probably left in by mistake, removing to clean up the audio log somewhat.
The settings code worked, but was noisy and generally messy about
a few exceptional but common situations:
* When the .mycroft/skills/<SkillName> folder didn't already exist
* When network timeouts and such occcurred
I also slipped in a couple trivial code cleanups for an unused variable
and a log message.
* Refactor mimic2 to use the shared tts architecture
* Make sure the queue is cleared
- Add a convenience method grouping clear_queue and clear_visemes
- The start time is now set before the lock to allow multiple speech requests queued before the stop signal to also be cancelled
- Make sure the any pending TTS generation is cleared from the queue by calling tts.clear() when breaking from the chunking loop.
* Add new api command to send visemes as single list. This allows more efficient use of the messagebus and gives implementors flexibility in how they handle the visualization.
* Switch mark1 to use viseme_list
* Fix mimic2 negative numbers
Make the regex extracting numbers also match negative numbers when preparsing phrases sent to the mimic2 service
* Update pronounce_number to use "minus" for negatives
After discussion in the chat it was suggested to use "minus" for negatives as default.
When scientific notation is used the term "negative " is still used.
The "phonetic_spellings.txt" mechanism converts odd words to strings that
represent what they should sound like when spoken. For example, "mycroftai"
to "Mycroft A.I.". This provides an easy mechanism to provide hints to
lots of Text to Speech engines.
This adds it to Mimic2, along with a spelling of "corgi".
This is a step towards abstracting the idea of an Enclosure which ties Mycroft to the hardware that is running Mycroft.
- Move the enclosure API to mycroft.enclosure.api (previously was mycroft.client.enclosure.api)
- Move display_manager out of enclosure client to mycroft.enclosure.display_manager
- Merge EnclosureWeather into EnclosureMouth
- Wrap display manager in a class
Numbers are now normalized to the text equivalent. This is to solve problems where mimic2 returns a speed up text generation when saying number values.