Code Monkey home page Code Monkey logo

skill-ovos-setup's Introduction

OVOS - Setup

Setup your device, choose a voice and optionally connect to a backend server

WARNING: end users SHOULD NOT install this, if it is needed then it will ship with our images, if you installed ovos manually this will only cause you issues

If the skill wasnt pre-installed, don't do it yourself

About

This skill will offer you the option to select Personal, or no backend, an offline or online STT as well choose the voice your device will use

Examples

  • "Pair my device" (happens automatically on first run if not paired already)

Credits

Mycroft AI (@MycroftAI)

Category

Configuration

Tags

#pair #pairing #connectivity #system

skill-ovos-setup's People

Contributors

aatchison avatar adocampo avatar aiix avatar aleale99 avatar augustnmonteiro avatar btotharye avatar dave-esch avatar davidwagnerkc avatar emphasize avatar forslund avatar gras64 avatar j1nx avatar jarbasal avatar kathyreid avatar krisgesling avatar learnedvector avatar linuxipho avatar luke5sky avatar matthewscholefield avatar neondaniel avatar nils avatar puretryout avatar

Stargazers

 avatar

Watchers

 avatar  avatar

skill-ovos-setup's Issues

Initial testing on feat/voice_pairing branch

Initial thoughts and tests.
On boot, pairing comes up with 3 choices and audio sounds good.
My choice "Run locally"
Once again the voice sounds good with the validation
First bug*

  • When mycroft asks Did i understand correctly you want to use the offline backend it does not give time to answer. When it re-asks, works fine.
  • I answer yes and then the real error occurs
    • Mycroft says An error occurred while processing a request in Pairing Skill
      This is the logs
2022-09-18 14:59:02.023 - OVOS - ovos_config.config:_on_file_change:269 - INFO - /home/mycroft/.config/mycroft/mycroft.conf changed on disk, reloading!
2022-09-18 14:59:02.046 - OVOS - ovos_config.models:load_local:136 - ERROR - Error loading configuration '/home/mycroft/.config/mycroft/mycroft.conf'
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/ovos_config/models.py", line 131, in load_local
    config = load_commented_json(path)
  File "/usr/lib/python3.10/site-packages/ovos_utils/json_helper.py", line 129, in load_commented_json
    return json.loads(uncomment_json(contents))
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2022-09-18 14:59:02.269 - OVOS - mycroft.audio.service:execute_tts:157 - INFO - Speak: An error occurred while processing a request in Pairing Skill

I am assuming that it is not writing the file correctly? But it does add the server section at the end.

cat .config/mycroft/mycroft.conf 
{
  "tts": {
    "module": "ovos-tts-plugin-marytts",
    "neon-tts-plugin-larynx-server": {
      "host": "http://tts.neon.ai",
      "voice": "mary_ann",
      "vocoder": "hifi_gan/vctk_small"
    },
    "ovos-tts-plugin-marytts": {
      "url": "http://ziggy.ziggyhome:59125",
      "voice": "en_US/vctk_low#s5"
    }
  },
  "system_unit": "imperial",
  "location": {
    "city": {
      "code": "Orchard City",
      "name": "Hotchkiss",
      "state": {
        "code": "CO",
        "name": "Colorado",
        "country": {
          "code": "US",
          "name": "United States"
        }
      }
    },
    "coordinate": {
      "latitude": 38.8455879,
      "longitude": -107.7932359
    },
    "timezone": {
      "code": "America/Denver",
      "name": "Moutain Standard Time",
      "dstOffset": 3600000,
      "offset": -21600000
    }
  },
  "opt_in": true,
  "Audio": {
    "backends": {
      "OCP": {
        "type": "ovos_common_play",
        "dbus_type": "system",
        "manage_external_players": true,
        "active": true,
        "youtube_backend": "youtube-dl",
        "ydl_backend": "auto"
      },
      "vlc": {
        "type": "ovos_vlc",
        "active": true
      },
      "simple": {
        "type": "ovos_audio_simple",
        "active": true
      }
    },
    "default-backend": "OCP"
  },
  "gui": {
    "extension": "smartspeaker",
    "idle_display_skill": "skill-ovos-homescreen.builderjer"
  },
  "date_format": "MDY-us",
  "VAD": {
    "silence_method": "vad_and_ratio",
    "speech_seconds": 0.1,
    "silence_seconds": 0.5,
    "before_seconds": 0.5,
    "min_seconds": 1,
    "max_current_ratio_threshold": 2,
    "initial_energy_threshold": 1000.0,
    "module": "ovos-vad-plugin-webrtcvad",
    "ovos-vad-plugin-silero": {
      "threshold": 0.2
    },
    "ovos-vad-plugin-webrtcvad": {
      "vad_mode": 3
    }
  },
  "padatious": {
    "intent_cache": "~/.local/share/mycroft/intent_cache",
    "train_delay": 4,
    "single_thread": false,
    "regex_only": false,
    "fuzz": true
  },
  "server": {
    "disabled": true
  }

ROADMAP

this skill has been evolving to become more and more like a OS first setup installer, kinda like Calamares

please discuss what direction you would like this skill to go here

  • default to offline usage, no backend needed
  • remove voice route, if wanted that should be it's own skill with different constraints
  • add desktop file, so users can start setup anytime from GUI
  • add standalone launcher script, so one can fully configure ovos without it running
    • standalone skills now supported in ovos-workshop
  • optional stage in first boot (enabled via ready_settings in mycroft.conf)
  • enable lang selection menu by default (currently behind skill settings)
  • enable backend selection menu #64
  • add voice intents for setting some config values

relevant discussions:

imagem

imagem

imagem

"Expected a dict config and got None"

When I have skill-ovos-setup installed the ovos-core log is spammed with the following:

2023-06-23 14:14:04.393 - skills - ovos_utils.signal:get_ipc_directory:26 - WARNING - Deprecation version=0.1.0. Caller=ovos_utils.sound:277. Expected a dict config and got None.

DISCUSSION: Modulerize Setup Process

The current setup skill is based on a sequence of events, from welcome screen to end of setup, each backend is also tied into its own process (maybe a separate issue).

Current Process:

  • Setup Loading Screen (Transition between wifi and setup skill)
  • Welcome Screen
  • Language Selection Screen (Currently Disabled By Default)
  • Backend Menu Selection Screen
  • Selene Backend -> Own Pairing Process Screens -> End
  • Personal Backend -> Own Process -> End
  • No Backend -> STT Selection -> TTS Selection -> End

Proposed Changes:
Modularization of the setup process, specifically let images decide what modules to show. We can define the current setup process in a break down of modules into default_modules list to display by default if image wants or advance_modules list

Default Modules:

  • loading (transition) (not optional)

  • welcome (optional, preferred: enabled & in default)

  • language (optional, preferred: enabled (when available) & in default)

  • backend: (optional, preferred: enabled & in default)
    -- If Backend is enabled then:

    • allow the backend to take over its own pairing / setup process at least for (Selene, Personal Backend),
    • If no backend is selected show quick_setup_no_backend
  • quick_setup: (optional, preferred: disabled & in default) (allows users to skip or continue to advanced config)

  • quick_setup_no_backend (not optional if backend is enabled, not needed if backend is disabled, allows users to use defaults set by image or continue to advanced config) (preferred: enabled & in default)

Advanced Modules:

  • tts (optional, preferred: advance)
  • stt (optional, preferred: advance)
  • ww (optional, preferred: advance)
  • timzeone and location (optional, preferred: advance)

All module handling will be done by module loader that will read the list of modules to load and show them in that order, All ui "next" actions will be connected to this module loader next action

DISCUSSION: tts / stt options ordering

We are in early stages of support for arbitrary plugins, the way it works is as follows:

  • each plugin can report a number of valid configs, the stuff you would put in mycroft.conf + some UI metadata (WIP stuff)
  • those configs are usually filtered by language when that makes sense, such as TTS and STT in this skill
  • plugin developers can assign a "priority" to each sample config
  • priority goes from 0 (top of list) to 100 (last option)
  • GUI can only support 20 options without crashing, no more than 20 will show up in the skill
    • other tools such as OCA have no limit

a very relevant example is mimic3, it has hundreds of voices!

so how do we solve this and choose what to display where?

  • we need to choose a set of plugins + configs we want to assign high priority
  • we need to send known to be "inferior" options to the bottom
  • most plugins currently default to a priority of 50 or 60
  • 0 - 10 should remain reserved for future usage, lets start at 10

how can you help? let me know in this issue about any AWESOME of meh plugins! send PRs to each plugin repo tweaking the priority setting

Add support for "enable_stt_selection", "enable_tts_selection", "enable_backend_selection"

Workflow changes ?

  • Option "enable_backend_selection":

    • What pages need to be show once this is disabled ?
    • How does it affect page selection ?
    • Voice Process Changes ?
  • Option "enable_tts_selection":

    • Same as above
  • Option "enable_stt_selection":

    • Same as above
  • Additionally what happens when all three are disabled ?

    • Setup skill itself should not activate, since there is now no need for setup skill at all ?

Setup skill after completion seems to capture all intents

The device is left non function after setup has completed as all intent are captured by the setup skill

  • Partial solution so far disable the whole converse method and it works again
2022-10-18 07:02:58.855 - skills - mycroft.skills.intent_service:_normalize_all_utterances:61 - DEBUG - Utterances: [('what is the current time',)]
2022-10-18 07:02:58.855 - skills - mycroft.skills.intent_service:_normalize_all_utterances:61 - DEBUG - Utterances: [('what is the current time',)]
2022-10-18 07:02:58.862 - skills - mycroft.skills.intent_service:_normalize_all_utterances:61 - DEBUG - Utterances: [('what is the current time',)]
2022-10-18 07:02:58.862 - skills - mycroft.skills.intent_service:_normalize_all_utterances:61 - DEBUG - Utterances: [('what is the current time',)]
2022-10-18 07:02:58.866 - skills - mycroft.skills.intent_services.padatious_service:_match_level:87 - DEBUG - Padatious Matching confidence > 0.95

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.