Commit Graph

35 Commits (0036f404b5e6a5593d6f6e1bfe895fe88c395ae3)

Author SHA1 Message Date
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