Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Implement a GUI only workflow #4

Merged
merged 1 commit into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 75 additions & 155 deletions __init__.py

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion locale/en-us/TestKeyword.voc

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/backend.dialog

This file was deleted.

17 changes: 0 additions & 17 deletions locale/en-us/backend.voc

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/choice-failed.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/choose_backend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/confirm-gui.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/confirm.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/confirm_backend.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/confirm_stt.dialog

This file was deleted.

31 changes: 0 additions & 31 deletions locale/en-us/no_backend.voc

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/no_understand.dialog

This file was deleted.

1 change: 0 additions & 1 deletion locale/en-us/select_backend.dialog

This file was deleted.

1 change: 1 addition & 0 deletions locale/en-us/select_backend_gui.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Open voice OS supports multiple backends, The backend provides services used by mycroft core to manage your device, you can choose to pair with the mycroft backend or run locally, select an option on the screen to learn more about the backend
1 change: 0 additions & 1 deletion locale/en-us/select_mycroft_stt.dialog

This file was deleted.

1 change: 1 addition & 0 deletions locale/en-us/select_mycroft_stt_gui.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local backend requires you to select and configure either an online or on device speech to text engine, select an option on the screen to continue
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The local backend is meant for personal usage and does not require pairing, it allows you to run fully offline without a web interface.
The local backend is meant for personal usage and does not require pairing, it allows you to run fully offline without a web interface. To select the local backend, press the confirm button displayed on the screen
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Selene is the official backend provided by Mycroft AI. This requires pairing and provides a web interface for skill settings and device configuration.
Selene is the official backend provided by Mycroft AI. This requires pairing and provides a web interface for skill settings and device configuration. To select the mycroft backend, press the confirm button displayed on the screen.
Binary file removed pairing.gif
Binary file not shown.
12 changes: 6 additions & 6 deletions ui/BackendLocal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore
import Mycroft 1.0 as Mycroft

Mycroft.Delegate {
Item {
id: backendView
anchors.fill: parent
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
// leftPadding: 0
// rightPadding: 0
// topPadding: 0
// bottomPadding: 0
// skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
property bool horizontalMode: backendView.width > backendView.height ? 1 :0

ListModel {
Expand Down
101 changes: 49 additions & 52 deletions ui/BackendLocalConfig.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,71 +22,65 @@ import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore
import Mycroft 1.0 as Mycroft

Mycroft.Delegate {
Item {
id: backendView
anchors.fill: parent
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
property bool horizontalMode: backendView.width > backendView.height ? 1 :0

Rectangle {
color: "#000000"
color: Qt.rgba(0, 0, 0, 1)
anchors.fill: parent

Item {
id: topArea
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.leftMargin: Kirigami.Units.largeSpacing
anchors.rightMargin: Kirigami.Units.largeSpacing
height: Kirigami.Units.gridUnit * 2

Kirigami.Heading {
id: brightnessSettingPageTextHeading
level: 1
wrapMode: Text.WordWrap
anchors.centerIn: parent
font.bold: true
text: "Configure Your STT Engine"
color: "#ff0000"
}
}
anchors.margins: Mycroft.Units.gridUnit * 2

GridLayout {
anchors.fill: parent
z: 1
columns: horizontalMode ? 2 : 1
columnSpacing: Kirigami.Units.largeSpacing
Layout.alignment: horizontalMode ? Qt.AlignVCenter : Qt.AlignTop

Item {
anchors.top: topArea.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.margins: Kirigami.Units.largeSpacing

ColumnLayout {
anchors.fill: parent
spacing: Kirigami.Units.smallSpacing

Layout.maximumWidth: horizontalMode ? parent.width / 2 : parent.width
Layout.preferredHeight: horizontalMode ? parent.height : parent.height / 2
Layout.alignment: horizontalMode ? Qt.AlignVCenter : Qt.AlignTop

Label {
id: warnText
id: configureSttEngineText
Layout.fillWidth: true
wrapMode: Text.WordWrap
font.pixelSize: width * 0.05
text: "Speech-To-Text (STT) is the process of converting audio of spoken words into strings of text. Select and configure Online or On-Device engines"
font.bold: true
font.pixelSize: backendView.width * 0.05
color: "#ff0000"
text: "Configure Your STT Engine"
}

Item {

Label {
id: warnText
Layout.fillWidth: true
Layout.preferredHeight: Kirigami.Units.largeSpacing
Layout.alignment: Qt.AlignTop
wrapMode: Text.WordWrap
font.pixelSize: backendView.width * 0.04
color: "white"
text: "Speech-To-Text (STT) is the process of converting audio of spoken words into strings of text"
}

}

ColumnLayout {
Layout.fillWidth: true
Layout.fillHeight: true

Button {
id: bt1
Layout.fillWidth: true
Layout.fillHeight: true

background: Rectangle {
color: bt1.down ? "#14415E" : "#34a4eb"
color: bt1.down ? "#14415E" : "#34a4fc"
border.width: 6
border.color: Qt.darker("#34a4fc", 1.2)
radius: 10
}

contentItem: Kirigami.Heading {
width: parent.width
height: parent.height
Expand All @@ -97,21 +91,24 @@ Mycroft.Delegate {
level: 3
text: "Google STT"
}

onClicked: {
triggerGuiEvent("mycroft.device.confirm.stt", {"engine": "google"})
}
}

Button {
id: bt2
Layout.fillWidth: true
Layout.fillHeight: true

background: Rectangle {
color: bt2.down ? "#BC4729" : "#eb5934"
color: bt2.down ? "#BC4729" : "#ee5534"
border.width: 6
border.color: Qt.darker("#ee5534", 1.2)
radius: 10
}

contentItem: Kirigami.Heading {
width: parent.width
height: parent.height
Expand All @@ -122,7 +119,7 @@ Mycroft.Delegate {
level: 3
text: "Kaldi STT"
}

onClicked: {
triggerGuiEvent("mycroft.device.confirm.stt",
{"engine": "kaldi"})
Expand Down
10 changes: 5 additions & 5 deletions ui/BackendLocalRestart.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import org.kde.kirigami 2.4 as Kirigami
import Mycroft 1.0 as Mycroft
import org.kde.lottie 1.0

Mycroft.Delegate {
Item {
id: root
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
// leftPadding: 0
// rightPadding: 0
// topPadding: 0
// bottomPadding: 0

Rectangle {
anchors.fill: parent
Expand Down
12 changes: 6 additions & 6 deletions ui/BackendMycroft.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore
import Mycroft 1.0 as Mycroft

Mycroft.Delegate {
Item {
id: backendView
anchors.fill: parent
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
// leftPadding: 0
// rightPadding: 0
// topPadding: 0
// bottomPadding: 0
// skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
property bool horizontalMode: root.width > root.height ? 1 :0

ListModel {
Expand Down
20 changes: 12 additions & 8 deletions ui/BackendSelect.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ import org.kde.kirigami 2.5 as Kirigami
import org.kde.plasma.core 2.0 as PlasmaCore
import Mycroft 1.0 as Mycroft

Mycroft.Delegate {
Item {
id: backendView
anchors.fill: parent
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
// leftPadding: 0
// rightPadding: 0
// topPadding: 0
// bottomPadding: 0
// skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
property bool horizontalMode: backendView.width > backendView.height ? 1 :0

Rectangle {
Expand Down Expand Up @@ -80,7 +80,9 @@ Mycroft.Delegate {
Layout.fillHeight: true

background: Rectangle {
color: bt1.down ? "#14415E" : "#22a7f0"
color: bt1.down ? "#14415E" : "#34a4fc"
border.width: 6
border.color: Qt.darker("#34a4fc", 1.2)
radius: 10
}

Expand All @@ -107,7 +109,9 @@ Mycroft.Delegate {
Layout.fillHeight: true

background: Rectangle {
color: bt2.down ? "#BC4729" : "#eb4934"
color: bt2.down ? "#BC4729" : "#ee5534"
border.width: 6
border.color: Qt.darker("#ee5534", 1.2)
radius: 10
}

Expand Down
12 changes: 6 additions & 6 deletions ui/InstallingSkills.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import org.kde.kirigami 2.4 as Kirigami
import Mycroft 1.0 as Mycroft
import org.kde.lottie 1.0

Mycroft.Delegate {
Item {
id: root
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)
// leftPadding: 0
// rightPadding: 0
// topPadding: 0
// bottomPadding: 0
// skillBackgroundColorOverlay: Qt.rgba(0, 0, 0, 1)

Rectangle {
anchors.fill: parent
Expand Down
15 changes: 7 additions & 8 deletions ui/LoadingScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import org.kde.kirigami 2.4 as Kirigami
import Mycroft 1.0 as Mycroft
import org.kde.lottie 1.0

Mycroft.Delegate {
id: mainLoaderView

property var pageType: sessionData.page_type
leftPadding: 0
rightPadding: 0
bottomPadding: 0
topPadding: 0
Item {
id: loadingScreen
anchors.fill: parent
// leftPadding: 0
// rightPadding: 0
// bottomPadding: 0
// topPadding: 0

Rectangle {
anchors.fill: parent
Expand Down
Loading