OpenVoiceOS / ovos-installer

Open Voice OS and/or HiveMind installer using Ansible with an intuitive and easy Text-based User Interface
https://www.openvoiceos.org
81 stars 24 forks source link

Add autoconfig support to installer #170

Closed suvanbanerjee closed 1 month ago

suvanbanerjee commented 1 month ago

Closes #157

Summary by CodeRabbit

suvanbanerjee commented 1 month ago

@goldyfruit will this file structure work, I will ask user for autoconfig questions and then run the command accordingly, to tackle the region issue we can find region using their ip to detect their country so if someone chooses English in Australia then its en-au, en-> from his language choice au-> from his country ip

JarbasAl commented 1 month ago

@goldyfruit will this file structure work, I will ask user for autoconfig questions and then run the command accordingly, to tackle the region issue we can find region using their ip to detect their country so if someone chooses English in Australia then its en-au, en-> from his language choice au-> from his country ip

i wouldnt worry about this for now, as the translations currently are all for en-us , setting a different code might just cause issues with no benefit

only portuguese currently differentiates between pt-br and pt-pt, no other language supports different dialect lang codes (yet)

goldyfruit commented 1 month ago

I would not prompt any questions about the auto configuration. By default if French is selected then the assistant should be configured to in French, etc...

About the male or female voice, this question should be handle by the core team as its part of the OVOS's persona.

@JarbasAl @j1nx Do we want to have a male or female persona?

JarbasAl commented 1 month ago

team

If not prompting user, keep it male

suvanbanerjee commented 1 month ago

If not prompting user, keep it male

I guess the standard for voice assistant is female ?

JarbasAl commented 1 month ago

If not prompting user, keep it male

I guess the standard for voice assistant is female ?

historically we have used the male voice from alan pope, which goes well with "hey mycroft". let's keep it that way

besides, its a good differentiation factor in comparison with other voice assistants

goldyfruit commented 1 month ago

@suvanbanerjee I just pushed a commit, please have a look.

coderabbitai[bot] commented 1 month ago

Walkthrough

The pull request introduces new tasks in Ansible playbooks for auto-configuration of Speech-to-Text (STT) and Text-to-Speech (TTS) using the ovos-config command. This feature is conditionally executed based on the user's profile, specifically when it is not set to "server". Minor formatting adjustments were made to enhance the readability of existing tasks without altering their functionality.

Changes

File Path Change Summary
ansible/roles/ovos_installer/tasks/docker/composer.yml Added task for running ovos-config for STT and TTS auto-configuration; minor formatting adjustments made.
ansible/roles/ovos_installer/tasks/virtualenv/venv.yml Introduced task for running ovos-config for STT and TTS auto-configuration; updated file ownership command for performance.

Assessment against linked issues

Objective Addressed Explanation
Use ovos-config for STT and TTS auto-configuration (#[157])

🐇 In the garden where the code does play,
New tasks bloom bright, guiding the way.
With ovos-config, we sing and cheer,
Auto-configured voices, loud and clear!
TTS and STT, together they thrive,
In the world of speech, we come alive! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
goldyfruit commented 1 month ago

mycroft.conf generated by the ovos-config seems off.

{
  "log_level": "INFO",
  "play_wav_cmdline": "pw-play %1",
  "play_mp3_cmdline": "pw-play %1",
  "lang": "ca-ES",
  "listener": {
    "remove_silence": true,
    "VAD": {
      "module": "ovos-vad-plugin-silero"
    },
    "instant_listen": true
  },
  "skills": {
    "installer": {
      "allow_pip": true,
      "allow_alphas": true
    }
  },
  "websocket": {
    "max_msg_size": 25
  },
  "PHAL": {
    "ovos-PHAL-plugin-wifi-setup": {
      "module": "ovos-PHAL-plugin-wifi-setup",
      "lang": "ca-ES",
      "secondary_langs": [],
      "system_unit": "metric",
      "temperature_unit": "celsius",
      "windspeed_unit": "km/h",
      "precipitation_unit": "mm",
      "time_format": "full",
      "spoken_time_format": "half",
      "date_format": "DMY",
      "opt_in": false,
      "confirm_listening": true,
      "ready_settings": [
        "skills"
      ],
      "ignore_logs": [
        "enclosure.mouth.viseme",
        "enclosure.mouth.display"
      ],
      "enable_old_audioservice": true,
      "debug": false,
      "log_level": "INFO",
      "play_wav_cmdline": "pw-play %1",
      "play_mp3_cmdline": "pw-play %1",
      "first_boot": false
    }
  },
  "tts": {
    "ovos-tts-plugin-server": {
      "host": [
        "https://tts.smartgic.io/matxa",
        "https://matxa.ziggyai.online"
      ],
      "voice": "central/grau"
    },
    "module": "ovos-tts-plugin-server"
  },
  "stt": {
    "ovos-stt-plugin-server": {
      "url": [
        "https://stt.smartgic.io/citrinet",
        "https://citrinetstt.ziggyai.online"
      ]
    },
    "module": "ovos-stt-plugin-server",
    "fallback_module": ""
  },
  "system_unit": "metric",
  "temperature_unit": "celsius",
  "windspeed_unit": "km/h",
  "precipitation_unit": "mm",
  "time_format": "full",
  "spoken_time_format": "half",
  "date_format": "DMY"
}
goldyfruit commented 1 month ago

mycroft.conf generated by the ovos-config seems off.

{
  "log_level": "INFO",
  "play_wav_cmdline": "pw-play %1",
  "play_mp3_cmdline": "pw-play %1",
  "lang": "ca-ES",
  "listener": {
    "remove_silence": true,
    "VAD": {
      "module": "ovos-vad-plugin-silero"
    },
    "instant_listen": true
  },
  "skills": {
    "installer": {
      "allow_pip": true,
      "allow_alphas": true
    }
  },
  "websocket": {
    "max_msg_size": 25
  },
  "PHAL": {
    "ovos-PHAL-plugin-wifi-setup": {
      "module": "ovos-PHAL-plugin-wifi-setup",
      "lang": "ca-ES",
      "secondary_langs": [],
      "system_unit": "metric",
      "temperature_unit": "celsius",
      "windspeed_unit": "km/h",
      "precipitation_unit": "mm",
      "time_format": "full",
      "spoken_time_format": "half",
      "date_format": "DMY",
      "opt_in": false,
      "confirm_listening": true,
      "ready_settings": [
        "skills"
      ],
      "ignore_logs": [
        "enclosure.mouth.viseme",
        "enclosure.mouth.display"
      ],
      "enable_old_audioservice": true,
      "debug": false,
      "log_level": "INFO",
      "play_wav_cmdline": "pw-play %1",
      "play_mp3_cmdline": "pw-play %1",
      "first_boot": false
    }
  },
  "tts": {
    "ovos-tts-plugin-server": {
      "host": [
        "https://tts.smartgic.io/matxa",
        "https://matxa.ziggyai.online"
      ],
      "voice": "central/grau"
    },
    "module": "ovos-tts-plugin-server"
  },
  "stt": {
    "ovos-stt-plugin-server": {
      "url": [
        "https://stt.smartgic.io/citrinet",
        "https://citrinetstt.ziggyai.online"
      ]
    },
    "module": "ovos-stt-plugin-server",
    "fallback_module": ""
  },
  "system_unit": "metric",
  "temperature_unit": "celsius",
  "windspeed_unit": "km/h",
  "precipitation_unit": "mm",
  "time_format": "full",
  "spoken_time_format": "half",
  "date_format": "DMY"
}

I removed the ovos-PHAL-plugin-wifi-setup package which is the culprit.

suvanbanerjee commented 1 month ago

thanks @goldyfruit for the pr's it made my job super easy 😅, i think this pr is ready to review and push, if there are any more changes please require do tell me

goldyfruit commented 1 month ago

thanks @goldyfruit for the pr's it made my job super easy 😅

I mostly did it as you can learn from it for the next time.

goldyfruit commented 1 month ago

@suvanbanerjee have you tried this PR?