Commit Graph

460 Commits (02eb1b8277d06c61a2448a6a9e2767f7cb1cc54a)

Author SHA1 Message Date
kfezer@gmail.com 18e5127cf9 Fixes error with wpa_supplicant string
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:53:10 -03:00
Steve Penrod c44d386a35 Adding localization mechanism for strings embedded in mycroft-core code (#717)
* Adding localization mechanism for strings embedded in mycroft-core code

Added mycroft.dialog.get() function.  This behaves much like the localization
mechanism for dialogs in Skills.  So you can do things like this:

   lang = "en-us"
   str = mycroft.dialog.get("how are you", lang)

Which will look in mycroft/res/text for the dialog file containing strings to
use as templates for the actual output.  This depends on the language being
currently used.  When operating in English this would be:

   mycroft/res/text/en-us/how are you.dialog

This function will pick a random line from that file to assign to str.

A more advanced use is to embed placeholders in the strings within the
template file.

   lang = "en-us"
   ctx = {"time" : "noon"}
   str = mycroft.dialog.get("current time", lang, ctx)

And the random template line picked was "the current time is {{time}} ", then
the output would be:

   "the current time is noon"
2017-05-18 16:53:10 -03:00
kfezer@gmail.com 8b6be6e26b modified: mycroft/client/wifisetup/main.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 07ec6bd422 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 6f31c93fc0 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com ea6e3c2539 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:53:10 -03:00
kfezer@gmail.com 8669599461 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:53:10 -03:00
kfezer@gmail.com 5f70f5117c modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 85c6cb6a72 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 8935259889 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 0b8e033d1c modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:51:54 -03:00
kfezer@gmail.com 3830d619d8 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com ed249471f8 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com bb756882d3 modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 46286b4cc2 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-18 16:51:54 -03:00
kfezer@gmail.com f02470d6a0 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 353999b2a9 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com d8565bb429 modified: mycroft/client/enclosure/__init__.py 2017-05-18 16:51:54 -03:00
kfezer@gmail.com 554fc09bc8 Adding SSH enable option
modified:   client/enclosure/__init__.py
2017-05-18 16:51:53 -03:00
kfezer 0c521107ab Update __init__.py
Adds delay to the wifi reset
2017-05-18 16:51:17 -03:00
kfezer@gmail.com 5731054eab modified: mycroft/client/wifisetup/main.py 2017-05-18 16:51:17 -03:00
kfezer@gmail.com 68f8bc262c deleted: mycroft/client/wifisetup/wpa_supplicant.conf.master 2017-05-18 16:51:17 -03:00
kfezer@gmail.com 65b1810b40 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/speech/mic.py
	modified:   mycroft/client/wifisetup/main.py
	new file:   mycroft/client/wifisetup/wpa_supplicant.conf.master
2017-05-18 16:51:17 -03:00
Åke Forslund 0c9f3ebefb Stop multi-sentence speech 2017-05-18 16:51:17 -03:00
Art McGee f5ec8b74a3 Changes to record mycroft wake word when configured to do so. (#538)
NOTE: this doesn't check for disk space and doesn't clean up
file stored in /tmp/ called mycroft_wake_sucess<time>.wav

TODO: some cleanup should be considered.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-05-18 16:49:07 -03:00
Åke Forslund aa0756a3f3 Enforce float as threshold value to pocked sphinx 2017-05-18 16:49:07 -03:00
kfezer@gmail.com d68b1dddb3 Changing how SSH is enabled.
Now using systemctl for both enabling and disabling\
	modified:   mycroft/client/wifisetup/main.py
2017-05-08 19:32:56 -07:00
Arron Atchison fb912215af Update main.py 2017-05-08 19:07:24 -07:00
kfezer c7af7cfc70 Merge pull request #744 from MycroftAI/feature/ssh-disable
Support for Mark 1 SSH > BLOCK menu item
2017-05-08 17:21:48 -07:00
Arron Atchison 3c42443e04 Update version.txt 2017-05-08 16:34:16 -07:00
kfezer@gmail.com d77709e1f9 Added command line calls to enable/ disable ssh
Fixed issue where ssh.enable was emitting wrong message
	Tested mycroft.dialog.get
	modified:   mycroft/client/enclosure/__init__.py
	modified:   mycroft/client/wifisetup/main.py
2017-05-08 16:30:51 -07:00
penrods 6428063531 Minor code restructure to simplify _record_phrase()
Basically just moved the signal-related code into a helper method.
2017-05-08 15:44:36 -07:00
penrods 6399644032 Improved handling of button press
Improved the way the button press is handled.  Now the listener gives the rest
of the system a moment to consume the button press before it interprets it
as a request to begin listening.

Also replaced the use of the "buttonPress" signal when "expect_response"
was indicated with an utterance.  Now the signal "startListening" is
created, differentiating it from a buttonPress.
2017-05-08 15:44:36 -07:00
penrods 771d773931 Support for Mark 1 SSH > BLOCK menu item
This implements the handler for the Mark 1 menu item SSH > BLOCK (the inverse of SSH > ALLOW)
* Added handler for "unit.disable-ssh" on the serial line. This turns around and emits "mycroft.disable.ssh" on the messagebus.
* Removed the automatic reboot, just let the user know it will be different after a restart
* Made the spoken message translatable
* Changed mycroft.dialog.get() to not require the "lang" parameter.  It will default to the mycroft.conf value.
2017-05-08 13:37:18 -07:00
penrods 497de370a2 Restore the drawing of icons when showing weather.py
This implements the image drawing functionality of the lastest Mark 1 enclosure instead of the old numeric weather icon codes.
2017-05-07 19:53:24 -07:00
kfezer 27c9a03a52 Merge pull request #733 from MycroftAI/hotfix/fix-demo-mode
Fixing demo mode, sending two events on message bus
2017-05-05 16:20:37 -07:00
Augusto Monteiro 'Sparky e77082baf7 Fixing demo mode, sending two events on message bus 2017-05-05 16:12:11 -07:00
kfezer@gmail.com 083ac3fb6b increases boot delay on reboot after ssh and reset
modified:   mycroft/client/enclosure/__init__.py
2017-05-05 13:25:00 -07:00
Arron Atchison 27cbd14def bump enclosure version to 0.1.22 2017-05-05 12:17:52 -07:00
Augusto Monteiro 'Sparky 4328e869a9 Adding demo mode
* Sending an event to messagebus when demo button is pressed
2017-05-04 15:46:37 -07:00
kfezer@gmail.com 6bb6de324c Fixes error with wpa_supplicant string
modified:   mycroft/client/wifisetup/main.py
2017-05-03 17:59:33 -07:00
kfezer@gmail.com 1ee3b82766 modified: mycroft/client/wifisetup/main.py 2017-05-03 15:52:29 -07:00
kfezer 754015f722 Merge branch 'dev' into feature/enable-ssh 2017-05-03 15:40:24 -07:00
kfezer ecd9ae07e3 Merge pull request #720 from MycroftAI/feature/wifi-reset
Feature/wifi reset
2017-05-03 15:33:58 -07:00
Steve Penrod e1fa41bff2 Adding localization mechanism for strings embedded in mycroft-core code (#717)
* Adding localization mechanism for strings embedded in mycroft-core code

Added mycroft.dialog.get() function.  This behaves much like the localization
mechanism for dialogs in Skills.  So you can do things like this:

   lang = "en-us"
   str = mycroft.dialog.get("how are you", lang)

Which will look in mycroft/res/text for the dialog file containing strings to
use as templates for the actual output.  This depends on the language being
currently used.  When operating in English this would be:

   mycroft/res/text/en-us/how are you.dialog

This function will pick a random line from that file to assign to str.

A more advanced use is to embed placeholders in the strings within the
template file.

   lang = "en-us"
   ctx = {"time" : "noon"}
   str = mycroft.dialog.get("current time", lang, ctx)

And the random template line picked was "the current time is {{time}} ", then
the output would be:

   "the current time is noon"
2017-05-03 21:25:17 +02:00
kfezer@gmail.com 52122894dc modified: mycroft/client/wifisetup/main.py 2017-05-03 10:07:55 -07:00
kfezer@gmail.com 282c7eadfa modified: mycroft/client/enclosure/__init__.py 2017-05-02 17:14:48 -07:00
kfezer@gmail.com feb25a6602 modified: mycroft/client/wifisetup/main.py 2017-05-02 16:49:45 -07:00
kfezer@gmail.com 745b43020e modified: mycroft/client/wifisetup/main.py 2017-05-02 16:48:17 -07:00
kfezer@gmail.com dcc91e17af modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-02 16:40:41 -07:00
kfezer@gmail.com 7615c2e6bd modified: mycroft/client/wifisetup/main.py 2017-05-02 13:50:25 -07:00
kfezer@gmail.com 1d58d7ad0f modified: mycroft/client/wifisetup/main.py 2017-05-02 13:38:31 -07:00
kfezer@gmail.com ff173dc5b0 modified: mycroft/client/wifisetup/main.py 2017-05-02 13:22:39 -07:00
kfezer@gmail.com d6b676795d modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-02 13:15:53 -07:00
kfezer@gmail.com afc2d5661a modified: mycroft/client/wifisetup/main.py 2017-05-02 13:07:43 -07:00
kfezer@gmail.com 0aca6c2797 modified: mycroft/client/enclosure/__init__.py 2017-05-02 12:45:54 -07:00
kfezer@gmail.com a9e8dd2f24 modified: mycroft/client/wifisetup/main.py 2017-05-02 10:48:45 -07:00
kfezer@gmail.com c8d020a45d modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/wifisetup/main.py
2017-05-01 21:08:04 -07:00
kfezer@gmail.com f096d28d5a modified: mycroft/client/enclosure/__init__.py 2017-05-01 15:36:54 -07:00
kfezer@gmail.com 672016ea03 modified: mycroft/client/enclosure/__init__.py 2017-04-28 15:21:03 -07:00
kfezer@gmail.com 41e7109ba5 modified: mycroft/client/enclosure/__init__.py 2017-04-28 15:08:42 -07:00
kfezer@gmail.com ace3002bd0 Adding SSH enable option
modified:   client/enclosure/__init__.py
2017-04-28 14:01:34 -07:00
kfezer a8bcb84581 Update __init__.py
Adds delay to the wifi reset
2017-04-27 17:22:15 -07:00
kfezer@gmail.com a9cd201163 modified: mycroft/client/wifisetup/main.py 2017-04-27 15:54:57 -07:00
kfezer@gmail.com 3250b4a585 deleted: mycroft/client/wifisetup/wpa_supplicant.conf.master 2017-04-27 15:49:17 -07:00
kfezer@gmail.com 65a0dcfd67 modified: mycroft/client/enclosure/__init__.py
modified:   mycroft/client/speech/mic.py
	modified:   mycroft/client/wifisetup/main.py
	new file:   mycroft/client/wifisetup/wpa_supplicant.conf.master
2017-04-27 15:37:58 -07:00
Augusto Monteiro 697582d122 Merge pull request #698 from forslund/mycroftai-coveralls
Coveralls Coverage with Travis
2017-04-26 10:09:22 -07:00
Åke Forslund bf7957650c Stop multi-sentence speech 2017-04-26 16:54:13 +02:00
Åke Forslund 246bd9f455 Enforce float as threshold value to pocked sphinx 2017-04-25 23:12:38 +02:00
Art McGee eeb1f998e7 Changes to record mycroft wake word when configured to do so. (#538)
NOTE: this doesn't check for disk space and doesn't clean up
file stored in /tmp/ called mycroft_wake_sucess<time>.wav

TODO: some cleanup should be considered.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-04-23 16:54:06 -05:00
Steve Penrod 2eecfebaa7 Merge branch 'dev' into dev 2017-04-23 16:44:49 -05:00
Augusto Monteiro 'Sparky 28d15e2918 #478 - Adding toggle button on wifisetup 2017-04-13 20:04:08 -05:00
penrods 23c445a904 This fixes several issues related to wake-up words and audio recording, including #595.
* The wake up sound is now played synchronously, thus not included in the recorded audio
* The minimum recorded phrase must be at least 0.5 seconds (instead of 0.1), and must be continuously quiet for that duration
* The silence threshold is reset every time we begin listening for a wakeword
* The silence threshold adjusts upward to just above the ambient sound while waiting for the wake-word
* Reformatted some comments to use Google-style docstrings, and added more comments
2017-04-13 19:08:07 -05:00
Augusto Monteiro e3e3a89aaa Merge pull request #649 from MycroftAI/feature/issue-648
Several command line interface (CLI) improvements
2017-04-13 12:48:38 -07:00
penrods a2053712ee More CLI fixes/enhancements for #648
* Added log filtering commands to the CLI.  So you can do things within the CLI like:
   :filter DEBUG  (filters out any lines containing "DEBUG")
   :filter remove DEBUG (stop filtering "DEBUG")
   :filter "not this" (filters out any log lines containing "not this")
   :filter list (displays active filters)
   :filter clear (removes all filters)
* Added a ~/.mycroft-cli.conf configuration file.  It currently contains the last-used filters.
* The mycroft.sh scripts were firing up the "fancy" CLI in the background and logging it constantly.  This resulted in huge log files because of the constantly updated microphone level indicator.
2017-04-12 00:15:37 -07:00
Åke Forslund 7b0703f72b Catch and show errors in mute_and_speak() 2017-04-09 23:50:26 -07:00
penrods 16c9fa9f83 Several command line interface (CLI) improvements:
* The chat history section now wraps long text strings
* Redesigned the section title to combine the header and underscore lines into a single line to save screen space
* Recolored several screen elements to make more sense.  The query and the chat history now retain the cyan color, etc.
* The screen fully refreshes periodically, cleaning up garbage that might have accumulated from outside text being written to the terminal
* The mic meter no longer wraps around the screen when level numbers are too long
2017-04-09 18:16:45 -07:00
Åke Forslund 95641451fa Fix PEP-8 issues 2017-04-08 11:08:13 +02:00
DMendyke ed21c1471c Merge pull request #638 from MycroftAI/dmendyke.service.instance
Code to prevent multiple instances of a service
2017-04-07 15:40:26 -07:00
dmendyke c7645be49c Added PID locking to both 'voice' and 'service' services. 2017-04-06 12:59:31 -07:00
Augusto Monteiro 68be8f00c0 Merge pull request #619 from MycroftAI/feature/issue-618
#618 - Fixing volume skill
2017-03-31 14:29:01 -07:00
Augusto Monteiro 'Sparky b87b73ecc6 #618 - Fixing pep8 2017-03-31 14:12:17 -07:00
Augusto Monteiro 'Sparky 1bcdfc76b2 #618 - Fixing volume skill 2017-03-31 14:00:17 -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
kfezer 0446d58ba3 Merge pull request #578 from SoloVeniaASaludar/bugfix/issue-577
speech client, error in control of interval between calls to wakeup recognizer #577
2017-03-29 17:30:46 +00: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 0fe6ee65e0 Merge pull request #576 from forslund/expect_response
Add expect_response option to speak_methods
2017-03-20 14:55:24 -05:00
Augusto Monteiro 988f408c49 Merge pull request #587 from SoloVeniaASaludar/bufix/issue-586
Bufix/issue 586
2017-03-20 14:16:41 -05:00
SoloVeniaASaludar 4df486da82 Update mic.py 2017-03-20 19:41:33 +01:00
SoloVeniaASaludar 3c6a40c5ea Update mic.py 2017-03-20 19:40:30 +01:00
SoloVeniaASaludar e63cb1d628 Update mic.py 2017-03-18 11:02:33 +01:00
Åke Forslund be8dd47250 Add expect_response option to speak_methods
if expect_response flag is set to True the stt will be triggered just as if the wakeword has been received or the button on the mycroft enclosure has been pressed.
2017-03-17 20:20:27 +01:00
SoloVeniaASaludar ae59b1f69f Update listener.py 2017-03-17 19:06:29 +01:00
SoloVeniaASaludar 02195d22cd Update listener.py 2017-03-17 18:51:18 +01:00
SoloVeniaASaludar 08e7778538 Update listener.py 2017-03-17 18:21:06 +01: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 bc9956cd68 Fixing sloppy copy/paste errors. 2017-03-10 16:23:00 -06: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
Art McGee 6d3d120517 Changes to record mycroft wake word when configured to do so.
NOTE: this doesn't check for disk space and doesn't clean up
file stored in /tmp/ called mycroft_wake_sucess<time>.wav

TODO: some cleanup should be considered.

Signed-off-by: Art McGee <amcgee7@jaguarlandrover.com>
2017-03-02 14:14:50 -08:00
penrods 49b1530976 Fixing color initialization. I assumed 16 colors were defined, but that isn't standard on all terminals. Now only assuming the first 8. 2017-02-27 15:15:13 -06:00
penrods 6feac48c13 Bug fix for when the log contains a really short line (less than 8 characters). 2017-02-27 15:15:13 -06:00
penrods b51bd4acd9 Further enhancements:
* Added "--simple" mode, to get the old cli behavior
* Rewrote to not use tail (works better with multiple log files)
* Added Ctrl+PgUp/Dn support for scrolling back in logs
* Added filtering
* Refined look and log coloring
* Added :help screen
* Added support for terminal resizing
2017-02-27 15:15:13 -06:00
penrods 9e937964b0 For issue #535
* Fixed pep8 errors
* Added monitoring of relative and system log files for both github and package installs.
2017-02-27 15:15:13 -06:00
penrods bd68c478d7 First check-in of enhanced command line interface (CLI):
* Uses curses
* Displays a "chat history" with requests and responses
* Shows filtered logs from mycroft-skills.log, mycroft-voice.log
* Start of framework for special ":" commands (for log searching, etc)
2017-02-27 15:15:13 -06:00
penrods e47e38c92c Fixes issue #528
Max recording time is now 10 seconds instead of 30.  This deals with cases where a noisy background prevents the listener's silence detection from triggering.  30 seconds was WAAY too long to keep listening -- nobody is going to be saying something that long for now.
2017-02-23 20:54:39 -08:00
Arron Atchison de00192dc6 all lil peps fixed 2017-02-15 15:37:52 -06:00
Arron Atchison c1ea573493 fixed pep8 in enclosure client folder 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
tmajibon 647f90f836 Listen Confirmation Ding (#472)
* Listen confirmation

If enabled, will play a wave file to confirm that Mycroft is listening

* Listen confirmation ding config options

* Rename config option

* Update mycroft.conf

* Type: Rename config option

* Missing imports

Whoops, forgot them (was copying edits since I didn't have my dev environment set up)

* Removing unnecessary import functions
2017-02-15 15:37:52 -06:00
penrods c3070beb7b CLI improvements, as per issue #493
* "Input:" doesn't get intermingled with the output (usually -- long pauses can still cause it to happen)
* "Output:" is now displayed
* Ctrl+C is handled gracefully
2017-02-03 10:49:07 -06:00
Åke Forslund a1d7fa79db Fix silent mycroft when config lacks enclosure/platform 2017-01-23 18:04:45 +01:00
Steve Penrod b64c4ecfe6 Fixes issue #466 (#467)
This is a bit of a hack for Picroft.  The analog audio on a Pi blocks
for 30 seconds fairly often, so we don't want to break on periods
(decreasing the chance of encountering the block).  But we will
keep the split for non-Picroft installs since it give user feedback
faster on longer phrases.
2017-01-20 16:17:24 -06:00
Steve Penrod 84b9f92593 Fix related to issue #457 (#463)
The bug was actually fixed by doing a rebase, catching hotfixes which were missing from the dev branch.

The bug exposed this line of code, which was throwing an error without the quotes on the parameter to ping.
2017-01-20 15:40:31 -06:00
Ethan Ward c4bc2ea161 Update to fix pep8 errors (#420) 2017-01-18 16:41:48 -03:00
Arron Atchison 04cc555eb2 Update version.txt 2016-12-28 18:11:52 -06:00
Steve Penrod 0ecc736829 Fixes issue #434. Developers working on both Cerberus and Home durin… (#435)
* Fixes issue #434.  Developers working on both Cerberus and Home during the transition would have to re-pair.

Also bumping enclosure client version.

* Correcting error from when Tarturus code was merged.  At startup it was calling Enclosure.system_reset(), which rebooted the Arduino, instead of implementing Enclosure.reset(), which sets the UI to a "ready for input" state.

While in here, I also added docstrings for all Enclosure API methods.

* Increment Arduino code version

* Adding a call to reset the face UI when the enclosure service starts up.  This is needed because the enclosure.reset that is posted by the speech service on the messagebus sometimes occurs before the enclosure client is up and listening for it -- especially if there is a Arduino firmware upgrade.

In the future, we may want to consider a core service roll-call that gets triggered whenever any of the core services come up.

* Update dev_setup.sh
2016-12-28 15:00:03 -06:00
Arron Atchison c4257d226c removed arduino update and test classe from enclosure client (#430) 2016-12-21 16:44:05 -06:00
Jonathan D'Orleans 11d78a55b8 Issues 426 - TTS web socket is not initialized properly
- Initialize tts ws and enclosure at the main process

Note:
- This is a minimal change to fix the problem.
- The ultimate goal is to have a totally isolated TTS process which requires its own main and ws initialization to be developed soon.
2016-12-21 00:18:25 -05:00
Arron Atchison 2252966dda Issue #423 Register Me button in wifi-setup-client now points to home.mycroft.ai (#424)
* the Register Me button now points to home.mycroft.ai

* the Register Me button now points to home.mycroft.ai
2016-12-20 23:10:26 -06:00
Arron Atchison bfac4a4245 alter websocket port and path in wifi-client setup Config.js (#412) 2016-12-19 18:26:50 -06:00
Jonathan D'Orleans 2503fb1450 Issues 351 - Tartarus Integration
- Stopping enclosure in case of incompatibility with Mark 1
- Preventing stop to be called twice in enclosure and wifi processes
2016-12-17 17:57:58 -05:00
Jonathan D'Orleans 99ff4e3ce8 Issues 351 - Tartarus Integration
- Master rebase
- Renaming Websocket variable from client to ws
- Resetting enclosure when ws open
- Formatting pairing skill
2016-12-17 14:53:22 -05:00
Jonathan D'Orleans 416191e598 Issues 350 - Synchronizing local and remote configuration 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 1ed5496676 Issues 350 - Updating listener identity after pairing 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans f781e1db02 Issues 350 - Ensuring Listener has sampleRate and channels settings 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans fe8bb4e778 Issues 356 - Updating enclosure and wifi to use new event data format 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 634bef3f8c Issues 356 - Updating enclosure flags 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 558425b27d Issues 356 - Configuring wifi setup 2016-12-17 10:27:01 -05:00
Jonathan D'Orleans 2d68741a45 Issues 356 - Renaming cli.py to main.py 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 86e712ec84 Issues 356 - Ensuring only code is sent as a message to visime enclosure 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 365e23852f Issues 356 - Moving enclosure logic from main to init 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 184e400e9e Issues 356 - Moving Visime logic to Mimic TTS 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 9e632a3c8a Issues 356 - Stopping processes during audio playback 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 14c6eae264 Issues 356 - Integrating Listener with STT modules 2016-12-17 10:16:29 -05:00
Jonathan D'Orleans 885fe0a1cf Issues 356 - Renaming enclosure to main and stopping threads 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans c71c054258 Issues 351 - Creating STT module and classes 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 89e9c2ff77 Issues 351 - Moving TTS Factory to tts __init__.py 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans b1a4a9c22b Issues 351 - Making Identity static and unique 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 fe5b96e051 Issues 351 - Updating STT configuration 2016-12-17 10:15:24 -05:00
Jonathan D'Orleans 14050d70e8 Issues 354 - Implementing activation process 2016-12-17 10:14:42 -05:00
Jonathan D'Orleans 9e982aa114 Issues 351 - Fixing Listener variables types 2016-12-17 10:12:10 -05:00
Jonathan D'Orleans 8af0acff76 Issues 351 - Renaming auto_update to update 2016-12-17 10:12:10 -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
Jonathan D'Orleans 3280d57b18 Issues 351 - Tartarus Integration
- Creating API to communicate with remote server
- Updating Identity data
- Adapting RemoteConfiguration load to new server
2016-12-17 10:11:15 -05:00
Steve Penrod e47ac6b895 Renamed the EnclosureAPI "system_reset()" method which generated an
"enclosure.system.reset" on the messagebus (which was intended to
only reset the enclosure's visual elements) to simply "reset()" and
"enclosure.reset" to avoid confusion with the "system.reset" serial
port message (which resets the Arduino).
2016-11-08 01:44:20 -06:00
Steve Penrod 28a09fd586 Fix an issue with auto-detect on a Mycroft Mark 1. At boot time
there is a lot of electrical noise creating junk on the serial
port lines.
2016-11-04 17:09:51 -05:00
Steve Penrod 5e27364ca1 Added auto-detect to the enclosure.py. It will check for a
'platform' variable in 'enclosure' section, and if not found
the auto-detect will kick off.  The mechanism used is issuing
a serial 'system.ping' and listening for the Mycroft Mark 1
Arduino to respond.  This is a one-time event, since the
results get saved.

If the system is not a Mycroft Mark 1, it shuts itself down
so the enclosure message bus messages are simply ignored
on a generic Pi.
2016-11-04 13:48:18 -05:00
Steve Penrod f08bbe5902 Refined the reset mechanism on boot. Now there is a single Enclosure API
system_reset() that means the Enclosure appearance should be reset to
its defaults.  The implementation of this is now a reset of both the
mouth and the eyes.  This command gets sent to the Enclosure once the
speech client has fully opened its connection to the messagebus.
2016-11-03 16:18:08 -05:00
Steve Penrod b8c197f574 Added code to auto-detect the 'platform' the enclosure is running
under.  For now, only the 'mycroft-mark-1' is auto-detected by
attempting to send out a 'ping' over the serial line.  The
auto-detect results are saved as a 'platform' in the
configuration file.

Since the current enclosure is designed to only work with Mark 1,
we shutdown the client in all other platform cases.
2016-11-02 17:00:45 -05:00
Steve Penrod e251a1c625 Switched to using the EnclosureAPI instead of writting directly to the
serial port.  This is a stopgap, as potentially this message is sent
before the enclosure is fully active and listening.
2016-11-02 16:14:03 -05:00
Steve f0386264a3 Wifi setup usability (#370)
* Enhancing the Wifi setup process:
* When no intenet is detected, Mycroft now instructs user
  to connect cable or tells how to start wifi setup
* Wifi setup talks user through connection process
* Setup will auto-shutdown after 5 minutes
* Completion screen now goes to cerberus.mycroft.ai to
  allow registration immediately
  (TODO: custom url/landing page to that will already have the pairing code)

* Changing the wording of the prompt message and slowing down the
rate at which the password is spoken.

* fixed pep8 error

* fixed mroe pep8 in listener.py

*     -webkit-user-select: text;

* * Fixed iOS issues with password input
* Added SSID wrapping for unusually long network names
* Fixed need for left/right scrolling on small phone screens (e.g. iPhone 4/5)
* iOS devices now automatically open the screen after connecting to the MYCROFT network
* Tweaked Wifi setup instruction wording to make it easier to understand
* Fixed a potential bug with the flag used to stop the connection monitor

* Removed some temporary debugging code being used to track a very
specific issue with odd network names.

* Various small changes for the code review.  Mainly deleting some dead
code and comment changes.

* Made the "not connected" message more Mimic-friendly by using the word
'browse' instead of 'login'.

* Increased the size of the password characters.  They felt tiny at 13px on
previously on an iPad.

* - Added an auto-check for unit connection during the first 20 seconds when
  a unit is turned on.  If no connection to the internet is found, the user
  is told how to get connected.
- Added calls to 'ping' to help rebuild the ARP table we previously cleared
  in the test for lost connection
- Tweaked some terminology spoken to be more Mimic-friendly and understandable.
- Added automatic announcements every 45 seconds of the next step in the
  process.
- Added automatic shutdown after 5 minutes
- Added announcement when the process is complete
- Added documentation and comments throughout
- Made things more "pythonic".  Switched functions from camelCase to
  python_style_names.  Also used some underscore prefixes for private methods
  that are really just implementation helpers.

* - The initial check for internet connectivity now happens 5 seconds after the system comes up instead of 20.
- Also added a space to tweak the pronunciation of an announcement

* Changes to the wifi setup portal
- Added a Cancel Setup button (shuts down the process)
- The Register Me button only appears once the browser can
  reach cerberus.mycroft.ai.  This prevents following the
  link while phone is still connected to the temporary
  access point or not connected back to the real network.

* Update version.txt
2016-10-13 14:49:06 -05:00
Arron Atchison 196f6a077e remove config setting 2016-10-05 12:03:22 -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
Arron Atchison c52f92f949 Feature/issues 356 (#362)
* working on a client for wi-fi setup

* added refactored code, ready to integrate

* client is running, now to handle the rest

* Staring touble in the face

* saved

* added config settings for wifi setup

* add an entry point for wifisetup to mycroft-base-setup.py

* moved SSID sorting into LinkUtils

* I'm now using the new SanAp class throughout

* Cleaning up code. All bash executions use bashThreadHandling class, mycroft's LOGGER

* removed legacy configuration parser

* funneling effort into cleanup

* fixed pep8, see if she builds

*  changed entry point for init script

*  changed import path to full path

* changed import path to full path for all files

* change ws port to 8080 for now

*  pep8 in wifi.py fixed

* fixed a few more pep8 errors

* strange import stuff goign on

* strange import stuff goign on

* renamed wifi.py to prevent import conflict

* freeze pip requirement versions

* changed import path in LinkUtils

* changed import path again

* trying to fix wifi import.. something is wrong

* consumer and producer queues now working

* Consumer & producer API's are coming alogn

* Refactor: developing an API

* add ap up/down procedure to api

*  looking googd

*  removed some older code, api is nearly written

* success

* Sending conection status to browser is now working

* Fixed pep8 errors again

* removed blank line from file

* fixed entrypoint name

* added shutdown and save upon connect; reducing verbosity

* now disabling and flushing network on connection fail

*  fix start.sh

* Corrected amount of arguments passed to wpa_cli_disable_network

* added iface to disable network

* added shutdown on success; restart wpa_supplicant upon ap up

* turning powersave mode off for wlan0

* removed wpa_cli flush

*  fix some file restore and exit issues

* re enabled flush networks on fail

* powersave mode was logged but not executed

* stop and start dhcpcd withh ap up

* changed hostapd channel; bring links up and down after successful pair

*  removed double quotes from the wpa_supplicant template

* Multiple files combined into util.py

* clean up some comments, added license headers

* what is up

* Ap mode event fires on enclosure event

* added logic for open network

* Changed empty passphrase from bool to empty string

* enclosure version bump

* changed ap down method in WiFiConsumer

* I'm now pulling all configuration from mycroft.ini and grabbing the mac address for ap ssid

* REFACTOR: removed util.py, as it was a bit messy

* REFACTOR: remove pep8 errors again, you would think that I would do this each time

* chagned some logic for open net

* open networks now function properly

* Reboot on success

* changed network save method

* Issues 356 - Setup wifi connection
- Removing tornado dependency
- Merging WS reader with Wifi process

* Issues 356 - Refactoring
- Using PyRIC and WIFI libs

* Issues 356 - Refactoring bash command

* Issues 356 - Refactoring FileUtils

* Issues 356 - WebClient refactoring

* Issues 356 - create password and loading pages

* Issues 356 - connecting

* Issues 356 - parsing data on ws

* Issues 356 - removing fake function on wifisetup

* Issues 356 - connecting on public network

* Issues 356 - show loading page on backbutton

* Issues 356 - sort networks by quality

* Issues 356 - Fixing message type variable

* Issues 356 - Adding more logs to wifi setup

* Issues 356 - network sort by quality

* Issues 356 - Fixing cell ssid param and using correct interface for scheme

* Issues 356 - Ensuring to save scheme before activating

* Issues 356 - Logging bash command

* Issues 356 - Refactoring wifi to P2P

* Issues 356 - Simplifying cli usage and getting results from wpa_cli

* Issues 356 - Parsing ssid and pass

* Issues 356 - Saving wpa configuration

* Issues 356 - Removing postfix in favor of wpa_supplicant config

* Issues 356 - Setting host to 0.0.0.0

* Issues 356 - Fixing parsing for wpa_cli output

* Issues 356 - Ensuring to save wpa config after connected

* Issues 356 - Setting interface for save config

* Issues 356 - Ensuring interfaces in all wpa cli

* Issues 356 - Creating, staring and stopping wifi web server

* Issues 356 - Adding logs to web server

* Issues 356 - create succes page and merge connect page on list page

* Issues 356 - Config.js server addr

* Issues 356 - Adding wifi status and connected control

* Issues 356 - lock margin top wifisetup

* Issues 356 - waiting connection

* Issues 356 - Moving dnsmasq backup logic to main.py

* Issues 356 - Cleaning imports

* Changed the base manifest to reflect new file locations

* fixed indent for pep8

* changed the mycroft-base-setup.py to reference the proper entry point for wifisetup

*  Enclosure version bump

* Added the wifi index.html to the base manifest, as it doesn't seem to catch it recursively

* Issues 356 - Updating first setup flag after running the first time

* Issues 356 - Ensure to stop server only if it exists

* Issues 356 - Ensuring to set first setup to false when connected

* Issues 356 - Closing web server after shutdown

* Issues 356 - Running web server as daemon

* Issues 356 - Creating server connection only once at initialization

* Issues 356 - Disconnecting network before connecting and fixing get status

* Issues 356 - Starting web server only once after AP is up

* Issues 356 - Returning empty status if not able to parse

* Issues 356 - Creating web server loop control

* Issues 356 - Performing final request call in order to unblock server

* Issues 356 - Adding GET method to server request

* Issues 356 - Requesting web server to stop on main thread
2016-09-19 12:28:58 -05:00
Steve c653c43910 Added viseme support for TTS, allowing enclosure to display visemes (#357)
* Added viseme support for TTS, allowing enclosure to display visemes as appropriate

* Enclosure versino bump
2016-09-05 16:27:09 -05:00
Steve a62bb9c6c1 Updated enclosure version 2016-08-25 14:14:01 -05:00
Arron Atchison 5a1184eff9 Fixed issue #334 with a try: clause 2016-08-21 13:32:28 -05:00
isaacnward aa8c8dbdae added mouth reset (#342) 2016-08-18 17:25:22 -05:00
Ethan Ward 73a74761bc Fix wifi indication in speech client main 2016-08-18 17:09:00 -05:00
Arron Atchison 56b0f9ac5c Merge pull request #340 from MycroftAI/no-sudo-rm
rm'd sudo from rm
2016-08-18 16:35:21 -05:00
Isaac Ward 02b0059c07 added ~ 2016-08-18 16:28:47 -05:00
Isaac Ward 97074d679c removed sudo 2016-08-18 16:27:48 -05:00
isaacnward e55201ebe0 added eye spin to factory reset (#339) 2016-08-18 16:19:00 -05:00
Isaac Ward bde91807bd added eye spin to factory reset 2016-08-18 16:17:49 -05:00
Arron Atchison 86632b0221 Merge pull request #338 from MycroftAI/factory-reset
Factory reset
2016-08-18 15:45:56 -05:00
Isaac Ward ca28b25d17 changed directory 2016-08-18 15:29:14 -05:00
Isaac Ward 981db1768f added identity reset as factory reset menu option 2016-08-18 15:20:45 -05:00
Arron Atchison 1154db95fb Merge pull request #337 from MycroftAI/eye-shutdown
changed animation for reboot
2016-08-18 15:07:35 -05:00
Isaac Ward ce519d19fa pep8 maaaaaaaaaan 2016-08-18 15:06:46 -05:00
Isaac Ward 7f1f8238c1 changed animation for reboot 2016-08-18 14:57:24 -05:00
Arron Atchison df3dcf482c Merge pull request #336 from MycroftAI/eye-shutdown
added eye reset at bootup
2016-08-18 14:31:44 -05:00
Isaac Ward 9cdde253a1 added eye reset at bootup 2016-08-18 14:28:50 -05:00
Arron Atchison 74b0ce8dac version bump 2016-08-18 14:15:56 -05:00
Isaac Ward 8c9befb530 merged master 2016-08-18 13:30:03 -05:00
Isaac Ward ff1aa67269 added eye spinning animation to indicate shutdown 2016-08-18 12:44:31 -05:00
Arron Atchison 4c7dc112ad Switching to systemctl based shutdown and restart 2016-08-18 10:58:01 -05:00
isaacnward de871b50ea added eye reset when listener is created (#333) 2016-08-17 14:10:42 -05:00
Isaac Ward 4dd46c4837 added eye reset when listener is created 2016-08-17 13:33:28 -05:00
Arron Atchison 12fdbf4f9d Stating PATH in the same subprocess call 2016-08-17 12:53:49 -05:00
Arron Atchison 68679a65fe try setting PATH variable before sudo commands 2016-08-17 10:09:50 -05:00
Arron Atchison 1fff4d05c0 Version bump
Like a mostly sane monkey
2016-08-16 15:51:31 -05:00
Arron Atchison 76eae6341d Merge pull request #327 from ethanaward/feature/issues-321
Add checks for wifi connection (Fixes #321)
2016-08-16 15:27:51 -05:00
Ethan Ward b3f89f483d Issues #321 - pep8 2016-08-16 15:12:57 -05:00
Ethan Ward 2aa54abbac Issues #321 - Integrate connection test 2016-08-16 15:12:57 -05:00
Arron Atchison 39116c4770 Merge pull request #325 from MycroftAI/feature/break-TTS-into-smaller-chunks
Feature/break tts into smaller chunks
2016-08-16 14:45:53 -05:00
isaacnward 45bd268c66 Added support for power control through unit menu mode (#324)
* added subprocess control for unit shutdown and restart

* shell=True

* p e p 8

* added message for wifi client
2016-08-16 13:16:14 -05:00
Arron Atchison 9c2e47af8f Merge branch 'master' into feature/break-TTS-into-smaller-chunks 2016-08-16 11:05:01 -05:00
Arron Atchison 2c0e9903f6 Merge pull request #311 from MycroftAI/features/eye-volume
Features/eye volume
2016-08-16 09:47:01 -05:00
Arron Atchison 8bd2e1c4dc added regex to the speech handler instead 2016-08-15 10:09:14 -05:00
Arron Atchison 036b4fc226 Merge pull request #314 from MycroftAI/issue/dont-compile-pocketsphinx
Issue/dont compile pocketsphinx
2016-08-01 10:38:25 -05:00
Matthew D. Scholefield 9e0fdd0b5a Removed white space on newline to fix PEP8 2016-07-30 13:27:54 -05:00
Arron Atchison a201743ac5 added a little more verbosity to self test feature 2016-07-30 13:01:37 -05:00
Matthew D. Scholefield c95f31c371 Added white noise to hardware test (#312)
Added white noise and dialog to hardware test.
2016-07-29 18:07:15 -05:00
Arron Atchison 62a9649680 Some modifications to dev_setup, build_host_setup, and local_recognizer.py. It seems that on debian systems we can install python-pocketsphinx for the python binding. 2016-07-29 10:27:44 -05:00
Matthew D. Scholefield 1febf1d81e Updated version number in enclosure client 2016-07-28 15:40:59 -05:00
Isaac Ward 0f69e3bdb8 added volume communication with enclosure 2016-07-28 15:23:24 -05:00
Ethan Ward 524c5e0956 Issues #56 - Move TTS process killing to speech client (#308)
* Issues #56 - Move stop functionality into speech client

* Fix pep8

* Issues #56 - Remove old kill
2016-07-28 10:13:14 -05:00
Wolfgange3311999 ca4b189638 Fixed enclosure hardware test issue 2016-07-27 16:37:52 -05:00
Matthew D. Scholefield fde0f32863 Hardware test (#305)
* Added mic test to enclosure

* Added system.test enclosure commands

This also improves the audio test method; it now uses its own voice to make the test faster to perform

* Added set function to mycroft configuration
This allows setting config values to a particular section in the user config

* Added upload and test on first boot features

* Added mute test to enclosure
2016-07-27 15:25:31 -05:00
Arron Atchison 96d2ad5e3e version bump 2016-07-21 14:30:47 -05:00
Arron Atchison b5dce51175 Merge pull request #300 from Wolfgange3311999/bugfix/issues-299
The volume knob now plays a noise for feedback
2016-07-21 13:15:59 -05:00
Arron Atchison 549d5fa98d Enclosure version bump 2016-07-21 12:21:12 -05:00
Wolfgange3311999 6fd22902a1 The volume knob now plays a noise for feedback
Before it would speak the response and degrade the UX
2016-07-20 21:22:16 -05:00
Ethan Ward b60bd99e79 Fix unused imports (#296) 2016-07-18 15:45:11 -05:00
Arron Atchison 993fe22ac6 Merge pull request #292 from Wolfgange3311999/bugfix/temp-file
Temp dict files now have generated names in /tmp/
2016-07-15 12:08:27 -05:00
Wolfgange3311999 11cdc72184 Temp dict files now have generated names in /tmp/
This prevent permission errors associated with storing things in the
/tmp/mycroft directory and with reusing files.
2016-07-15 11:40:59 -05:00
isaacnward 35ce974f14 fixed bug causing weather to occasionally not display (#291) 2016-07-15 11:26:33 -05:00
Wolfgange3311999 da804d3ead Moved generated dicts to temporary directory 2016-07-14 15:50:58 -05:00
isaacnward a7fb9d2fe5 Issues/234: Weather display on faceplate (#255)
* i really need to fork

* Added weather functionality

* pep8

* uncommented line

* removed variable default values

* changed enclosure version

* edited metadata syntax
2016-07-12 10:26:18 -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 08ad57cee8 Decreased false positives (Fixes #200) (#202)
* Changed keyword to 'hey mycroft' and increased threshold
The threshold increase is necessary since the keyphrase is now more syllables

* Fixed pocketsphinxnot loading and pep8
Previously I tried using a new word called 'hey-mycroft' (with the appropriate phoenetic version in the .dict) however it worked just as well as how it is now as separate words

* Increased threshold further
2016-06-29 15:24:30 -04:00
Arron Atchison 2e847418ac Revert version
Our enclosure builder now refuses to build any release tab beyond 0.1.3  :/
2016-06-27 17:06:51 -05:00
Arron Atchison d994593d47 Bump to current enclosure release 2016-06-27 16:47:01 -05:00
Arron Atchison a9c00d69c3 Merge pull request #230 from Wolfgange3311999/feature/issues-224
Added timeout override to listener - fixes #224
2016-06-23 17:27:29 -05:00
Matthew Scholefield d2dc5443ee Fixed pep8 for mic.py 2016-06-23 17:14:49 -05:00
Matthew Scholefield 54cf720f8b Added timeout override to listener and fixed bug with it
previously the listner's behavior would be influenced by the buffer size. Now, however, it is not since the noise is increased by a factor of the seconds per buffer.
2016-06-23 16:03:47 -05:00
Arron Atchison 88c74cc541 Enclosure version bump for update tests
0.1.3 -> 0.1.4
2016-06-23 12:36:55 -05:00
Matthew D. Scholefield 874f521194 Merge pull request #207 from Wolfgange3311999/listener-fixes
Added back session manager behavior from old listener
2016-06-23 09:15:31 -05:00
isaacnward 083bda8e03 Issues/122 (#220)
* added mouth spelling

* spell word after talking

* removed speech to test

* test

* re-added speech

* used emitter

* mycroft/skills/spelling/__init__.py

* emitters 102: intermediate emitters

* emitters 103: importing the right method

* trying enclosure methods

* more fixing

* sorry slack

* added brief pause

* added api listener method

* fixed syntax

* further edited syntax

* slightly changed syntax

* added brief pause before listener reactivation

* changed ordering

* testing method

* further tests

* test test test

* logger

* further logger

* altered logic

* i really need to fork

* more debug

* changed boolean logic

* more debug

* fixed it??

* added brief pause again

* final commit

* test

* test

* fixed it

* sleep

* more testing

* stuff

* added constants:

* pep8
2016-06-22 14:36:56 -05:00
Matthew Scholefield 7bcdea6604 Added back wakeword handler 2016-06-21 12:26:27 -05:00
Matthew Scholefield e759c8ab33 Added back some SessionManager lines to replicate old behavior more precisely
I'm not quiet sure where the session_id was ever used when emitted in the payload however just to be safe I kept it in there. This is to be sure there are no differences between the old and new listener that could be causing Cerberus problems.
2016-06-21 12:15:58 -05:00
Matthew Scholefield d9905a2d07 Removed unnecessary variable in ResponsiveRecognizer
This was left over from when I was testing with making the class be asynchronous
2016-06-21 11:54:41 -05: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
Wolfgange3311999 379e5361c5 Fixedbug causing remote STT to fail
It turns out that without giving the keyword 'metrics=' in the metrics argument, something strange would happen causing all remote STT to fail
2016-06-18 10:43:57 -05:00
Matthew D. Scholefield 5df1e5e59b Removed extra import from previous commit 2016-06-17 22:13:26 -05:00
Wolfgange3311999 99d125640a Added a timeout of 30 seconds for recording a phrase 2016-06-17 21:05:28 -05:00
Wolfgange3311999 153cd62abd Changed to using += operator
Previously I thought bytearrays were immutable for some reason (which is not the case)
2016-06-17 20:55:01 -05:00
Matthew Scholefield 596ea04078 Fixed try_wake_up method 2016-06-17 17:41:01 -05:00
Matthew Scholefield d0cbddc961 Removed unused variable 2016-06-17 17:10:47 -05:00
Wolfgange3311999 b1900c3d81 Rewrote listener 2016-06-17 16:50:41 -05:00
isaacnward 3870e3c9c7 Features/encoder volume (#157)
* added volume control in enclosure.py

* fixed syntax for skill method usage

* addressing a problem with the enclosure service

* trying to use intents

* oops

* fixed pep8

* fixed issue with reversed volume controls

* changed enclosure version number to reflect updated enclosure code
2016-06-17 17:27:09 -04:00
Jonathan D'Orleans c46bc43e72 Issues 96 - Moving configuration to init 2016-06-09 18:26:10 -04:00
Jonathan D'Orleans efff3dbda6 Issues 96 - Renaming get_config to get only 2016-06-09 18:25:37 -04:00
Jonathan D'Orleans c3e2a25630 Issues 58 - Fixing Cerberus URL pronunciation
- Ensuring "dot" is spoken for Cerberus URL
- Fixing "AI" pause
2016-06-02 21:17:25 -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
Jonathan D'Orleans 45d4026eb8 Issues 54 - Fixing enclosure pep8 issues 2016-06-02 19:30:11 -04:00
Jonathan D'Orleans 27b1e2b22c Issues 54 - Displaying pairing code only once 2016-06-02 19:30:11 -04:00
Jonathan D'Orleans bd1888c642 Issues 54 - Displaying pairing code
- Ensuring Enclosure do not affect unit display state until paired
2016-06-02 19:30:11 -04:00
Jonathan D'Orleans 9f713879b0 Issues 64 - Removing undesirable thread from speak function 2016-05-31 20:45:41 -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 fd1f32e076 Pyflakes fixes
Rebased on master, and fixed all Pyflakes (specifically the pocketsphinx import being to liberal in local_recognizer.
2016-05-27 11:49:22 -05: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