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.
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.
* 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"
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>
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.
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.
* 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"
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>
* 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
* 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.
* 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
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.
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"
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).
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>
* 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
* 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)
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.
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
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
* 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
* "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
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.
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.
* 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
- 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.