Commit Graph

185 Commits (5f49ffa23f0a31a543e921fff16b62c0ded680ea)

Author SHA1 Message Date
Kévin C f0869dcf31
Merge branch 'dev' into dev 2018-02-15 12:51:45 +01:00
Åke ed6ab224c9
Merge pull request #1422 from forslund/feature/munge-keywords
Make keywords per skill to fix overlapping keyword names
2018-02-15 09:57:03 +01:00
Åke Forslund 364dce2c66 Update test cases to handle munged values 2018-02-15 09:28:56 +01:00
Michael Nguyen 50c7ab6c6e
Merge pull request #1364 from forslund/bugfix/scheduled-event
Bugfix/scheduled event
2018-02-13 22:34:51 -06:00
Augusto Monteiro 2b1e5b2714
Merge pull request #1400 from forslund/feature/swedish-lang-utils
Add format and parsing methods for swedish
2018-02-13 09:38:15 -03:00
Cakeh 85a13309e9 fix codacy issues 2018-02-12 12:21:07 +01:00
Cakeh c1918da9cb Add fr support for ordinal numbers and time qualifiers 2018-02-12 12:02:54 +01:00
Cakeh c45d228d91 Issue-1411 - Leave all nice_number formatting to language 2018-02-12 12:02:04 +01:00
Cakeh fcbf2eae9e Correct issues found by Codacy 2018-02-08 22:20:56 +01:00
Cakeh 3a11f39d7d Issue-1375 - Fix and complete french translation 2018-02-08 21:46:24 +01:00
Åke 708d3ecce1
Merge pull request #1412 from MycroftAI/feature/fix_nice_time
Fix bug in nice_time() for times before noon
2018-02-08 14:08:42 +01:00
Ale 27f974c3fe inserted new italian functions adapted from en
Add new tests for nice_time() and pronounce_number()
2018-02-08 10:58:36 +01:00
penrods 420b21e40e Fix bug in nice_time() for times before noon
Bonehead copy/paste and testing gap left a bug that reported things
like "negative 11 o'clock"
2018-02-08 01:29:05 -06:00
Åke Forslund a11b093e4d Add format and parsing methods for swedish 2018-02-01 15:32:08 +01:00
Åke b2af245554 Add match_one fuzzymatching function (#1372)
match_one finds the closest match for a query in a list or dictionary of
possibilities.
2018-02-01 01:52:14 -06:00
Åke Forslund 044c4c3c0f Fix broken test and codacy warning
- Restore nice_number_it
- Fix codacy warning about overriding str
- Fix octal representation of times in convert_time test
2018-01-31 14:09:06 +01:00
penrods 6dbf1e72d7 Add formater for numbers and time
Add support for:
* mycroft.util.format.nice_time()
* mycroft.util.format.prounce_number()
* implemented unittests for above

Also renamed the helper method convert_number() to
_convert_to_mixed_fraction()
2018-01-31 05:30:01 -06:00
Ale c56b293d3d Update italian parsing methods
Add extract_datetime_it
Add tests for italian methods
2018-01-29 09:47:10 +01:00
Ale 158b25170b translate italian functions for format.py and parse.py based on pt_pt job (#1363)
Add basic functions for Italian language

- nice_number()
- extract_number()
- normalize()
2018-01-25 15:58:32 +01:00
Åke Forslund 6c4f485323 Make handlers for single scheduled events one shot
- add_event() now accepts the parameter once, registring the event as a one shot event.
- remove_event for non-existing events is handled
- added a test for this
2018-01-16 17:39:51 +01:00
Åke Forslund 979b72c2df Add basic tests for add/removing event methods
Basic tests for:
- add_event
- remove_event
- schedule_event
- cancel_scheduled_event
2018-01-16 15:46:11 +01:00
Michael Nguyen f48068a50c
Merge pull request #1356 from forslund/test/separate-langs
Split the test_parse.py by language
2018-01-12 02:49:12 -06:00
Åke Forslund 35a5528a48 Split the test_parse.py by language
- switch over to utf-8 encoding for all the files
2018-01-10 16:21:28 +01:00
Jarbas 905e5397ed bing + houndify stt (#1229)
Add bing and Houndify stt backends
2018-01-09 13:41:26 +01:00
Åke Forslund 0114ce473e Split format.py and parse.py per language
Move the language specific functions and constants into separate files.
This will avoid many unnecessary conflicts due to involuntary encoding
changes.
2018-01-08 17:08:31 -06:00
aleale99 aa8f7a8e4b
minor correction on file
typo error on class name and constant name
2017-12-29 11:17:22 +01: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
Michael Nguyen 305825369f fixed unit test 2017-12-20 15:59:09 -06:00
Augusto Monteiro e3243e2a62
Merge pull request #1307 from forslund/bugfix/extract_datetime
Minor fix of extract datetime
2017-12-19 15:15:22 -05:00
Åke Forslund b7f5bd2dc4 Fix failing test (changed limit) 2017-12-15 13:03:57 +01:00
penrods 5a12fc471c Add new parse function fuzzy_match (take 2)
A fuzzy_match() produces a basic ratio match of two strings.
The result is between 0.0 and 1.0, where 1.0 is a perfect
match.
2017-12-15 05:54:14 -06:00
Åke Forslund 7b091e9b46 Add failing test cases for extract_datetime
- "tonight" isn't handled
- sentences containing nothing but a date throws an exception ("december 3")
2017-12-12 08:32:54 +01:00
jarbasai aa4d3a47cf pep8 strikes again 2017-12-12 03:22:11 +00:00
jarbasai 8f895118ce fix pt-pt tests TODOs 2017-12-12 02:32:44 +00:00
Åke Forslund fa430f2ec1 Correct test coverage
Previously the coverage counted the entire mycroft core including things
such as the docs and the tests themself. The inclusion of the actual
tests in the coverage metric scewed the metric quite a bit and the
inclusion of irrelevant files made the information presented by
coveralls cluttered.
2017-12-07 02:45:52 -06: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
Matthew D. Scholefield 4c0ba6869e Add unit tests for messaging 2017-11-22 13:03:50 -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
Å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
Åke Forslund baa5fbeff4 Fix file docstring. 2017-11-03 08:10:12 +01:00
Åke Forslund 6e4d91578b Add test for sending event 2017-11-03 08:10:12 +01:00
Åke Forslund 82b1e48571 Mock loading scheduler data 2017-11-03 08:10:12 +01:00
Åke Forslund 3004aada98 Add test cases for EventScheduler class
====  Tech Notes ====
- Add test cases
- Slight refactoring of EventScheduler class to make it easier to test
2017-11-03 08:10:12 +01:00
penrods 46a6787ed8 One more PEP8 2017-10-27 17:48:11 -05:00
penrods 683a226f42 PEP8 pickiness 2017-10-27 17:44:37 -05:00
penrods 72dbf83835 Fix PEP8 and unittest errors from PR 1049
PR 1049 introduced several cosmetic PEP8 errors that were easily fixed.
Additionally there are unittests that include non-ASCII characters which are
failing.  As Pt-PT support is a work-in-progress, I just commented them out
with TODOs next to them.
2017-10-27 17:39:05 -05:00
Jarbas e189dd97d9 Pt-PT translation (#1049)
Portuguese translation helpers!
2017-10-26 19:18:00 -04:00
Åke Forslund 1f4c98f29c Fix PEP-8 2017-10-26 19:02:32 -04:00