This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
forked from MycroftAI/skill-pairing
-
Notifications
You must be signed in to change notification settings - Fork 5
draft: support for backend list #64
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -327,6 +327,18 @@ def _init_setup_options(self): | |
{"name": "Dutch", "code": "nl", "system_code": "nl_NL"} | ||
] | ||
|
||
if "backend_list" not in self.settings: | ||
# backend_name: display name to display in UI | ||
# backend_icon: display icon to display in UI | ||
# backend_type: backend type for configuration | ||
self.settings["backend_list"] = [ | ||
{"backend_name": "No Backend", "backend_icon": "icons/nobackend.svg", "backend_type": "offline"}, | ||
{"backend_name": "Personal Backend", "backend_icon": "icons/personal.svg", "backend_type": "personal"}, | ||
{"backend_name": "OpenVoice Backend", "backend_icon": "icons/ovos.svg", "backend_type": "ovos"}, | ||
{"backend_name": "Neon Backend", "backend_icon": "icons/neongecko.svg", "backend_type": "neon"}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we leave Neon commented out for now? its not fully implemented yet, should only be added after OpenVoiceOS/ovos-backend-client#11 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @NeonDaniel should this say |
||
{"backend_name": "Selene Backend", "backend_icon": "icons/selene.svg", "backend_type": "selene"} | ||
] | ||
|
||
# read default plugins for simplified voice route from settings | ||
# TODO - validate that these are in fact installed | ||
# TODO - parse default value from OPM sorted list, | ||
|
@@ -583,6 +595,7 @@ def handle_backend_menu(self): | |
|
||
self.state = SetupState.SELECTING_BACKEND | ||
self.send_stop_signal("pairing.confirmation.stop") | ||
self.gui["backend_list"] = self.settings["backend_list"] | ||
self.handle_display_manager("BackendSelect") | ||
self.speak_dialog("backend.intro", wait=True) | ||
if self.pairing_mode != PairingMode.VOICE: | ||
|
@@ -635,14 +648,15 @@ def handle_backend_confirmation(self, selection): | |
BackendType.OFFLINE, | ||
BackendType.PERSONAL): | ||
raise ValueError(f"Invalid selection: {selection}") | ||
self.speak_dialog(f"backend.confirm.intro.{selection}", wait=True) | ||
|
||
if self.pairing_mode != PairingMode.VOICE: | ||
self.handle_display_manager(f"Backend{selection.title()}") | ||
self.speak_dialog(f"backend.confirm.intro.{selection}", wait=True) | ||
self.speak_dialog("backend.confirm.gui", | ||
{'backend': self._translate("backend", selection)}, | ||
wait=True) | ||
if self.pairing_mode != PairingMode.GUI: | ||
self.speak_dialog(f"backend.confirm.intro.{selection}", wait=True) | ||
self._backend_confirmation_voice(selection) | ||
|
||
def _backend_confirmation_voice(self, selection): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Auto connects you with Neon Gecko backend API service to provide you with free API endpoints. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Auto connects you with Open Voice OS backend API service to provide you with free API endpoints. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency i think this should say
OpenVoiceOS
Backend, we are usingOVOS
orOpenVoiceOS
everywhere. justOpenVoice
can be confusing since theres many projects using that wording for various different things