forked from pool/mycroft-core
- Update to 18.8.12:
* GUI update (gh#MycroftAI/mycroft-core#1964)
+ Adds ability to sync variables from the gui into the skill and makes it
possible to override the idle page.
* Always load dialogs as utf-8 (gh#MycroftAI/mycroft-core#1958)
+ This ensures that systems with a default file encoding of ascii, ansi and
similar can read the dialog files correctly.
* Fix normalize of sentences containing "half"
(gh#MycroftAI/mycroft-core#1966)
+ A bug introduced when improving the handling of numbers silently made the
normalize not parse numbers after a "half" in the sentence. The change
was reverted and the old behaviour is back.
* Update of stop handling of TTS (gh#MycroftAI/mycroft-core#1961)
+ The tts now cancels all pending speech requests that were issued before
the stop command.
* Resting screen decorator (gh#MycroftAI/mycroft-core#1970)
+ Creating Idle pages was previously a tricky task requiring setting up
message handlers and sending the correct message. Now a method can simply
be tagged as an resting screen handler by applying the decorator
@resting_screen_handler.
* Additional info from the audiotest (gh#MycroftAI/mycroft-core#1971)
+ The audio test now prints which device is used for recording and the
command line used for playback. A -l option is also available now to list
available audio devices.
* Prefer local audio outputs (gh#MycroftAI/mycroft-core#1963)
+ The audio system now prefer local backends before trying external ones.
For example a https url will now consistently play using the vlc backend
and not on a chromecast unless specified.
* Misc
+ Clean up unnecessary Logs in text client (gh#MycroftAI/mycroft-core#1957)
OBS-URL: https://build.opensuse.org/request/show/673170
OBS-URL: https://build.opensuse.org/package/show/multimedia:voice-assistant/mycroft-core?expand=0&rev=12
145 lines
5.4 KiB
Diff
145 lines
5.4 KiB
Diff
From: Antonio Larrosa <larrosa@kde.org>
|
|
Subject: Use system python modules and user's mycroft.conf
|
|
|
|
This introduces a number of changes:
|
|
* Don't use python's virtualenv, but the system python packages
|
|
* Add 'use_virtualenvwrapper' config parameter
|
|
* Make ~/.mycroft/mycroft.conf have priority over /etc/mycroft/mycroft.conf
|
|
* Add a get_config_value function to read config options
|
|
* When installing a skill, instead of using pip to install the requirements,
|
|
write requirements.txt to a log file which the user can test manually
|
|
(at ~/.mycroft/mycroft-python-modules.log).
|
|
* Write schedule_file to ~/.mycroft/schedule.json instead of under /opt
|
|
* Write cache file to ~/.mycroft/web_config_cache.json instead of under /opt
|
|
* Install skills to ~/.mycroft/skills
|
|
|
|
Index: mycroft-core-release-v18.8.4/start-mycroft.sh
|
|
===================================================================
|
|
--- mycroft-core-release-v18.8.4.orig/start-mycroft.sh
|
|
+++ mycroft-core-release-v18.8.4/start-mycroft.sh
|
|
@@ -20,7 +20,9 @@ script=${0}
|
|
script=${script##*/}
|
|
cd -P "$( dirname "$SOURCE" )"
|
|
DIR="$( pwd )"
|
|
-VIRTUALENV_ROOT=${VIRTUALENV_ROOT:-"${DIR}/.venv"}
|
|
+#logs_dir="/var/logs/mycroft-core"
|
|
+#mkdir -p ${logs_dir}
|
|
+#chown mycroft-core:mycroft-core ${logs_dir}
|
|
|
|
function help() {
|
|
echo "${script}: Mycroft command/service launcher"
|
|
@@ -78,17 +80,16 @@ first_time=true
|
|
|
|
function source-venv() {
|
|
# Enter Python virtual environment, unless under Docker
|
|
- if [ ! -f "/.dockerenv" ] ; then
|
|
- source ${VIRTUALENV_ROOT}/bin/activate
|
|
- fi
|
|
+ # if [ ! -f "/.dockerenv" ] ; then
|
|
+ # source ${VIRTUALENV_ROOT}/bin/activate
|
|
+ # fi
|
|
}
|
|
|
|
first_time=true
|
|
function init-once() {
|
|
if ($first_time) ; then
|
|
echo "Initializing..."
|
|
- "${DIR}/scripts/prepare-msm.sh"
|
|
- source-venv
|
|
+# "${DIR}/scripts/prepare-msm.sh"
|
|
first_time=false
|
|
fi
|
|
}
|
|
Index: mycroft-core-release-v18.8.4/stop-mycroft.sh
|
|
===================================================================
|
|
--- mycroft-core-release-v18.8.4.orig/stop-mycroft.sh
|
|
+++ mycroft-core-release-v18.8.4/stop-mycroft.sh
|
|
@@ -18,7 +18,6 @@ SOURCE="${BASH_SOURCE[0]}"
|
|
|
|
script=${0}
|
|
script=${script##*/}
|
|
-cd -P "$( dirname "$SOURCE" )"
|
|
|
|
function help() {
|
|
echo "${script}: Mycroft service stopper"
|
|
Index: mycroft-core-release-v18.8.4/mycroft/configuration/mycroft.conf
|
|
===================================================================
|
|
--- mycroft-core-release-v18.8.4.orig/mycroft/configuration/mycroft.conf
|
|
+++ mycroft-core-release-v18.8.4/mycroft/configuration/mycroft.conf
|
|
@@ -196,7 +196,10 @@
|
|
"update": true,
|
|
|
|
// Run a self test at bootup?
|
|
- "test": false
|
|
+ "test": false,
|
|
+
|
|
+ // use virtualenvwrapper (or if false, just use the system python modules)
|
|
+ "use_virtualenvwrapper": true
|
|
},
|
|
|
|
// Level of logs to store, one of "CRITICAL", "ERROR", "WARNGIN", "INFO", "DEBUG"
|
|
@@ -238,6 +241,8 @@
|
|
// Engine. Options: "mimic", "google", "marytts", "fatts", "espeak", "spdsay", "responsive_voice"
|
|
"module": "mimic",
|
|
"mimic": {
|
|
+ // Path to the mimic binary
|
|
+ "path": "/usr/bin/mimic",
|
|
"voice": "ap"
|
|
},
|
|
"mimic2": {
|
|
Index: mycroft-core-release-v18.8.4/mycroft/configuration/config.py
|
|
===================================================================
|
|
--- mycroft-core-release-v18.8.4.orig/mycroft/configuration/config.py
|
|
+++ mycroft-core-release-v18.8.4/mycroft/configuration/config.py
|
|
@@ -17,11 +17,12 @@
|
|
import re
|
|
import json
|
|
import inflection
|
|
-from os.path import exists, isfile
|
|
+from os.path import exists, isfile, join
|
|
from requests import RequestException
|
|
|
|
from mycroft.util.json_helper import load_commented_json, merge_dict
|
|
from mycroft.util.log import LOG
|
|
+from mycroft.filesystem import FileSystemAccess
|
|
|
|
from .locations import DEFAULT_CONFIG, SYSTEM_CONFIG, USER_CONFIG
|
|
|
|
@@ -134,7 +135,8 @@ class RemoteConf(LocalConf):
|
|
def __init__(self, cache=None):
|
|
super(RemoteConf, self).__init__(None)
|
|
|
|
- cache = cache or '/var/tmp/mycroft_web_cache.json'
|
|
+ if not cache:
|
|
+ cache = join(FileSystemAccess('cache').path, 'web_config_cache.json')
|
|
from mycroft.api import is_paired
|
|
if not is_paired():
|
|
self.load_local(cache)
|
|
Index: mycroft-core-release-v18.8.4/mycroft/tts/mimic_tts.py
|
|
===================================================================
|
|
--- mycroft-core-release-v18.8.4.orig/mycroft/tts/mimic_tts.py
|
|
+++ mycroft-core-release-v18.8.4/mycroft/tts/mimic_tts.py
|
|
@@ -40,7 +40,7 @@ if not os.path.isfile(BIN):
|
|
|
|
BIN = distutils.spawn.find_executable("mimic")
|
|
|
|
-SUBSCRIBER_VOICES = {'trinity': join(data_dir, 'voices/mimic_tn')}
|
|
+SUBSCRIBER_VOICES = {'trinity': '/usr/share/mycroft/voices/mimic_tn'}
|
|
|
|
|
|
def download_subscriber_voices(selected_voice):
|
|
Index: mycroft-core-release-v18.8.4/mycroft/version/__init__.py
|
|
===================================================================
|
|
--- mycroft-core-release-v18.8.4.orig/mycroft/version/__init__.py
|
|
+++ mycroft-core-release-v18.8.4/mycroft/version/__init__.py
|
|
@@ -37,8 +37,7 @@ CORE_VERSION_STR = '.'.join(map(str, COR
|
|
class VersionManager:
|
|
@staticmethod
|
|
def get():
|
|
- data_dir = expanduser(Configuration.get()['data_dir'])
|
|
- version_file = join(data_dir, 'version.json')
|
|
+ version_file = "/usr/share/mycroft/version.json"
|
|
if exists(version_file) and isfile(version_file):
|
|
try:
|
|
with open(version_file) as f:
|