Commit Graph

458 Commits (f0caf4255139a991c9ff59e10ae276fd866e9059)

Author SHA1 Message Date
Åke Forslund 1c5da3e25d Move messagebus test to integration tests 2017-08-17 02:05:02 -05:00
Art McGee 828d305e6c This tests the messagebus for mycroft.
This is just a basic test of sending between websocket clients.  It makes sure the message gets to the other side. It doesn't check for correct ness.  More testing sure could be done.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-08-17 02:05:02 -05:00
Åke Forslund 4157585c0a Move lock tests into unittest directory 2017-08-17 02:05:02 -05:00
harika 173bee9f95 Fixed pep8 format 2017-08-17 02:05:02 -05:00
harika 4c3dd3aa7c Updating skill_tester to automate skills testing(regression) 2017-08-17 02:05:02 -05:00
harika 632df2a498 Update tests 2017-08-17 02:05:02 -05:00
harika cbbe3fe1cd __init__.py must be present 2017-08-17 02:05:02 -05:00
harika e2811ccde2 added some stuffs --arron says it's awesome! 2017-08-17 02:05:02 -05:00
Åke Forslund c8dd1a9b46 Make discover test directory settable
The skill directory can be specified when calling the discovery_test

`PYTHONPATH=./ python test/integrationtests/skills/discovery_test.py
 SKILL_DIR`
2017-08-17 02:05:02 -05:00
Åke Forslund f0a7a71e01 Fix shutdown error.
None type can be in skill list
2017-08-17 02:05:02 -05:00
Åke Forslund 39d0451143 Separate tests into unittests and integrationtests 2017-08-17 02:05:02 -05:00
Åke Forslund 949c3f91f4 Cleanup
- Load skills only once
- Fix find skill name method
- pep8 fix
2017-08-17 02:05:02 -05:00
Åke Forslund 73c53aa8ea Hackish first step to getting skill tester up and running 2017-08-17 02:05:02 -05:00
Åke Forslund ddb514e470 Add basic tests for context manager 2017-08-15 21:27:19 -05:00
Åke e7c55aaa43 Merge pull request #933 from MycroftAI/feature/skill-configuration
Feature/skill configuration
2017-08-02 08:57:28 +02:00
Michael Nguyen 48b26d1fbd added new test and put back is_stored property 2017-08-01 13:52:51 -05:00
Åke Forslund 68506cb519 Add basic tests for audio service 2017-07-31 13:37:17 +02:00
Michael Nguyen 1e8ee03674 fixed pep8 issues 2017-07-27 16:38:24 -05:00
Michael Nguyen 37ada28dbd refactored skill settings and fixed test 2017-07-27 16:28:32 -05:00
Connor Penrod 41698d4dbe Adds the ExtractDateTime parse function from Christopher (plus relevant tests) (#866)
Adds the ExtractDateTime parse function from Christopher.  When imported from mycroft/util/parse.py, it'll take a sentence like "What's the weather like 5 weeks from next Wednesday?" and will extract a python datetime object for that date.

* Added requirements.txt change for importing dateutil
2017-07-10 15:33:21 -05:00
Michael Nguyen f361392628 Merge branch 'dev' of https://github.com/MycroftAI/mycroft-core into feature/skill-configuration 2017-07-06 12:40:50 -05:00
Michael Nguyen bf48d7b6fb [WIP] need to implement PATCH 2017-07-06 12:40:21 -05:00
Matthew D. Scholefield e11bb52853 Fix wake up 2017-07-05 17:11:26 -05:00
Matthew D. Scholefield c2b2134a12 Make Wake Word detection modular (#876)
This separates Pocketsphinx into its own class allowing other wake word recognizes to be switched in easier.
2017-07-05 14:26:34 -05:00
Michael Nguyen de51d9aa4e fixed test 2017-07-05 10:10:09 -05:00
Augusto Monteiro 8629bb9e71 Merge pull request #837 from forslund/bugfix/issue-836
Allow service to reload as intended
2017-06-26 16:10:41 -04:00
Åke Forslund 5ac2e5f51e Check if settings have changed with simple hash 2017-06-22 08:36:33 +02:00
Åke Forslund 728391427e Add test for PID locks
Catch IOError in delete method if pid-file doesn't exist
2017-06-16 14:17:43 +02:00
kfezer 3988da5ffb Merge pull request #692 from forslund/feature/issue-691
#691 - adding setting per skill
2017-05-30 16:47:33 -07:00
kfezer 6e00b43acf Merge pull request #793 from ProsperousHeart/dev
Adding Extraction of Numbers
2017-05-30 15:10:13 -07:00
ProsperousHeart ae5d6273bc PEP8 Fix To Test File 2017-05-30 16:18:11 -05:00
ProsperousHeart 5ad8e4ac74 Adding Extraction of Numbers 2017-05-25 18:31:43 -05:00
Ashwin Venkatesan 98e6847282 modify test to use 'a' if numerator is 1 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan 1793757e60 Fix pep8 issues 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan 968c51dd69 Add test for non speech nice number format 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan e7e29b2edd Add tests for nice_number formatting 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan fdae0a08a2 Add simple vulgar fractions test 2017-05-25 11:43:05 -07:00
Åke Forslund b8b05e6543 Add unittest for SkillSettings 2017-05-20 08:29:27 +02:00
SoloVeniaASaludar f7b790b660 + 2017-05-18 16:53:10 -03:00
Åke Forslund 3710c4e58d Add __init__ to test/util to activate tests in that subdir 2017-05-18 16:51:17 -03:00
Åke Forslund 11391557f5 Ensure that signal directory exists when creating signal.
Also add test cases for ipc signals
2017-05-18 16:51:17 -03:00
Åke Forslund ac05fd4fd0 Add coverage with nose2 and coveralls 2017-05-18 16:51:17 -03:00
Åke Forslund ce554d06cf Disable maxAudioWithBaselineShift test (works locally but not on travis) 2017-05-18 16:49:07 -03:00
Åke Forslund 06e352476d Disable tests requiring pairing 2017-05-18 16:49:07 -03:00
Åke Forslund bc744c3476 Fix pep8 2017-05-18 16:49:07 -03:00
Åke Forslund 0284103492 Disable failing tests for now while unittests are re-enabled 2017-05-18 16:49:07 -03:00
Åke Forslund 63ce4ced02 Remove pairing skill test since it's not part of core 2017-05-18 16:49:07 -03:00
Åke Forslund cb4ce7e481 Replace GoogleSTT with MycroftSTT 2017-05-18 16:49:07 -03:00
Åke Forslund cd088415d0 Fix init of local recognizer 2017-05-18 16:49:07 -03:00
Åke Forslund 028e0bf56d Both date formats tested. 2017-05-18 16:49:07 -03:00
Åke Forslund 2180c1872d Add dedicated directory for empty directory tests. 2017-05-18 16:49:07 -03:00
Åke Forslund 26b3423fb2 Correct test criteria for time format for scheduled skill.
Now matches current behaviour, previous behaviour is not a good idea since it depended on Locale.
2017-05-18 16:49:07 -03:00
Åke Forslund a56d8146a3 record.wav amplified.
Record test failed due to low signal in record.wav
2017-05-18 16:49:07 -03:00
Åke Forslund 484d4a9ce3 Move ignore SIGCHLD to entry points.
Ignoring SIGCHLD trips up unittests, this was done as the unittest loaded mycroft.skills.core
2017-05-18 16:49:07 -03:00
penrods 35a213d4db The configuration values were poorly documented. See issue #653
This addresses this in several ways:
* Created mechanism to load 'commented' JSON (using '//' or '#' comments on a single line)
* Embedded comments into the mycroft.conf, indicating use, legal values, and where they get overridden
* Create ConfigurationManager.instance() static method to replace ConfigurationManager.get().  This produces more readable code like:
  ConfigurationManager.instance().get("value") instead of ConfigurationManager.get().get("value")
* Made _ConfigurationListener 'private'
* docstring'ed things
2017-04-13 01:09:50 -07:00
Augusto Monteiro 0901f1bafc #539 - fixing pep8 2017-03-14 13:43:45 -05:00
penrods eafcc1abfb Several extensions to text normalization:
* intent_failure message now carries along the utterance's lang code
* normalizing query for Wolfram Alpha
* added normalization of "whats" to "what is".  This is technically incorrect ("whats" means more than one instance of "what", as in "the whats and whys of open source"), but that is a rare phrase.  Unfortunately, several STT engines incorrectly output things like "whats 8 + 4", which is grammatically incorrect.  So we'll handle the common and potentially screw up the uncommon.
* more parsing test cases, including a few corrections
2017-03-14 13:43:45 -05:00
penrods cfa79e03a2 Fixes issue #539
The utterance is now placed on the bus along with its language code.  If not specified, it uses "en-us".

Added a new mycroft.util.parse module.  It contains the normalize() function.  Normalization currently does two things:
  * Expands contractions ("they're" -> "they are", etc)
  * Optionally removes articles ("a", "an", "the").  Removing is the default.
  * Textual numbers become digits, up to 20.  E.g. "What is the weather in four days" becomes "What is weather in 4 days".

NOTE:  This is potentially a breaking change!  Remove "the", "a" and "an" from your .voc files!

Skill changes:
  * I cleaned up the .voc files for the default Skills.
  * Split the date_time keyword into an extra entity.  Now a "QueryKeyword.voc" exists, with "what|tell" instead of combing that into "what is time" in the TimeKeyword.voc.
  * Volume skill now accepts 1-11, e.g. "turn volume to 11"
2017-03-14 13:43:45 -05:00
Åke 9d9ab7b826 Test allow test to finsh immediately (#453)
Add cleanup procedure to skills:
MycroftSkill cleanup does nothing, ScheduledSkill will cancel running timers to make sure it's not blocking termination.

Tests updated to use this allowing unit test to exit after completion.
2017-01-20 15:50:00 -06:00
Jonathan D'Orleans 416191e598 Issues 350 - Synchronizing local and remote configuration 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 4c1ba4e337 Issues 356 - Rebasing with master 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 14c6eae264 Issues 356 - Integrating Listener with STT modules 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans c71c054258 Issues 351 - Creating STT module and classes 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans ccceb62b7a Issues 351 - Renaming metadata to data and simplifying data usage 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 348cc3fac0 Issues 351 - Renaming message_type to type 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 935e2699ba Issues 351 - Merging metrics with server configuration 2016-12-17 10:14:42 -05:00
Jonathan D'Orleans 3304474a22 Issues 354 - Pairing device with remote server
- Getting pairing code from server
- Treating Api response after request
- Simplifying enclosure mouth events control, upgrade and test process
2016-12-17 10:12:10 -05:00
Ethan Ward b60bd99e79 Fix unused imports (#296) 2016-07-18 15:45:11 -05:00
Ethan Ward 743c430996 Update test coverage to include loading vocab (#294)
* Issues #226 - Add tests for adding vocab

* pep8

* Issues 226 - Update tests

* Issues #226 - Remove debug lines
2016-07-18 15:44:36 -05:00
Matthew D. Scholefield a43b7b3ace Add new listener config options- Fixes #260 (#266)
* Added new listener config options

* Fixed audio unit tests
This adds a cleareraudio file for the wakeup test and changesto the new LocalRecognizer constructor

* Added .dict files to .gitignore
This is because they are now auto-generated on startup rather than stored permanently

* Fixed audio accuracy test for new LocalRecognizer constructor

* Added support for spaces in wake word config
In the phonemes a new word is indicated by a period character. The separating of the words actually changes the way pocketsphinx interprets the sound of it and in this case improves it

* Fixed unit test
2016-07-07 18:24:52 -05:00
Matthew D. Scholefield 9405dce4d9 Decreased "wake up" false positives - Fixes #189 (#252)
* Increased kws threshold for the wakeup_recognizer

* Fixed pep8 in listener

* Fixed unit tests
2016-06-30 14:22:53 -05:00
Matthew D. Scholefield e626f5490f Added more tests to EnglishQuestionParser (#251)
* Added more tests

* Changed example verb in question parser test
2016-06-30 15:14:32 -04:00
Ethan Ward 90905d526c Issues 108 - Change regex to be localized (#222)
* Issues 108 - Add load_regex_files

* Issues 108 - Update weather skill with new regex syntax

* Issues 108 - Update stock skill with new regex syntax

* Issues 108 - Add stock regex file

* Issues 108 - Update time skill to use new regex syntax

* Issues 108 - Update desktop skill to use new regex syntax

* Issues 108 - Update volume skill to use new regex syntax

* Issues 108 - Update wikipedia skill to use new regex syntax

* Issues 108 - Update spelling skill to use new regex syntax

* Issues 108 - Update sms skill to use new regex syntax

* Issues 108 - Update calling skill to use new regex syntax

* Issues 108 - Remove unused argument

* Issues 108 - Add unit tests

* Issues 108 - Minor changes to fix tests

* Issues 108 - Preserve intended test logic

* Issues 108 - Address feedback

* Issues 108 - Update test formatting

* Issues 108 - Change file location
2016-06-28 16:20:48 -04:00
Matthew D. Scholefield eed03f3036 Added new compiled regex for "what's" in wolfram - Fixes #159 (#235)
* Added new compiled regex for what's
This is for verbs that don't have a space between the question word and verb

* Added support for 'whats' in wolfram

* Added tests for the EnglishQuestionParser
2016-06-28 15:13:30 -05:00
Ethan Ward 0a89a9016c WA skill will now search again if there is one `didyoumean` in the results (#236)
* Issues 192 - WA skill will now search again with top alternative

* Issues 192 - Add tests for new method

* Issues 192 - Fix pep8

* Issues 192 - Update test syntax

* Issues 192 - Change WA skill to use dialog

* Issues 192 - Address feedback
2016-06-27 17:30:45 -04:00
Ethan Ward 2a5e61bf34 Update scheduled skill formatting (Fixed #158) (#231)
* Issues 158 - Update ScheduledSkill time formatting

* Issues 158 - Add unit tests for new method changes

* Issues 158 - Change to not use date-based implementation to fix tests

* Issues 158 - Address feedback
2016-06-24 18:20:31 -04:00
Jonathan D'Orleans 81be192801 Issues 209 - Keep user configuration by default (#211) 2016-06-23 16:42:46 -04:00
Ethan Ward 9cefb4ee5f Issues 187 - Make Wolfram default to pod 2 (#188)
* Issues 187 - Make Wolfram default to pod 2

* Issues 187 - Add tests

* Issues 187 - Add decimal truncating back

* Issues 187 - Rename method

* Issues 187 - Minor bugfix
2016-06-21 16:16:28 -04:00
Ryan Sipes 159ece558d Revert "Revert "Listener improvements (Fixes #128)"" 2016-06-18 14:00:07 -05:00
Ryan Sipes 32ce7a492f Revert "Listener improvements (Fixes #128)" 2016-06-18 13:21:21 -05:00
Matthew Scholefield a6b0bb632f Fixed unit tests
One unit test, call and response, no longer directly applies. Perhaps we should test that the listener waits for the user to respond however for that I think the 1000 sudio samples would work better.

Another unit test, testing the WakeWord extractor, should be routed through the WakWord extractor directly. For the moment this has been disabled (since it isn't too much a priority because the WakeWord extractor is not used at the moment) but should be a TODO.
2016-06-17 17:55:19 -05:00
Arron Atchison a14ff48f2e Merge pull request #155 from MycroftAI/issues/154
Fix test runner so it only runs once.
2016-06-17 16:11:51 -05:00
Ethan Ward c7f1c81e37 Issue 150 - Add unit tests 2016-06-17 09:44:51 -05:00
Sean Fitzgerald d857a3cc31 Fix test runner to it only runs once. 2016-06-16 10:33:02 -07:00
Ethan Ward 78b917a71f Issues 63 - Ensuring pod.id usage in place of pod.title (#141) 2016-06-14 18:07:24 -04:00
Ethan Ward 30a00d72ca Issues 63 - Add more cases where Wolfram responds (#124)
* Issues 63 - Move result to own method

* Issues 63 - Add first test

* Issues 63 - Update syntax

* Issues 63 - Update syntax

* Issues 63 - Move test file

* Issues 63 - Make __find_value method more consistent

* Issues 63 - Add more extensive tests

* Issues 63 - Comply with pep8 formatting

* Issues 63 - Update test file for pep8

* Issues 63 - Refactor code to reduce size

* Issues 63 - Update for pep8
2016-06-10 17:16:26 -04:00
Jonathan D'Orleans 0e1c0f4589 Issues 96 - Fixing config file location 2016-06-09 18:50:24 -04:00
Jonathan D'Orleans 9b8db944a9 Issues 96 - Updating unit test configuration file 2016-06-09 18:29:37 -04:00
Jonathan D'Orleans fa5893cddb Issues 96 - Configuration
- Raising exception for invalid configuration
- Adding more unit tests
2016-06-09 18:27:04 -04:00
Jonathan D'Orleans 2be81631b8 Issues 96 - Configuration Test
- Adding ConfigurationManager tests
2016-06-09 18:26:20 -04:00
Jonathan D'Orleans 6cfe4a765c Issues 96 - Configuration Test
- Adding AbstractConfigurationTest
- Adding ConfigurationManagerTest
2016-06-09 18:26:20 -04:00
Jonathan D'Orleans e75d51b296 Issues 96 - Adding ConfigurationLoaderTest 2016-06-09 18:26:20 -04:00
Jonathan D'Orleans 8d1373387a Issues 96 - Renaming config to mycroft 2016-06-09 18:26:20 -04:00
Jonathan D'Orleans 42453b69d3 Issues 125 - Running test files without the need of 'test' suffix
- Removing unused 'util' folder
- Migrating test runner to module level __init__.py
- Updating start.sh to run new test file
2016-06-09 17:53:39 -04:00
Jonathan D'Orleans 2698e14f72 Issues 61 - Adjusting silence threshold
- Prevent short words commands such as 'stop' and 'record' to be ignored
 - Adding unit tests for the new silence threshold
2016-06-02 19:31:29 -04:00
Sean Fitzgerald 745d4920e1 More gracefully handle unexpected errors in listener, unit test mock class shouldn't generate unexpected errors. 2016-05-28 14:28:12 -07:00
Ryan Sipes fac834cf4a Merge remote-tracking branch 'refs/remotes/origin/master'
Conflicts:
	mycroft/client/speech/listener.py
	mycroft/client/speech/wakeword_recognizer.py
2016-05-27 11:40:24 -05:00
Jonathan D'Orleans 1fdeb65d1b Issues 14 - Listener Improvements
- Adding headers
2016-05-26 16:55:40 -04:00
Ryan Sipes ffb088ef7b Fixed Pyflakes errors
Fixed Pyflakes errors, had to add exceptions and debugs. May need further work.
2016-05-26 15:28:28 -05:00
Jonathan D'Orleans 11e1230889 Issues 14 - Listener Improvements
- Adding call_response audio test
2016-05-26 16:21:44 -04:00
Jonathan D'Orleans 08d07360da Issues 14 - Listener Improvements
- Renaming methods name to convey more meaning
- Renaming variable names to disambiguate
- Adding description for word extractor test
2016-05-26 16:21:44 -04:00
Jonathan D'Orleans 841fc588a6 Issues 14 - Fixing weather audio filename 2016-05-26 16:21:44 -04:00
Jonathan D'Orleans 41027edc89 Issues 14 - Listener Improvements
- Fixing audio tests
- Adding wakeup audio test
2016-05-26 16:21:44 -04:00
Jonathan D'Orleans a7361ba14a Issues 14 - Listener Improvements
- Fixing audio test type
2016-05-26 16:21:43 -04:00
Jonathan D'Orleans d947a8ec98 Issues 14 - Listener Improvements
- Word extractor refactoring
2016-05-26 16:21:43 -04:00
Jonathan D'Orleans b9a34a03b5 Issues 14 - Listener Improvements
1. To prevent many of the listener "dead state" (avoiding unwanted exceptions to break the loop)
2. Wake up must work for both "mycroft wake up" and "wake up mycroft"
3. To ensure "mycroft" keyword is always detected when it exists
4. To rely on "mycroft" instead of "hey mycroft"
5. To process "ok", "okay" and "allright" as part of the wake word detection
Some of the possible test cases:

1. wake up mycroft with: "mycroft wake up" and "wake up mycroft"
- it must wake up no matter the position of the "wake up" keyword
- it must always say it's awake at the first time (before, it'd only say it the second time you try to wake up)

2. try "okay mycroft, what's the weather in lawrence" and similar requests with "alright"
- this ensures we ignore "okay" and "alright" on the sentence

3. "mycroft" keyword should be detected as much as possible even if the sentence does not trigger a real skill/action
- that means the wake word detection is working

4. try all of those from close distance to the unit
- this ensures the changes are working

5. try all of those from a far distance to the unit
- to test the auto gain mic (for those who have one)
2016-05-26 16:21:43 -04:00
Leo Arias d618676089 Issues-4 - Fix pep8 errors. 2016-05-23 17:23:47 +00:00
Arron Atchison 6e42bb1736 In the 1970s computer users had to understand the arcane syntax of the machines they used. They programed their computers using the machine's native language and hardly gave it a thought.
The 1980s birthed a new form of interaction between computers and users.  For the first time computers became capable of understanding the most basic form of human communication - pointing and grunting.  The mouse and the GUI revolutionized computing and made computers accessible to the masses.

We have now entered a third era.  We are rapidly approaching a time when computer systems will understand human language and respond using the most natural form of human communication – speech.

This is an important development.  Some might even call it revolutionary.

Despite its importance, however, the technologies that will underpin this new method of interaction are the property of major tech firms who don't necessarily have the public's best interests at heart.

Not anymore.

Meet Mycroft – the worlds first open source natural language platform.  Mycroft understands human language and responds with speech.  It is being designed to run on anything from a phone to an automobile and will change the way we interact with open source technologies in profound ways.

Our goal here at Mycroft is to improve this technology to the point that when you interact with the software it is impossible to tell if you are talking to a human or a machine.

This initial release of the Mycroft software represents a significant effort by the Mycroft community to give the open source world access to this important technology.  We are all hoping that the software will be useful to the public and will help to usher in a new era of human machine interaction.

Our community welcomes everyone to use Mycroft, improve the software and contribute back to the project.  With your help and support we can truly make Mycroft an AI for everyone.

Joshua W Montgomery – May 17, 2016
2016-05-20 09:16:01 -05:00