Commit Graph

1898 Commits (941e01ad34c3c1f6924a40092afbdab1b91afead)

Author SHA1 Message Date
Åke 941e01ad34
Merge pull request #1247 from MycroftAI/feature/metrics
Add general metrics reporting
2017-11-23 09:02:15 +01:00
Matthew D. Scholefield be638de12b Add general metrics 2017-11-22 23:39:14 -06:00
gaurav 3a40014122 Issue-1227 Fix arg =[] and ={}
Issue-1227 fixed line length

Issue-1227 fixed pep 8 E124

Issue-1227 fixed formatting
2017-11-22 23:17:16 -06:00
Augusto Monteiro 2bcfd9fde9
Merge pull request #1218 from forslund/bugfix/messagebus-send-ioerror
Handle missing messagebus in a correct way
2017-11-22 22:03:31 -05:00
Augusto Monteiro 3f281e83b5
Merge pull request #1251 from forslund/feature/reduce-config-file-loading
Reduce unneccessary loading of configuration files
2017-11-22 22:02:13 -05:00
Åke c9ac67d15b
Merge pull request #1250 from MycroftAI/feature/fix-1242
Fix viseme bug from PR #1242
2017-11-23 00:22:52 +01:00
penrods 8cb1e80bbe Fix viseme bug from PR #1242
I merged code and left out the 'until' value from the api call.  This
corrects that and deals with a missing 'until' cleaner.
2017-11-22 17:08:35 -06:00
Åke Forslund 5571b4d2cd Reduce unneccessary loading of configuration files
====  Tech Notes ====
Configuration.get() was originally thought to take a stack of configuration dicts and merge together into a single configuration dict but can also handle file paths.

The Api() class can't use the RemoteConfig class so it has supplied it's own stack of configuration files to avoid infinite recursion. Previously the files wore converted to dicts before passed into the Configuration which meant that 3 files were loaded even if the information was already cached. This passes the files as file references that will only be converted to dicts if the cache is not found.
2017-11-23 00:02:02 +01:00
Michael Nguyen 689687ef60
Merge pull request #1249 from MycroftAI/feature/namless-label
Allow name-less label in settingmeta.json
2017-11-22 16:07:16 -06:00
penrods c8a0cffa53 Allow name-less label in settingmeta.json
A type='label' field in the settingmeta.json might not have a field name,
which was causing a crash.
2017-11-22 15:34:40 -06:00
Åke 799ff1d231
Merge pull request #1248 from MycroftAI/feature/min-wait-time
Increase min wait time in wait_while_speaking()
2017-11-22 20:33:21 +01:00
Michael Nguyen 4c6b57c5c5
Merge pull request #1197 from forslund/feature/audioservice-update
Feature/audioservice update
2017-11-22 13:27:15 -06:00
penrods 55b3f20bf3 Increase min wait time in wait_while_speaking()
In code like this:
   self.speak_dialog("something")
   mycroft.audio.wait_while_speaking()
It was possible that the speaking of "something" would take longer to
start than the 0.1 seconds that was built into the wait_while_speaking().
The definition of this behavior is slightly fuzzy, but this is definitely
a case where the expectation is that previous request for speech would
start and complete.  For now, I have just bumped the minimum wait to
0.3 seconds.

In the long run we might consider tracking specific speak requests and
generating a notification when that request has been serviced.  Then the
skill could automatically hold off until that request has been serviced.
But the basic skill code won't have to change to make this happen, so
this additional sleep is adequate for today.

Also snuck in a minor change to a comment.
2017-11-22 13:21:23 -06:00
Matthew D. Scholefield 4c0ba6869e Add unit tests for messaging 2017-11-22 13:03:50 -06:00
Matthew D. Scholefield 0cf5c44f7c Add send_email method to skills 2017-11-22 13:03:50 -06:00
Åke 7ac43bd1e2
Merge pull request #1244 from MycroftAI/feature/mycroft-mic-listen
Add 'mycroft.mic.listen' messagebus command
2017-11-22 09:35:52 +01:00
penrods 6463b9a92d Add 'mycroft.mic.listen' messagebus command
Add support for 'mycroft.mic.listen' on the messagebus to trigger the system
to listen for STT processing.  This can be posted on the messagebus by outside
systems, such as a physical or GUI Listen button.
2017-11-21 22:45:12 -06:00
penrods 0b69b056e3 Add support for non-string keys, also
This handles the edge case of things like { 3 : "abc" }.
2017-11-21 11:34:04 -06:00
penrods 88ff31397b Fix dialog renderer
The recent change to remove Pystache introduced a bug in cases where
the passed-in key/value data included non-strings for the value.  This
showed up in the weather skill which passed in "lat" and "lon" as floats.
Now the value is explicitly converted using str().
2017-11-21 11:34:04 -06:00
Åke cb3de9affa
Merge pull request #1242 from MycroftAI/feature/viseme-sync
Improve mouth synchronization with speech
2017-11-21 13:02:05 +01:00
Åke Forslund 2c3e5c3885 Minor correction of mouth_visime docstring 2017-11-21 12:41:36 +01: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 421c37f572
Merge pull request #1226 from ahayworth/feature-replace-google-tts-with-cloud-speech
Add Google Cloud Speech API STT
2017-11-20 09:53:00 +01:00
Åke ed061df519
Merge pull request #1223 from MycroftAI/feature/improve-metrics-naming
Improve accuracy of metrics naming
2017-11-19 08:19:43 +01:00
Åke Forslund f23ba5197e Remove all mycroft packages individually
Autoremove don't seem to be reliable enough. This will remove the
required packages individually.
2017-11-19 00:24:48 -06:00
penrods 1d4c614a36 Enhance CLI and screen corruption fix
Several refinements:
* Remove the "What time is it" preloaded example
* Page up/down now moves by 1/2 the # visible log lines instead of always 10 lines
* Reduce the frequency of full-screen redraws to 10 secs instead of 5 (because less needed with the corruption fix)
* Add the version of mycroft-core in the upper-right corner
* FIX: screen redraw now uses a lock, preventing corruption from drawing simultaneously from multiple threads
2017-11-17 19:25:16 -06:00
Åke fd1fb1b527
Merge pull request #1235 from MycroftAI/bugfix/remove-pystache
Remove pystache
2017-11-17 09:25:57 +01:00
Matthew D. Scholefield b4226ff27b Remove pystache
On certain platforms it escapes quotes which causes problems. Since we only use it for something as simple as key value replacements, it doesn't make sense to include it as a dependency
2017-11-17 01:36:40 -06:00
Andrew Hayworth 6325c7ae7b Add replacment for Google TTS via Google Cloud Speech API
As noted on the Chromium Dev How-to [1] and on the
SpeechRecognition library docs [2], the Google TTS API
is really not the right API to call. While it's simple,
and allows you to authenticate via a simple token, it is
also limited to a max of *50* requests per day.

That's not a lot. I don't think many people will find that
useful, outside of quick testing (if they can even get an
API key - I couldn't figure out how to generate one that
worked correctly).

This commit introduces a new STT backend, google_cloud, so that
the Google STT backend can be deprecated eventually. To do so, we
needed to:
- Install the Google API Client Library
- Create a new STT class which knows how to turn a provided Google
  JSON credentials file into a string (the SpeechRecognition library
  expects you to pass in the JSON string, not a file path, nor an object).

Any person wishing to use this will need to:
- Enable the Cloud Speech API on the Google Cloud Platform console
- Create a new Service Account Key, and download the credentials to
  a secure location
- Configure that location in mycroft.conf, like so:

  "stt": {
    "google_cloud": {
      "credential" {
        "json": { contents of downloaded credentials }
      }
    }
  }

It's worth noting that the Cloud Speech API has a free quota of
60 minutes per month, which would probably stretch further than 50
individual requests. So for hobbyists, it should be nothing but
a net benefit.

[1] http://www.chromium.org/developers/how-tos/api-keys
[2] https://github.com/Uberi/speech_recognition/blob/master/reference/library-reference.rst#recognizer_instancerecognize_googleaudio_data-key--none-language--en-us-show_all--false
2017-11-15 22:10:00 -06:00
Matthew D. Scholefield 168a2b660f Improve accuracy of metrics naming
- md5 is consistent across architectures
 - Account ID is now consistent per user. Previously was using the device id
2017-11-15 19:35:53 -06:00
Åke f656373719
Merge pull request #1219 from MycroftAI/bugfix/enable-learn-typo
Fix typo when enabling learn
2017-11-12 15:28:58 +01:00
Matthew D. Scholefield 66540d9a9b Fix typo when enabling learn 2017-11-10 12:34:34 -06:00
devs-mycroft 4bf93486af Version bump from 0.9.5 to 0.9.6 2017-11-10 15:38:51 +00:00
Åke Forslund 1093dc0ef0 Handle missing messagebus in a correct way
==== Tech notes ====
The send script will throw an IOerror exception if the bus service isn't
started. This correctly catches it and emits a single warning.
2017-11-10 15:27:17 +01:00
Åke Forslund bfa26e6916 Fix issues reported by codacy 2017-11-10 10:24:59 +01:00
Åke Forslund 8527074ee3 Refactor audio service
====  Tech Notes ====
- Encapsulate the audio service into a class to reduce the number of
global variable.
- Remove redundant code
2017-11-10 10:24:59 +01:00
Åke Forslund 441436adbf Add queue command to audio service
==== Tech Notes ====
queue command will start playback if no playback is running.
mpg123 and vlc services updated support queueing tracks while playing

==== Protocol Notes ====
mycroft.audio.service.queue message added
2017-11-10 10:24:59 +01:00
devs-mycroft fda6b98fd5 Version bump from 0.9.4 to 0.9.5 2017-11-10 05:46:21 +00:00
penrods a4db13a640 Remove one more subshell 2017-11-09 15:55:00 -06:00
penrods 4c9bbee680 Remove usage of bash subshell in MSM
Remove usage of bash subshell in MSM for invocation of the
mycroft.message.send module.  The virtualenv wouldn't be created in that
subshell, breaking Github-style installs of Mycroft.
2017-11-09 15:55:00 -06:00
penrods 38d7a99b93 Remove offensive spaces
Bash likes "rc=$?", not "rc = $?"
2017-11-09 15:55:00 -06:00
Åke 01d47fb849
Merge pull request #1199 from MycroftAI/feature/precise
Precise Wake Word Listener
2017-11-09 21:27:46 +01:00
Matthew D. Scholefield ec223dcec9 Add wake word module hash to filename 2017-11-09 13:58:44 -06:00
Åke Forslund bcd88c07ce Move session config from global scope
====  Tech Notes ====
As soon as mycroft, mycroft.api or mycroft.skills.core were imported the
configuration was loaded (including reaching out to the web config).
This will reduce unneccessary configuration loadings and make it easier
to handle configuration in the tests.
2017-11-09 13:55:38 -06:00
Åke Forslund b08cf2bf42 Add tests for creating pocketsphinx hotwords
Default to pocketsphinx when hotword config doesn't hit a predefined
hotword config
2017-11-09 13:54:48 -06:00
Matthew D. Scholefield ed1deeb259 Make bool assignment more concise 2017-11-09 13:36:03 -06:00
Matthew D. Scholefield 5694b7f645 Extract precise server settings into config file
This allows changing the server in the future without an upgrade
2017-11-09 13:36:03 -06:00
Matthew D. Scholefield 788dc5d492 Fix downloading precise every startup 2017-11-09 13:36:03 -06:00
Matthew D. Scholefield b3f11d849a Add Precise hotword engine 2017-11-09 13:36:03 -06:00
mycroft-developers 558179a1bd
Merge pull request #1215 from MycroftAI/feature/fix-requirements
MSM rerun of skill requirements.txt once per session
2017-11-09 13:16:17 -06:00