Commit Graph

35 Commits (dev)

Author SHA1 Message Date
Åke e7ddd51256
TTS playback queue singleton (#3055)
* 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>
2022-03-02 09:59:57 +09:30
Daniel McKnight eb97bb339e
Add `supported_languages` parameter to STT and TTS base classes (#3059)
* Add `supported_languages` parameter to STT and TTS base classes

* Refactor `supported_languages` to `available_languages` and updated docstring to be more precise
2022-02-28 15:36:48 +09:30
Kris Gesling 1ae6900b26
Remove ResponsiveVoice TTS module from core (#3049)
This module in its current format does not work due to API changes.
There is also a community built plugin that is now described in our
documentation.
2022-02-23 15:40:53 +09:30
Åke Forslund 0ae02b5939 Fix TTS using the returned path 2021-07-02 08:34:03 +02:00
Kris Gesling 0394568704 Use returned TTS audio file path
This reverts an unintentional breaking change.
A TTS engine may return a different file path than was requested.
This again uses the returned path but adds a deprecation warning
that this behaviour will no longer be supported in an upcoming release.

Fixes #2929
2021-06-29 21:53:53 +09:30
Åke Forslund 5d3393b935 Make TTSCahce safer
Add __contains__ method to TTSCache, The cache contains a SHA if the SHA is
known and all expected files exists on disk.

This is handles unexpected system events in a more consistent manner and
will still be fast for the case where a new sentence needs to be
synthetisized.
2021-06-10 09:33:06 +02:00
Kris Gesling e75a05557b docstring cleanup 2021-05-11 15:10:32 +09:30
Kris Gesling 0fb90edd28 Rename to get_temp_path and add docstring 2021-04-30 16:49:59 +09:30
dzekem christa 7765d11224 ran autopep8 2021-04-30 14:48:15 +09:30
dzekem christa 3f745c52ad created temp path function 2021-04-30 14:47:49 +09:30
dzekem christa 621b4ab650 spaces added and uniformity in code 2021-04-30 14:46:36 +09:30
dzekem christa 9252158829 rectified pep8 issues 2021-04-30 14:46:36 +09:30
dzekem christa 32f666edd4 Issue-2727 - fixing hard coded /tmp 2021-04-30 14:46:36 +09:30
dzekem christa a174c3c822 replaced hard coded /tmp 2021-04-30 14:46:36 +09:30
Åke Forslund 9b4544dc7d Move cache curation to TextToSpeechCache 2021-03-18 23:02:26 +01:00
Åke Forslund 46a1de9b12 Remove unused import 2021-03-18 22:45:19 +01:00
Chris Veilleux ea013b26af Fixed failing unit test. 2021-03-10 21:16:34 -06:00
Chris Veilleux 469b1d3458 Changed ordering of adding a file to cache to make more sense. 2021-03-10 15:55:21 -06:00
Chris Veilleux 2f34df6603 enhance to use new cache logic 2021-03-10 13:39:01 -06:00
Åke Forslund 9173e22460 Send correct conf to mimic when used as fallback
- Mimic is now sent the correct config when used as a fallback
- Tests updated to ensure this
2021-02-08 22:09:55 +01:00
Åke Forslund 5e633421c6 Improve docstrings for TTS 2020-11-04 08:03:08 +01:00
Kris Gesling 8a1b989935
Merge pull request #2594 from forslund/feature/plugin-system
Plugin system for stt, tts, audioservices and wake word engines
2020-10-19 15:41:35 +09:30
domcross 5be3b54b27 MozillaTTS
Implement TTS module that works with Mozilla-TTS server.

==== Environment Notes ====
Requires a Mozilla-TTS server running preferably in your local network.
2020-10-01 20:07:47 +02:00
Åke Forslund a54090eef2 Add plugin support for tts
Entrypoints registered under "mycroft.plugin.tts" will be detected and
able to run.
2020-09-23 07:46:13 +02:00
Joan Montané 594c838a00 Add Festival TTS 2020-07-27 18:04:27 +02:00
Åke 4ab9469ff7
Merge pull request #2585 from forslund/polly_tts
Add Polly tts
2020-05-15 08:22:25 +02:00
Åke Forslund 094c2c28d0 Test loading of phonetic spelling dictionary
This also normalizes the path slightly to make sure that the phonetic
spelling is loaded even if the lang code contains capitals.
2020-05-12 08:58:18 +02:00
jarbasal 3707df87b3 update to newer TTS architecture 2020-04-19 17:25:38 +02:00
Åke Forslund d51fb126b8 Fix fallback to mimic
After catching exception to clear the isSpeaking flag the exception
shall be re-raised to allow the fallback TTS to trigger.
2020-04-17 20:43:13 +02:00
Åke Forslund b52722faf3 Add dummy TTS backend
The backend doesn't generate any audio playback, only consumes the
messages
2020-03-24 10:42:07 +01:00
Åke Forslund 27de6c72c4 Add empty tts output on execute exception
This will make sure that the isSpeaking flag is cleared correctly
2020-03-24 10:42:07 +01:00
Åke Forslund bdf7f02226 Remove specific metrics thread from TTS system 2020-02-26 07:25:45 +01:00
Åke Forslund 8f6822278f Clean-up
tts.py:
- remove unused import
-remove unused variable
- init TTS thread enclosure member
mimic2_tts.py: Fix docstrings
mimic_tts: Fix docstrings and remove unused variables and imports
google_tts: Improve docstrings
2020-01-10 16:26:48 +01:00
Åke Forslund 391b92ce56 Make Factory get Mimic TTS class from normal list
Removes duplicated code and makes method easier to test
2020-01-10 16:26:48 +01:00
Åke Forslund 72adf0465b Move code out of __init__.py 2020-01-10 15:27:07 +01:00