Compare commits

...

7 Commits

Author SHA1 Message Date
j1nx cf1f03447c Bump skill-news 2022-03-17 20:37:32 +01:00
j1nx 250f0151cf Bump ovos-phal-plugin-alsa 2022-03-17 20:34:11 +01:00
j1nx 0ee109649d Bump ovos-core 2022-03-17 20:30:16 +01:00
j1nx 214d4c0005 Bump skill-ovos-setup 2022-03-17 20:13:20 +01:00
j1nx 537adb6b55 Bump mycroft-embedded-shell 2022-03-17 20:10:09 +01:00
j1nx 062074eff2 Add ovos-phal-plugin-mk2 package 2022-03-17 20:06:32 +01:00
j1nx 641bf90c73 Bump skill-ovos-volume 2022-03-17 19:52:27 +01:00
17 changed files with 42 additions and 212 deletions

View File

@ -254,6 +254,7 @@ menu "Mycroft A.I. Plugins"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-ovos-phal-plugin-display-manager-ipc/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-ovos-phal-plugin-ipc2bus/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-ovos-phal-plugin-mk1/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-ovos-phal-plugin-mk2/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-ovos-phal-plugin-system/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-ovos-plugin-manager/Config.in"
source "$BR2_EXTERNAL_OPENVOICEOS_PATH/package/python-ovos-skill-installer/Config.in"

View File

@ -715,6 +715,7 @@ BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_DASHBOARD=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_DISPLAY_MANAGER_IPC=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_IPC2BUS=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_MK1=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_MK2=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_SYSTEM=y
BR2_PACKAGE_PYTHON_OVOS_SKILL_INSTALLER=y
BR2_PACKAGE_PYTHON_OVOS_SKILL_MANAGER=y

View File

@ -717,6 +717,7 @@ BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_DASHBOARD=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_DISPLAY_MANAGER_IPC=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_IPC2BUS=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_MK1=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_MK2=y
BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_SYSTEM=y
BR2_PACKAGE_PYTHON_OVOS_SKILL_INSTALLER=y
BR2_PACKAGE_PYTHON_OVOS_SKILL_MANAGER=y

View File

@ -1,2 +1,2 @@
# Locally computed
sha256 72ac25631799f44279b9ce672dfb546fcc2417bdc0de4aed0948da74dcdf20e9 mycroft-embedded-shell-59923ee87cb407b3c17aa283aa1001ffb8ed2d6f.tar.gz
sha256 22ffb5b7cac52b2301a072ae363a74556cffbe26ab1419c9cdfb49b99089cf7b mycroft-embedded-shell-08285ceac469ae288aeb078675498a31700d87dc.tar.gz

View File

@ -4,7 +4,7 @@
#
################################################################################
MYCROFT_EMBEDDED_SHELL_VERSION = 59923ee87cb407b3c17aa283aa1001ffb8ed2d6f
MYCROFT_EMBEDDED_SHELL_VERSION = 08285ceac469ae288aeb078675498a31700d87dc
MYCROFT_EMBEDDED_SHELL_SITE = $(call github,OpenVoiceOS,mycroft-embedded-shell,$(MYCROFT_EMBEDDED_SHELL_VERSION))
MYCROFT_EMBEDDED_SHELL_LICENSE = Apache License 2.0

View File

@ -4,7 +4,7 @@
#
################################################################################
MYCROFT_SKILL_NEWS_VERSION = c5edbdc5479aa6aff5a6ba17bfdcf4808e846f57
MYCROFT_SKILL_NEWS_VERSION = 7959296f189fd5e06807b9b7fc8fb9d23b22635f
MYCROFT_SKILL_NEWS_SITE = https://github.com/JarbasSkills/skill-news
MYCROFT_SKILL_NEWS_SITE_METHOD = git
MYCROFT_SKILL_NEWS_DIRLOCATION = home/mycroft/.local/share/mycroft/skills

View File

@ -4,7 +4,7 @@
#
################################################################################
MYCROFT_SKILL_OVOS_SETUP_VERSION = 44fc23cf2d84b870fba59fcfd6a056f65ce7ffe2
MYCROFT_SKILL_OVOS_SETUP_VERSION = b9afe3a5af89b8d47b7c1b56fdd95e5ad191068c
MYCROFT_SKILL_OVOS_SETUP_SITE = https://github.com/OpenVoiceOS/skill-ovos-setup
MYCROFT_SKILL_OVOS_SETUP_SITE_METHOD = git
MYCROFT_SKILL_OVOS_SETUP_DIRLOCATION = home/mycroft/.local/share/mycroft/skills

View File

@ -1,192 +0,0 @@
From 79c82a85765730f3c719faa74e1ffd74b63c56ae Mon Sep 17 00:00:00 2001
From: jarbasai <jarbasai@mailfence.com>
Date: Wed, 16 Mar 2022 15:03:33 +0000
Subject: [PATCH] integrate with PHAL
https://github.com/OpenVoiceOS/ovos-PHAL-plugin-alsa
---
__init__.py | 125 +++++++++--------------------------------
blop-mark-diangelo.wav | Bin 87676 -> 0 bytes
2 files changed, 27 insertions(+), 98 deletions(-)
delete mode 100644 blop-mark-diangelo.wav
diff --git a/__init__.py b/__init__.py
index e85793c..03bb87f 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,86 +1,18 @@
-from os.path import dirname, join
-
from adapt.intent import IntentBuilder
from mycroft.skills.core import MycroftSkill, intent_handler, intent_file_handler
-from mycroft.util import play_wav, normalize
+from mycroft.util import normalize
from mycroft.util.parse import extract_number
-from ovos_utils.sound.alsa import AlsaControl
-from mycroft_bus_client import Message
class VolumeSkill(MycroftSkill):
- def __init__(self):
- super(VolumeSkill, self).__init__("VolumeSkill")
- self.volume_sound = join(dirname(__file__), "blop-mark-diangelo.wav")
-
- # bus api
- def initialize(self):
- self.add_event("mycroft.volume.get", self.handle_volume_request)
- self.add_event("mycroft.volume.set", self.handle_volume_change)
- self.add_event("mycroft.volume.set.gui",
- self.handle_volume_change_gui)
- self.handle_volume_request(Message("mycroft.volume.get"))
- self.add_event("mycroft.volume.mute",
- self.handle_mute_intent)
- self.add_event("mycroft.volume.unmute",
- self.handle_unmute_intent)
-
- def handle_volume_request(self, message):
- percent = self.get_volume() / 100
- self.bus.emit(message.response({"percent": percent}))
-
- def handle_volume_change(self, message):
- percent = message.data["percent"] * 100
- self.set_volume(percent)
-
- def handle_volume_change_gui(self, message):
- percent = message.data["percent"] * 100
- self.set_volume(percent, set_by_gui=True)
-
- # volume control
- def get_intro_message(self):
- # just pretend this method is called "on_first_boot"
- # will only run once when the skill is loaded for the first time
- self.set_volume(50)
-
- def get_volume(self):
- return AlsaControl().get_volume_percent()
-
- def set_volume(self, percent=None, set_by_gui=False):
- volume = int(percent)
- volume = min(100, volume)
- volume = max(0, volume)
- AlsaControl().set_volume_percent(volume)
- play_wav(self.volume_sound)
-
- # report change to GUI
- if not set_by_gui:
- percent = volume / 100
- self.handle_volume_request(
- Message("mycroft.volume.get", {"percent": percent}))
-
- def increase_volume(self, volume_change=None):
- if not volume_change:
- volume_change = 15
- AlsaControl().increase_volume(volume_change)
- play_wav(self.volume_sound)
- self.handle_volume_request(Message("mycroft.volume.get"))
-
- def decrease_volume(self, volume_change=None):
- if not volume_change:
- volume_change = -15
- if volume_change > 0:
- volume_change = 0 - volume_change
- AlsaControl().increase_volume(volume_change)
- play_wav(self.volume_sound)
- self.handle_volume_request(Message("mycroft.volume.get"))
# intents
@intent_handler(IntentBuilder("change_volume").require('change_volume'))
def handle_change_volume_intent(self, message):
utterance = message.data['utterance']
volume_change = extract_number(normalize(utterance))
- self.set_volume(volume_change)
+ self.bus.emit(message.forward("mycroft.volume.set",
+ {"percent": volume_change / 100}))
if volume_change >= 100:
self.speak_dialog('max.volume')
else:
@@ -91,61 +23,58 @@ def handle_change_volume_intent(self, message):
def handle_less_volume_intent(self, message):
utterance = message.data['utterance']
volume_change = extract_number(normalize(utterance))
- if volume_change > 0:
- volume_change = 0 - volume_change
- self.decrease_volume(volume_change)
+ self.bus.emit(message.forward("mycroft.volume.decrease",
+ {"percent": volume_change / 100}))
- @intent_handler(
- IntentBuilder("increase_volume").require('increase_volume'))
+ @intent_handler(IntentBuilder("increase_volume").require('increase_volume'))
def handle_increase_volume_intent(self, message):
utterance = message.data['utterance']
volume_change = extract_number(normalize(utterance))
- self.increase_volume(volume_change)
+ self.bus.emit(message.forward("mycroft.volume.increase",
+ {"percent": volume_change / 100}))
@intent_file_handler('max_volume.intent')
def handle_max_volume_intent(self, message):
- self.set_volume(100)
+ self.bus.emit(message.forward("mycroft.volume.set",
+ {"percent": 1.0}))
self.speak_dialog('max.volume')
@intent_file_handler('high_volume.intent')
def handle_high_volume_intent(self, message):
- self.set_volume(85)
+ self.bus.emit(message.forward("mycroft.volume.set",
+ {"percent": 0.9}))
@intent_file_handler('default_volume.intent')
- def handle_default_volume_ntent(self, message):
- self.set_volume(70)
+ def handle_default_volume_intent(self, message):
+ self.bus.emit(message.forward("mycroft.volume.set",
+ {"percent": 0.7}))
@intent_file_handler('low_volume.intent')
def handle_low_volume_intent(self, message):
- self.set_volume(30)
+ self.bus.emit(message.forward("mycroft.volume.set",
+ {"percent": 0.3}))
@intent_file_handler('mute.intent')
def handle_mute_intent(self, message):
- self.log.info("User muted audio.")
- AlsaControl().mute()
- self.bus.emit(Message("mycroft.volume.get").response({"percent" : 0}))
+ self.bus.emit(message.forward("mycroft.volume.mute"))
@intent_file_handler('unmute.intent')
def handle_unmute_intent(self, message):
- alsa = AlsaControl()
- self.log.info("User unmuted audio.")
- alsa.unmute()
- volume = alsa.get_volume_percent()
- self.bus.emit(Message("mycroft.volume.get").response({"percent" : volume / 100}))
+ self.bus.emit(message.forward("mycroft.volume.unmute"))
@intent_file_handler('toggle_mute.intent')
def handle_toggle_unmute_intent(self, message):
- alsa = AlsaControl()
- alsa.toggle_mute()
- muted = alsa.is_muted()
- self.log.info(f"User toggled mute. Result: {'muted' if muted else 'unmuted'}")
- self.bus.emit(Message("mycroft.volume.get").response(
- {"percent" : 0 if muted else (alsa.get_volume_percent() / 100)}))
+ self.bus.emit(message.forward("mycroft.volume.mute.toggle"))
@intent_handler(IntentBuilder("current_volume").require('current_volume'))
def handle_query_volume(self, message):
- volume = AlsaControl().get_volume()
- self.speak_dialog('volume.is', data={'volume': volume})
+ response = self.bus.wait_for_response(message.forward("volume.get"))
+ if response:
+ volume = response.data["percent"] * 100
+ self.speak_dialog('volume.is', data={'volume': volume})
+ else:
+ # TODO dedicated error dialog
+ raise TimeoutError("Failed to get volume")
def create_skill():

View File

@ -4,7 +4,7 @@
#
################################################################################
MYCROFT_SKILL_OVOS_VOLUME_VERSION = c36d2e85654fd128821af57856e028700fd8255c
MYCROFT_SKILL_OVOS_VOLUME_VERSION = 9627e031e883f30bd7d64052e7d5d17b2d239ad8
MYCROFT_SKILL_OVOS_VOLUME_SITE = https://github.com/OpenVoiceOS/skill-ovos-volume
MYCROFT_SKILL_OVOS_VOLUME_SITE_METHOD = git
MYCROFT_SKILL_OVOS_VOLUME_DIRLOCATION = home/mycroft/.local/share/mycroft/skills

View File

@ -1,7 +1,7 @@
From 5040b1a0ad33f51a66afc7f62ad45e45c47941e1 Mon Sep 17 00:00:00 2001
From 2e1e899044533f0e2a3ffd85cf2f1771a7f3de97 Mon Sep 17 00:00:00 2001
From: j1nx <p.steenbergen@j1nx.nl>
Date: Sat, 12 Mar 2022 19:40:48 +0100
Subject: [PATCH 1/1] Bump opm required version to 0.0.13
Date: Thu, 17 Mar 2022 20:23:42 +0100
Subject: [PATCH 1/1] Loosen opm requirement
---
requirements/minimal.txt | 2 +-
@ -9,26 +9,26 @@ Subject: [PATCH 1/1] Bump opm required version to 0.0.13
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/requirements/minimal.txt b/requirements/minimal.txt
index 6e1c6856a2..c7d17622b7 100644
index 3c24f7db5f..f11adf46bf 100644
--- a/requirements/minimal.txt
+++ b/requirements/minimal.txt
@@ -4,4 +4,4 @@ mycroft-messagebus-client~=0.9.1,!=0.9.2,!=0.9.3
psutil~=5.6.6
combo-lock~=0.2
ovos-utils~=0.0.18
-ovos-plugin-manager~=0.0.11a1
ovos-utils~=0.0.20a2
-ovos-plugin-manager~=0.0.12
\ No newline at end of file
+ovos-plugin-manager~=0.0.13a1
+ovos-plugin-manager>=0.0.12
diff --git a/requirements/requirements.txt b/requirements/requirements.txt
index d0116c7203..2b4b101bee 100644
index c562dc9ef2..c0620c7894 100644
--- a/requirements/requirements.txt
+++ b/requirements/requirements.txt
@@ -9,7 +9,7 @@ combo-lock~=0.2
PyYAML~=5.4
ovos-utils~=0.0.18
-ovos-plugin-manager~=0.0.11a1
+ovos-plugin-manager~=0.0.13a1
ovos-utils~=0.0.20a2
-ovos-plugin-manager~=0.0.12
+ovos-plugin-manager>=0.0.12
ovos-tts-plugin-mimic>=0.2.6
ovos-tts-plugin-mimic2>=0.1.4
ovos-tts-plugin-google-tx>=0.0.3

View File

@ -1 +1 @@
sha256 5321597e07888f1a777fb6343c35456645e0943f16298e4fa0276d093010011c python-ovos-core-0ccb531f2b9c0c55dded784d851278d04efbaf79.tar.gz
sha256 06942199485e301cb6b72efdfcde9f78d68a4255cf85a6ba7a3c77645bfc7868 python-ovos-core-739846f917d4525ac3d7ce7074be77be0f32fc9c.tar.gz

View File

@ -4,7 +4,7 @@
#
################################################################################
PYTHON_OVOS_CORE_VERSION = 0ccb531f2b9c0c55dded784d851278d04efbaf79
PYTHON_OVOS_CORE_VERSION = 739846f917d4525ac3d7ce7074be77be0f32fc9c
PYTHON_OVOS_CORE_SITE = $(call github,OpenVoiceOS,ovos-core,$(PYTHON_OVOS_CORE_VERSION))
PYTHON_OVOS_CORE_SETUP_TYPE = setuptools
PYTHON_OVOS_CORE_LICENSE_FILES = LICENSE

View File

@ -1 +1 @@
sha256 3bce582a3bae6a8f31b0735f529460910d3f7246510ba9c478323dd1391ea414 python-ovos-phal-plugin-alsa-dc4a09c8c53f136297bb7c5e0515ad56a77cb491.tar.gz
sha256 9739e77968d8eced96314e4af0d7683af129d5a9596c5f01fb054feb29c9f59b python-ovos-phal-plugin-alsa-681c07943b368d961f82ba0bf254a2db0327b8aa.tar.gz

View File

@ -4,7 +4,7 @@
#
################################################################################
PYTHON_OVOS_PHAL_PLUGIN_ALSA_VERSION = dc4a09c8c53f136297bb7c5e0515ad56a77cb491
PYTHON_OVOS_PHAL_PLUGIN_ALSA_VERSION = 681c07943b368d961f82ba0bf254a2db0327b8aa
PYTHON_OVOS_PHAL_PLUGIN_ALSA_SITE = $(call github,OpenVoiceOS,ovos-PHAL-plugin-alsa,$(PYTHON_OVOS_PHAL_PLUGIN_ALSA_VERSION))
PYTHON_OVOS_PHAL_PLUGIN_ALSA_SETUP_TYPE = setuptools
PYTHON_OVOS_PHAL_PLUGIN_ALSA_LICENSE_FILES = LICENSE

View File

@ -0,0 +1,6 @@
config BR2_PACKAGE_PYTHON_OVOS_PHAL_PLUGIN_MK2
bool "python-ovos-phal-plugin-mk2"
help
OVOS-PHAL Mark-2
https://github.com/OpenVoiceOS/ovos-PHAL-plugin-mk2

View File

@ -0,0 +1 @@
sha256 19f3605e7b938aa8254f7e5636efb44bb58a033f639e2ea662322f0ea97f41e3 python-ovos-phal-plugin-mk2-ca6ea0a21274e623c1d1934b5d201e0dd579ee71.tar.gz

View File

@ -0,0 +1,12 @@
################################################################################
#
# python-ovos-phal-plugin-mk2
#
################################################################################
PYTHON_OVOS_PHAL_PLUGIN_MK2_VERSION = ca6ea0a21274e623c1d1934b5d201e0dd579ee71
PYTHON_OVOS_PHAL_PLUGIN_MK2_SITE = $(call github,OpenVoiceOS,ovos-PHAL-plugin-mk2,$(PYTHON_OVOS_PHAL_PLUGIN_MK2_VERSION))
PYTHON_OVOS_PHAL_PLUGIN_MK2_SETUP_TYPE = setuptools
PYTHON_OVOS_PHAL_PLUGIN_MK2_LICENSE_FILES = LICENSE
$(eval $(python-package))