Commit Graph

63 Commits (c140d5b8890e56f840e1fa7aa1e631d547a49329)

Author SHA1 Message Date
Åke Forslund a2993e4ba6 Remove backwards compatibility with python 2.7 2018-04-27 08:51:47 -05:00
Åke Forslund 851e3b2aa4 Add comments and docstring for the send method
Add docstring explaining the basics of the send method.
2018-04-05 11:20:55 +02:00
Matthew D. Scholefield 9f843993b6 ETags support for all requests 2018-04-03 17:01:03 -05:00
Matthew D. Scholefield eb100706df Add proper messages when the backend replies incorrectly 2018-03-28 11:48:05 -05:00
Michael Nguyen 7692389317 remove logs 2018-03-22 13:33:10 -05:00
Michael Nguyen 6dbb2182ff added mycroft deepspeech factory in stt 2018-03-22 13:28:24 -05:00
penrods c88447a274 Add code to load appropriate config pieces 2018-01-08 17:09:58 -06:00
penrods 5fd05ad509 Add platform type/build to info sent to register
Add platform information (type and build #) to the messages
send to the server to pair and to update version info.
2018-01-08 17:09:58 -06:00
Matthew D. Scholefield f56a2def72 Revert "Merge pull request #1305 from MycroftAI/feature/send-platform"
This messes up Pairing so it will be reverted until there is a backend
change to support it

This reverts commit 71611ca6be, reversing
changes made to c7da63c536.
2017-12-22 14:43:55 -06:00
Åke 71611ca6be
Merge pull request #1305 from MycroftAI/feature/send-platform
Add platform type/build to info sent to register
2017-12-22 18:46:33 +01:00
penrods e4ca6e3a64 Add code to load appropriate config pieces 2017-12-22 02:34:01 -06:00
Åke 277e8bc506
Merge pull request #1320 from forslund/feature/oauth-token
Add oauth token endpoint to device api
2017-12-21 17:56:43 +01:00
Åke Forslund 2c0237cb8d Add oauth token endpoint to device api
When a token has been generated for the provided developer credentials
id the method will return it as json, if it doesn't exist HTTPError will
be raised (404 not found)
2017-12-21 14:52:48 +01:00
Åke Forslund 5c47ed8cd8 Allow aarch64 architecture to download arm binary
aarch64 linux systems should provide backwards compatibility for armv7
compiled binaries.
2017-12-20 15:46:33 -06: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
penrods f16dae18a2 Add platform type/build to info sent to register
Add platform information (type and build #) to the messages
send to the server to pair and to update version info.
2017-12-13 02:54:19 -06:00
Matthew D. Scholefield be638de12b Add general metrics 2017-11-22 23:39:14 -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
Matthew D. Scholefield 0cf5c44f7c Add send_email method to skills 2017-11-22 13:03:50 -06:00
penrods 433729a62f Fixes for startup when not paired
Several attempts to connect to the backend fail before pairing has
been completed, which was producing errors that prevented the
messagebus and audio services from starting up.

Now the DeviceApi().is_subscriber property returns False if the
check fails, assuming unpaired == not subscribed.

Also stopped logging the call stack on the HTTPError exception, it
made an expected situation look like a major crash.
2017-10-27 21:06:08 -05:00
Åke Forslund b067e31e54 Fix failing travis and codacy
====  Tech Notes ====
- removed old main.py
- replace reference to ConfigurationManager in api tests
- reset configuration after use in configuration test
- Pep-8 issue
2017-10-26 19:02:32 -04:00
Åke Forslund 3e878bd59f Replace ConfigurationManger with Configuration 2017-10-26 19:02:32 -04:00
Åke Forslund ea020eab4f Refactor configuration handling
====  Tech Notes ====
- Rewrite of configuration module. Reduced number of calls and simplified
logic.
- Patched configs now survives reload of config
2017-10-26 19:02:32 -04:00
Åke Forslund 7990e168c8 Properly get link for premium voice
====  Tech Notes ====
Add the implemented endpoint for getting the download link for premium
voices.
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
Augusto Monteiro 'Sparky e39c38ff3c Updating version when device is update 2017-10-11 14:36:12 -05: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
Åke Forslund cc3a33aa77 Remove debug prints 2017-09-14 14:29:40 +02:00
Åke Forslund 0d4a841d4e Make test_api slightly more robust 2017-09-14 11:01:32 +02:00
esoleyman c8c5afdeaf Change instance of ConfigurationManager().get to ConfigurationManager.get 2017-09-13 10:41:02 -05:00
Åke Forslund e40ad7e4dc Add subscription endpoint to DeviceApi
====  Tech Notes ====
The DeviceApi now has a `get_subscription()` method returning the entire
subscription structure and the property `is_subscriber` returning True
if the device is connected to a paying account and False if it's a free
account.
2017-08-15 09:03:30 +02:00
Ethan Ward c9893806ea #824 Change has_been_paired to load the current identity file (#825)
* Change has_been_paired to load the current identity file

* Add clarifying comment and fix pep8
2017-06-13 17:32:14 -05:00
Åke Forslund b38af90fac fix pep8 2017-06-13 14:17:21 +02:00
penrods 582b77891e One more pass at onboarding, including a major bug fix:
* BUGFIX: The big bug was calling is_paired() during wake_word_in_audio().  When not paired, that call hit the server, taking about a second.  Since it happened multiple times a second, the audio buffers got backed up hugely.  This resulted in weird behavior later as the buffers get cleared out.
* Added mycroft.api.has_been_paired(), which just looks for the pairing key (it does not validate it is still active with the server, like is_paired())
* The enclosure now checks for internet connectivity and kicks off the wifisetup process, not the wifisetup client itself.
* During the "onboarding" process, the microphone is muted using the new "mycroft.mic.mute" message.  After pairing completes, the "mycroft.mic.unmute" is expected to be sent from the pairing skill.  Unmuting again after a re-pairing is harmless.
* mute_and_speak() is smart enough to not unmute itself when complete if muted before
* util.check_for_signal() now accepts -1 as the lifetime.  This means it never times out.
* util.stop_speaking() is more intelligent about shutting down the spoken text (including text that has been split at periods) and visemes
2017-06-13 05:35:06 -05:00
penrods 84dd10e243 Fixing pep8 whitespace errors... grrr 2017-06-07 11:45:06 -05:00
penrods ffc3f6ec60 Implementing changes to out-of-the-box experience, providing an "onboarding" process.
* Added a mycroft.api.is_paired() method
* Added mycroft.util.is_speaking and mycroft.util.wait_while_speaking() methods
* RESET now waits for the spoken notice to complete
* Stopped the "Checking for updates" and "Skills updated" prompts (commented out for now, probably will eliminate)
* Wifi setup filters out hidden ("x00") networks
* Visemes should keep up better if they get behind (will skip)
* Mimic is now searched for on the users path
* Onboarding process:
  - wifi setup starts automatically
  - User is walked through the process
  - wake word and button pressing are ignored
  - At end, a short tutorial is given
2017-06-07 11:45:06 -05:00
Augusto Monteiro 'Sparky 346a314c98 - Device api find is passing self to get 2017-05-18 16:53:10 -03:00
penrods 99b7280e24 Renaming DeviceApi.find() to DeviceApi.get()
Developers do not expect a function called "find" to execute an API request, this is a "get".  (I verified this with several other devs.)  Renamed and added a Deprecated comment for now.  Also:
* Added missing standard mycroft-core copyright.
* Added docstrings for basic objects and the STTApi in particular.
2017-05-18 16:51:54 -03:00
Arron Atchison de00192dc6 all lil peps fixed 2017-02-15 15:37:52 -06:00
Augusto Monteiro 540cd893c2 #487 - Integrating location microservice with mycroft core 2017-02-01 23:40:13 -03:00
Augusto Monteiro d13b539644 #452 - Ensuring that refresh_token is an isolated method to avoid duplication
- Storing old_params on self
- Reordering methods
- Removing 403 check on get_response
2017-02-01 23:40:13 -03:00
Augusto Monteiro bfc47bc16a #452 - Refresh token if request return unauthorized 2017-02-01 23:40:13 -03:00
Steve Penrod 746bc0bd88 Fixes issue #461 (#462)
Changed the default network timeout to just over 3 seconds to establish the connection, then 15 seconds for all reads.  These values are as per the suggestion of http://docs.python-requests.org/en/master/user/advanced/.
2017-01-20 15:49:23 -06:00
Augusto Monteiro 66e63e5616 Issues 391 - Refactoring VersionManager 2016-12-17 10:27:01 -05:00
Augusto Monteiro 56456090be Issues 391 - Sending core and enclosure version to tartarus 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans a5d8b6112b Issues 350 - Ensuring repairing process 2016-12-17 10:27:01 -05:00
Matheus Lima 1a1599147f Issues 383 - Adding limit parameter to Google STT Integration 2016-12-17 10:27:01 -05:00
Augusto Monteiro ce7c385bfd Issues 380 - Creating method on DeviceIdentity to check if is expired 2016-12-17 10:27:01 -05:00
Augusto Monteiro 10931a8649 Issues 380 - Implemeting refresh token 2016-12-17 10:27:01 -05:00