Commit Graph

93 Commits (2ee5718847e6dd3d6f8263e64c53459a772f70e2)

Author SHA1 Message Date
mpolidori a43a748f97 Change regex string to raw string (#1845) 2018-10-10 12:23:59 -05:00
Michael Nguyen 9228367678 catch more exceptions 2018-10-08 17:14:43 -05:00
Michael Nguyen b22e9d975d fall back tts function for connection errors 2018-10-08 16:54:22 -05:00
Steve Penrod a0eee8862b Use the phonetic_spellings.txt in Mimic2
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".
2018-09-26 23:54:23 -05:00
Michael Nguyen 1d472df803 fix commenting 2018-09-12 16:00:53 -05:00
Michael Nguyen 09a785364f remove unecessary log 2018-09-12 13:50:32 -05:00
Michael Nguyen 402b02b7fa added doc string and removed danerous default arg 2018-09-12 13:49:16 -05:00
Michael Nguyen 7b9ed611aa changes to mycroft core to do longer sequence generations 2018-09-06 15:05:00 -05:00
Åke 85ae69597b Separate enclosure api from enclosure client (#1760)
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
2018-08-27 13:44:12 -05:00
Åke 64476eb143 Replace emitter/ws with bus (#1757)
Makes the code a bit more understandable
2018-08-21 20:50:50 -05:00
Michael Nguyen a5a119507e restrict str.replace from doing a global string replacement 2018-08-15 19:27:59 -05:00
Åke 3099d004dd Fix issue writing phonemes to disk (#1720)
Change Mimic.get_tts() to return phonemes as string instead of bytes
2018-08-15 03:59:11 -05:00
Michael Nguyen 14e862bfaa Fix isSpeaking Signal for Mimic2 TTS (#1724)
Allows skills to determine while TTS is still occurring
2018-08-14 23:10:23 -05:00
Michael Nguyen 408f0ef4bc function to normalized all numbers to text equivalent (#1737)
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.
2018-08-14 22:01:08 -05:00
Nolan Darilek adfd9154db Better logging around why writing .PHO file fails. 2018-08-06 20:28:52 +00:00
Michael Nguyen fe00294b4c Feature/mimic2 visemse (#1708)
* added ability to create visemes
* clean visemes code, added url to mycroft.conf
2018-08-02 15:08:10 -05:00
Michael Nguyen 1ab9ae3889 Add Mimic 2 TTS
* added asynchronous request to mimic2 backend to break up audio into chunks

 * add chracter threshold

 * refactored split_by_punctuation

 * add punctuation function to sentence chunks

 * fix spelling

 * some more spelling

 * added mimic2 in mycroftconf

 * removed unused imports
2018-07-18 13:10:07 -05:00
Steve Penrod 17aab53fae Enhance the behavior of the Mark 1 button (#1668)
The Mark 1 button press can now be "consumed" when a skill handles
the Stop command.  When this happens, the button press will not
trigger listening mode.  An additional press would be needed to
trigger listening.

This introduces the "mycroft.stop.handled" messagebus message.  It
carries a data field called "by" which identifies who handled it.
Currently the values are "TTS" for when speaking ends or the name
of a skill which implements Stop and returns True from the call.

Also fixed a potential bug when the flag to clear queued visemes
was left set after a button press.
2018-07-05 20:56:54 +02:00
JarbasAI db4740d407 Add Responsive voice tts (#1565)
Adds responsive voice as an optional TTS service.

See https://responsivevoice.org/text-to-speech-sdk/text-to-speech-widget/
2018-07-04 13:21:34 +02:00
Åke Forslund 650e051b0b Handle words with capitals 2018-06-06 17:16:41 +02:00
Matthew D. Scholefield 509162de50 Support tilda in data_dir 2018-05-23 15:03:01 -05:00
Matthew D. Scholefield b0b88bbd62 Remove all references to /opt/mycroft 2018-05-23 08:22:14 +02:00
Åke Forslund 8c5911ecf0 Fix code standard issues
- dev_setup.sh - replace `` with $()
- mycroft/skills/core.py remove remove redundant imports
- mycroft/tts/__init__.py remove remove redundant imports
2018-05-03 12:32:21 +02:00
Åke Forslund a2993e4ba6 Remove backwards compatibility with python 2.7 2018-04-27 08:51:47 -05:00
Åke Forslund 29a2e14a2f Fix google tts now playing audio
The file extention of the audio was not set properly in the google_tts causing it to fail to playback the synthezised audio
2018-04-26 15:08:35 +02:00
Matthew D. Scholefield cbf73d4b30 SSML Changes
- Engines now specify if they support ssml rather than the configuration
 - The text client strips out ssml tags
 - Engines can modify tags via the `self.modify_tag` method
2018-04-18 14:45:09 -05:00
Jarbas 7c6af2017c add SSML support 2018-04-18 14:45:09 -05:00
jarbasai 29e18cba8f fix bing gender 2018-01-09 19:16:39 +00:00
jarbasai 5c14fb3b62 bing tts 2018-01-09 19:16:26 +00:00
jarbasai f1c64471c6 bing tts 2018-01-09 19:15:28 +00:00
Åke Forslund 936bd54180 Add a function to build the standard timing report 2018-01-08 18:01:03 -06:00
Åke Forslund c1d3342fc6 Add playback timing reports in playback thread
This covers the default case with mimic and in the future more as they
are moved over to using the playback thread
2018-01-08 18:01:03 -06:00
Åke c3d0c1bcb9
Merge pull request #1261 from JarbasAl/ibm_tts
Add IBM Watson tts
2018-01-07 16:58:45 +01:00
Åke Forslund aed83da43f Add basic validation 2018-01-03 23:01:19 +01:00
Åke Forslund fd6ea82cab Fix Authentication for tts_ibm 2018-01-03 23:00:50 +01:00
Åke 02e9ad7bb0
Merge pull request #1287 from MycroftAI/feature/tts-phonetic-spelling
Add phonetic spelling option to TTS engines.

Allows to override words with better sounding alternatives listed in res/text/phonetic_spellings.txt
2018-01-03 14:53:06 +01:00
Åke Forslund 41c2f43022 Handle unknown architectures better 2017-12-20 15:46:33 -06:00
Åke 742558046d Python 2/3 compatibility (#1259)
Add Python 2/3 compatibility

====  Tech Notes ====
This allows the main bus, skills and cli to be run in both python 2.7 and
3.5+.

Mainly trivial changes
- syntax for exceptions
- logic for importing correct Queue module
- .iteritems -> future.utils.iteritems when accessing dicts key value
pairs

* Allow audio service to be run in python 3
* Make speech client work with python 3
* Importing of Queue version dependent
* Exception syntax corrected
* Creating sound buffer is version dependant
- Adapt context use range from builtins
- Use compatible next() instead of .next() when walking the skill
directory

* Make CLI Python 3 Compatible
- Use compatible BytesIO instead of StringsIO
- Open files as text instead of binary
- Make sure integer divisions are used

* Make messagebus send compatible
* Fix failing travis

Re-add future 0.16.0

* Make string checks compatible
* basestring doesn't exist in python 3 so it's imported from the "past"
* Fix latest compatibility issues in speech client
- handle urllib
- handle encoding before calling md5

* Make Api.build_json() python 2/3 compatible
2017-12-18 17:24:21 -06:00
Matthew D. Scholefield 1fecf64fc7 Add phonetic spelling option to TTS engines 2017-12-06 21:43:53 -06:00
penrods 706e516cb4 Fix the timing of isSpeaking signal
The isSpeaking signal would only be generated when the actual audio playback
started, but this could be several seconds for TTS engines like Mimic which
take some time to generate the audio file for playback.  This changes the
creation of the "isSpeaking" signal to the start of the execute() method,
which should queue up audio and leave the signal set until the queue has
eventually been cleared.
2017-12-06 02:31:10 -06:00
jarbasai ed660183f0 ibm watson tts 2017-11-26 21:00:17 +00:00
penrods c1e1b935ee Improve mouth synchronization with speech
When the TTS engine provides visemes to the faceplate, the information
passed along consists of the mouth shape and the duration to display it.
When the system get backed-up for some reason (e.g. the CPU is briefly
overloaded), the code would attempt to catch up the animation but would
still send the 'expired' viseme across the serial port to the faceplate
with no wait-time.  This results in a fast-moving mouth to catch up,
which isn't very pleasing.

Now the viseme is passed along with an expiration date, so if the time
to display it has already passed then the viseme code gets thrown away
instead of being sent across the (relatively slow) serial port.  This
allows better catch-up.
2017-11-20 21:22:48 -06:00
Åke Forslund 0bf3d9a668 Clear cache after playback.
====  Tech Notes ====
Since the playback now is performed in a thread the curate_cache could
clean out generated speech before or in the middle of playing back the
queue.
2017-10-26 18:05:57 -05:00
Åke Forslund 3e878bd59f Replace ConfigurationManger with Configuration 2017-10-26 19:02:32 -04:00
Åke Forslund e5f2e3d5cd Download subscription voices in the background
====  Tech Notes ====
Subscription voices are downloaded in the background as soon as mimic_tts
module is started.
2017-10-26 18:42:19 -04:00
Åke Forslund 285b4b6c14 Use wget to download, so resume/retry can be used
====  Tech Notes ====
Since the voice is a quite large download stalling download is a real
possibility. Using wget allows for resume and retry of download in a
simple way.
2017-10-26 18:42:19 -04:00
Åke Forslund 46c1b575fd Add methods for downloading premium voice
====  Tech Notes ====
- Using download utility to download voice binary
- reverts to default voice if not premium
- uses default voice during download and switches over when done
2017-10-26 18:42:19 -04:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Matthew D. Scholefield 5e392f34aa Optimize imports
Remove unused imports and group local vs external alphabetically
2017-09-18 16:07:50 -05:00
Matthew D. Scholefield cfdc405da5 Add new LOG class 2017-09-18 13:56:06 -05:00