Commit Graph

344 Commits (10b8e93b7419126864d9bab2effbe813962865ee)

Author SHA1 Message Date
JarbasAI 6cf2ed814c feature/allow to pronounce ordinals and very small fractions (#1663)
* allow to pronounce ordinals

* cleanup

* long scale / short scale very small fractions
2018-07-10 02:54:04 -05:00
Åke 1093383443 Fix extraction of 0 in extract_number() (#1673)
0 was not detected as a valid number when checking if the function should proceed to check for fractions.
2018-07-10 02:26:25 -05:00
Åke 622748d7d3 Bugfix/parse corrections (#1670)
* Restore extractdatetime to return False

- Restore extractdatetime to return False if no time was found
- Add tests to make sure this is true
- Add a extract_datetime function to keep coherency with the rest of the functions. (the old extractdatetime still exists for compatibility)
- Update documentation to match

* Minor corrections to docstrings.
2018-07-02 02:44:28 -05:00
JarbasAI fa4173a2d3 fix extract date (#1651)
* Fix errors when spaces are missing "3pm" "5seconds"
* Fix relative times "in 15 minutes" is now from current time not from midnight

Resolves #1650
2018-06-26 11:45:39 +02:00
Carsten Agerskov 5994644085 Feature/nice date (#1635)
* Added nice_date, nice_date_time, nice_year
2018-06-25 17:43:24 +02:00
jarbasal 57a86a7fe6 pep8 2018-06-22 01:03:32 +01:00
jarbasal 1710803bb0 pronounce scientific notation 2018-06-22 01:03:32 +01:00
jarbasal 2f05b0b820 fix extra zero 2018-06-22 01:01:59 +01:00
jarbasal 8637236490 codacy 2018-06-21 19:15:11 +01:00
jarbasal f95c7cf805 py3.4 compatibility 2018-06-21 17:19:54 +01:00
jarbasal ae8e241ffc long scale 2018-06-19 02:37:13 +01:00
jarbasal 5c424fecc1 long scale 2018-06-19 02:18:27 +01:00
jarbasal f83b4f97bb pronounce big numbers 2018-06-19 02:18:27 +01:00
jarbasal b329de593b up 2018-06-19 02:18:25 +01:00
jarbasal 07a5e463d9 long scale and short scale 2018-06-19 02:18:25 +01:00
jarbasal 2fc2fcab08 typo 2018-06-19 02:16:35 +01:00
jarbasal e79dce7afd improve extract_number_en 2018-06-19 02:14:30 +01:00
Åke Forslund 39c4e0aaf1 Add wiki link for long/short scale 2018-06-18 15:46:20 +02:00
jarbasal 7e1fb80cb4 improve extract_number_en
- Support higher numbers, almost unreasonably high!
- Support long scale and short scale
2018-06-18 15:45:14 +02:00
Michael Nguyen d81d321ed0
Merge pull request #1627 from forslund/bugfix/socket-timeout
Fix changed default socket timeout
2018-06-12 16:01:47 -05:00
f-e-l-i-x b239d3dc2f German language support (#1634)
* Add parse and format functions for german
* Add german dialog files
2018-06-12 08:55:21 +02:00
Åke Forslund 6d9ecef63e Fix changed default socket timeout
The default socket timeout was changed when checking the connectivity through connecting to a remote server (8.8.8.8). This has now been updated to only change the timeout for the socket used for the connection.
2018-06-05 17:20:14 +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 8d81b4473b Fix french "centième" handling 2018-05-02 10:01:04 +02:00
Åke Forslund a2993e4ba6 Remove backwards compatibility with python 2.7 2018-04-27 08:51:47 -05:00
Åke Forslund b200d51d39 Fix test cases under python 3
Lots of minor fixes including, sorting dicts, making ints of strings,
     MagicMock file spec and some other things

A couple of issues in the mycroft-core code base were identified and
fixed. Most notably the incorrect version check for python three when
adding basestring.

Update .travis.yml
2018-04-27 08:50:46 -05:00
Åke Forslund d03eb4ed70 Add Microsoft NCSI as a backup to detect connection
Since on some networks port 53 is blocked the old method failed on
occation. This adds a backup method using standard requests.

Read https://blogs.technet.microsoft.com/networking/2012/12/20/the-network-connection-status-icon/ for more info on the NCSI check.
2018-04-19 11:02:05 -05:00
Matthew D. Scholefield 10bd9a1cf3 Change initial kill to SIGINT
This sends a ctrl+c signal to each process which will allow code to exit properly by handling KeyboardInterrupt
Other notable changes:
 - create_daemon method used to clean up create daemon threads
 - create_echo_function used to reduce code duplication with messagebus
 echo functions
 - wait_for_exit_signal used to wait for ctrl+c (SIGINT)
 - reset_sigint_handler used to ensure SIGINT will raise KeyboardInterrupt
2018-04-11 21:29:10 -05:00
Cakeh 713f48dd66 Fix missing import 2018-02-15 15:46:12 +01:00
Cakeh e7202868e5 Update sv format functions 2018-02-15 13:02:45 +01:00
Kévin C 692877fa07
Fix PEP8 issue 2018-02-15 12:53:51 +01:00
Kévin C f0869dcf31
Merge branch 'dev' into dev 2018-02-15 12:51:45 +01:00
Cakeh 7f733bdf75 Update nice_number_fr, en, pt, it docstring 2018-02-15 12:16:58 +01: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 9b5f4dd09c Fixed variable name change 2018-02-08 22:38:50 +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 2811a74adc Remove now-private method 2018-01-31 05:31:16 -06: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
Steve Penrod b18821d338
Fix PEP8 2018-01-15 01:25:40 -06:00
Matthew D. Scholefield cc65e045e6 Fix Sphinx documentation 2018-01-12 19:04:13 -06:00
Åke Forslund 5e0aa28362 Fix code standard issues reported by Codacy 2018-01-08 17:08:31 -06: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
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 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 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 01b37f06eb Handle "tonight" and text containing only a date
- "tonight" is re-interpreted as PM
- check is performed to check if previous word exist before accessing it
to handle sentences containing only a simple date
2017-12-13 15:00:57 +01:00
jarbasai d7926cde07 pt unicode bug fix in normalization 2017-12-12 03:10:00 +00:00
jarbasai b301890cc5 pt unicode bug fix in datetime extract 2017-12-12 03:07:49 +00:00
jarbasai 745de21e57 pt unicode bug fix in number parse 2017-12-12 03:05:31 +00: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
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 d4da6d1739 Add minimum diskspace for curate_cache
==== Fixed Issues ====
#1141

====  Tech Notes ====
Curate cache now only removes cache files if the diskspace is below the
set percentage AND if below a set amount of free disk space
2017-10-26 18:05:57 -05: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 6af06d4433 add missing get_arch() 2017-10-26 18:42:19 -04:00
Åke Forslund 3deb65b0c2 Update download method
====  Tech Notes ====
- Fix cleanup
- Add support for custom header
- create directory as needed
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 a006a3d5b6 Merge pull request #1120 from MycroftAI/feature/fix-log-autocomplete
Fix log autocomplete

==== Tech Notes ====
Due to the use of setattr(), IDEs like PyCharm couldn't use autocomplete on the LOG class. This unrolls the loop so that the logging attributes appear in the autocomplete menu.
2017-10-07 13:06:15 +02:00
Åke Forslund ad0e9870c2 Add notifications when starting/stopping recording
====  Tech Notes ====
Add text notifying start and stop of recording
2017-10-04 21:56:02 -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
Matthew D. Scholefield 9483d0a50e Unroll loop to explicitly show attributes in LOG
This allows IDEs to use autocomplete on the LOG class
2017-09-29 02:01:22 -05:00
Matthew D. Scholefield 07e94f2d07 Improve LOG code and add log unit test
Adjusts style for readability and generates methods dynamically
2017-09-20 12:45:22 -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
Matthew D. Scholefield 789b452e5e Add useful imports to mycroft and mycroft.util modules 2017-08-29 11:09:12 -05:00
Åke Forslund 025a771fe1 Add class for handling downloads
====  Tech Notes ====
Downloader() is a Thread subclass starting and handling a download. The
property done and status is set when the download is completed or
failed.
download manager ensuring continuation of started downloads (per process)
complete_action, a function to be called after download is complete can be
supplied to the downloader
2017-08-15 14:42:32 +02:00
penrods c138182451 Fix the logger fix
Gotta slow down my fingers.  Mixed "logging" and "mycroft.util.log" into
the non-existent "mycroft.util.logging".  Fixed.
2017-08-03 16:56:55 -05:00
penrods 76ef80e443 Switch to mycroft.util.logger
Changed from a plain logger to mycroft.util.logger
2017-08-03 16:42:26 -05:00
penrods 54bf9b3cb6 Fix a missing logger which caused a crash
Some exception code was attempting to use the LOGGER, but one had
not been created for this file.  So when the exception occurred
it caused a crash.

NOTE: We need to standardize on log/LOG/LOGGER!
2017-08-03 16:42:26 -05:00
Åke Forslund a0ac65ac35 Fix rebase issues introduced with audio subsystem
util/signal.py add missing import time
move tts thread shutdown/clear to audio/speech.py
2017-08-02 16:53:48 -05:00
Michael Nguyen b68baf1d57 change LOGGER to logger 2017-08-01 16:39:13 -05:00
Michael Nguyen 12c7302ac7 changed logger to LOGGER 2017-08-01 16:22:49 -05:00
Åke Forslund 93a9848a4c Move speech information methods to audio 2017-07-31 13:37:17 +02: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
Ethan Ward ec7bc6d512 Refactor setup_base to use CORE_VERSION_STR 2017-07-07 10:46:45 -05:00
matlar 7b05b73e5d Issue-685 - Using load_commented_json in log.py 2017-06-22 12:45:38 +00:00
Arron Atchison 78563a4df3 Revert "Refactor setup_base.py to use new versioning method (#802)"
This reverts commit ba5b255b0e.
2017-06-13 18:01:34 -05:00
Ethan Ward ba5b255b0e Refactor setup_base.py to use new versioning method (#802) 2017-06-13 13:30:20 -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 32e32ed185 Minor onboarding refinements
* The wifi setup no longer stops after 5 minutes unless already paired (i.e. still onboarding)
* The mouth resets on wifisetup stop (clearing the scrolling home.mycroft.ai)
* Changed several ConfigurationManager.get() calls to ConfigurationManager.instance().  Exactly the same, but .instance() is clearer/preferred.
* Added a mycroft.util.stop_speaking() method.  Not perfect, but works for now and can be replaced later when AudioManager is in place.

A forthcoming change to the pairing skill will utilize the stop_speaking method.
2017-06-12 02:57:22 -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
kfezer 6e00b43acf Merge pull request #793 from ProsperousHeart/dev
Adding Extraction of Numbers
2017-05-30 15:10:13 -07:00
ProsperousHeart 88acee1bc2 Fixed PEP8 for number extraction addition 2017-05-30 14:30:41 -05:00
ProsperousHeart 5ad8e4ac74 Adding Extraction of Numbers 2017-05-25 18:31:43 -05:00
Ashwin Venkatesan e714263330 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 4ec351eef6 Fix bug in non speech nice number format 2017-05-25 11:43:05 -07:00
Ashwin Venkatesan 3e15f6d64c Add nice_number function to format decimals to english 2017-05-25 11:43:05 -07:00
SoloVeniaASaludar 942055a95f + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar f7b790b660 + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar 85a74ab72f + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar 690d9763a9 + 2017-05-18 16:53:10 -03:00
SoloVeniaASaludar 8ec3c7f8bc normalize_es 2017-05-18 16:53:10 -03:00
Åke Forslund b9c4e84bb1 Add short docstring to create_file() 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
penrods 220043cd4e Fixing PEP8 errors 2017-04-13 09:07:22 -07: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 'Sparky 1087d0e3b4 #636 - Adding loglevel 2017-04-06 17:14:18 -07:00
Augusto Monteiro 13d99a29a0 Merge pull request #589 from MycroftAI/feature/issue-363
Open listener thread and then check for network connection
2017-03-30 17:19:37 -07:00
penrods 0043e6c889 Implementing audio cache feature in issue #598
The TTS audio is now cached.  If the same TTS is requested again, the cached WAV and phoneme sequence is reused.

Major points:
* Created mycroft.util.get_cache_directory().  You can give this a domain, also.  The mycroft.conf can define where this directory resides, so enclosures can have this reside on a ramdisk, for instance.
* Created mycroft.util.curate_cache().  This retains a percentage of the disk size free.
2017-03-30 02:40:56 -05:00
kfezer@gmail.com 7b43089a76 modified: mycroft/client/speech/listener.py
modified:   mycroft/util/__init__.py

Fixes 363
previously as pr Networking fix: resolves #363 #364

suggested by clccmh
2017-03-21 13:53:43 -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
penrods 9fce7d4620 This implements CLI enhancements per issue #547
Main CLI enhancements:
* Microphone meter
* Long log line left/right scrolling
* Eliminated flicker
* VT100 ESC key code support (used by some terms)

In addition, to achieve the meter it was necessary to implement a mechanism for local Inter Process Communication (IPC).  This is achieved using the file-system.  By default a folder structure is created under /tmp/mycroft/ipc, but it can be directed to somewhere else by setting the config value in mycroft.conf:
    "ipc_path" : "/path/to/somewhere"
In the future, Mark 1 and Picroft will get RAM disks to avoid burning out the SD card.  This is also a very fast communication mechanism.  This is all hidden under util.get_ipc_directory()

Further, the named signal mechanism was changed to use the IPC folder.  The signal can have a lifetime now (not just one shot).
2017-03-10 01:30:15 -06:00
Karl Fezer 900033b99e Changes to be committed:
modified:   mycroft/util/__init__.py

FIXES BUG 519
2017-02-15 18:48:20 -08:00
Karl Fezer 4d50f852d2 modified: mycroft/util/__init__.py 2017-02-15 15:37:52 -06:00
Karl Fezer e0d11b1dd0 modified: mycroft/util/__init__.py
Fixing Pep8 errors
part of issue 515
2017-02-15 15:37:52 -06:00
Karl Fezer e874df266e Changes to be committed:
modified:   mycroft/util/__init__.py
2017-02-15 15:37:52 -06:00
Karl Fezer a691003071 modified: mycroft/configuration/mycroft.conf
modified:   mycroft/util/__init__.py
2017-02-15 15:37:52 -06:00
Augusto Monteiro 9ca97d55fc #503 - Fixing resource path 2017-02-15 15:37:52 -06:00
penrods 5f8775883a Refining new "listening" sound mechanism
This adds several refinements to the listening sound mechanism added by:
* Added a default sound file
* Allowing various ways to override "resource files" for customization
* Moved the sound configuration path from "confirm_ding" to
  "sounds" > "start_listening"
* Also added "sounds" > "end_listening" configuration for the future

This submission adds the new mycroft.util.resolve_resource_file(res_name)
method.  This method takes a name such as "snd/start_listening.wav" and
looks (in order):
* For an absolute path <res_name>
* For ~/.mycroft/<res_name>
* For /opt/mycroft/<res_name>
* For mycroft/res/<res_name> within the source package
2017-02-15 15:37:52 -06:00
Arron Atchison 990dd27c5e Revert "Refining new "listening" sound mechanism (#503)" 2017-02-15 15:37:52 -06:00
Steve Penrod a53a5bf0a6 Refining new "listening" sound mechanism (#504)
This adds several refinements to the listening sound mechanism added by:
* Added a default sound file
* Allowing various ways to override "resource files" for customization
* Moved the sound configuration path from "confirm_ding" to
  "sounds" > "start_listening"
* Also added "sounds" > "end_listening" configuration for the future

This submission adds the new mycroft.util.resolve_resource_file(res_name)
method.  This method takes a name such as "snd/start_listening.wav" and
looks (in order):
* For an absolute path <res_name>
* For ~/.mycroft/<res_name>
* For /opt/mycroft/<res_name>
* For mycroft/res/<res_name> within the source package
2017-02-15 15:37:52 -06:00
Augusto Monteiro 4a6651781f Issues 397 - Renaming remove_https to get_http 2016-12-17 10:27:01 -05:00
Augusto Monteiro 027413b521 Issues 397 - Removing https from mp3 or wav url to play news 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans d8308470d2 Issues 356 - Checking button press signal during visime loop in mimic 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 0b14030344 Issues 356 - Updating WA skill to use the new api 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 4c1ba4e337 Issues 356 - Rebasing with master 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans db9c12c122 Issues 351 - Merging service and client web socket configuration 2016-12-17 10:14:42 -05:00
Steve cac955fa64 Feature button behavior (#365)
* Several changes related to button pressing on the Mycroft unit:
- Pressing the button when it isn't listening starts it listening
- Pressing the button when listening will stop the listen
- Added a mycroft.util.signal() mechanism for out-of-thread communication
- Pressing the button now creates an "buttonPress" signal from the Enclosure
- The viseme playback and aplay check for the 'buttonPress' signal to abort
- Removed "Sorry I didn't catch that", irritating during false activations

* Fixed spacing that pep8 yelled about
2016-09-22 13:16:11 -05:00
Ethan Ward 75c80c2d98 Issues #321 - fix pep8 2016-08-16 15:15:07 -05:00
Ethan Ward 6e633127a3 Issues #321 - Add second DNS server 2016-08-16 15:12:57 -05:00
Ethan Ward 2aa54abbac Issues #321 - Integrate connection test 2016-08-16 15:12:57 -05:00
Ethan Ward 85befc16b4 Issues #321 - Add basic connectivity test 2016-08-16 15:12:57 -05:00
Ryan Sipes 1d3e3f7cb4 Moved Debug
Moved Debug to post only in the event of an error.
2016-05-26 15:28:59 -05: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
Ryan Sipes 8f2c451938 Fixed Missing License Headers on All Files.
GPL LIcense added to the top of each python file.
2016-05-26 11:16:13 -05: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