natural-language-ui


Namenatural-language-ui JSON
Version 7.1.1 PyPI version JSON
download
home_page
SummaryNatural Language User Interface
upload_time2023-01-31 03:40:30
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2020 Vignesh Sivanandha Rao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords python home-automation natural-language-processing text-to-speech speech-recognition jarvis hotword-detection virtual-assistant
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img src="https://vigneshrao.com/Jarvis/logo.png" width="371px" height="350px">
</p>
<h2 align="center">Natural Language User Interface</h2>

[![ForTheBadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)
[![ForTheBadge built-with-swag](http://ForTheBadge.com/images/badges/built-with-swag.svg)](https://github.com/thevickypedia/Jarvis)

![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)

**Platform Supported**

![Generic badge](https://img.shields.io/badge/Platform-Linux|MacOS|Windows-1f425f.svg)

**Language Stats**

![Language count](https://img.shields.io/github/languages/count/thevickypedia/Jarvis)
![Code coverage](https://img.shields.io/github/languages/top/thevickypedia/Jarvis)

**Repo Stats**

[![GitHub Repo stars](https://img.shields.io/github/stars/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub Repo forks](https://img.shields.io/github/forks/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub Repo watchers](https://img.shields.io/github/watchers/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)

[![GitHub](https://img.shields.io/github/license/thevickypedia/Jarvis)](https://github.com/thevickypedia/Jarvis/blob/master/LICENSE)
[![GitHub repo size](https://img.shields.io/github/repo-size/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub code size](https://img.shields.io/github/languages/code-size/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![LOC](https://img.shields.io/tokei/lines/github/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)

[![GitHub Repo issues](https://img.shields.io/github/issues-closed-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub Repo issues](https://img.shields.io/github/issues-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub Repo pr](https://img.shields.io/github/issues-pr-closed-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub Repo pr](https://img.shields.io/github/issues-pr-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)

**Code Stats**

![Modules](https://img.shields.io/github/search/thevickypedia/Jarvis/module)
![Python](https://img.shields.io/github/search/thevickypedia/Jarvis/.py)
![Threads](https://img.shields.io/github/search/thevickypedia/Jarvis/thread)
![Listener](https://img.shields.io/github/search/thevickypedia/Jarvis/listener)
![Speaker](https://img.shields.io/github/search/thevickypedia/Jarvis/speaker)
![Bash](https://img.shields.io/github/search/thevickypedia/Jarvis/.sh)
![AppleScript](https://img.shields.io/github/search/thevickypedia/Jarvis/.scpt)
![Make](https://img.shields.io/github/search/thevickypedia/Jarvis/Makefile)

**Deployments**

[![pages-build-deployment](https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment)
[![pypi](https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml/badge.svg)](https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml)

[![Pypi-format](https://img.shields.io/pypi/format/jarvis-ironman)](https://pypi.org/project/jarvis-ironman/#files)
[![Pypi-status](https://img.shields.io/pypi/status/jarvis-ironman)](https://pypi.org/project/jarvis-ironman)
[![sourcerank](https://img.shields.io/librariesio/sourcerank/pypi/jarvis-ironman)](https://libraries.io/pypi/jarvis-ironman)

**Activity**

[![GitHub Repo created](https://img.shields.io/date/1599432310)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub last commit](https://img.shields.io/github/last-commit/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)
[![GitHub last release](https://img.shields.io/github/release-date/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)

**Development and Maintenance**

[![Active Development](https://img.shields.io/badge/Development%20Level-Actively%20Developed-success.svg)](https://github.com/thevickypedia/Jarvis)
[![Actively Maintained](https://img.shields.io/badge/Maintenance%20Level-Actively%20Maintained-success.svg)](https://github.com/thevickypedia/Jarvis)
[![Maintainer](https://img.shields.io/badge/Maintained%20By-Vignesh%20Sivanandha%20Rao-blue.svg)](https://vigneshrao.com/)

**Reach Out**

[![StackOverflow](https://img.shields.io/stackexchange/stackoverflow/r/13691532)](https://stackoverflow.com/users/13691532/vignesh-rao)
[![Ask Me | Anything ](https://img.shields.io/badge/Ask%20me-Anything-1abc9c.svg)](https://vigneshrao.com/contact)

## Kick off

**Install**
```shell
python -m pip install jarvis-ironman
```

**Initiate**
```python
import jarvis


if __name__ == '__main__':
    jarvis.start()
```

## Prerequisites
   - **MacOS** <br> _Tested on **macOS High Sierra, Mojave, Catalina, Big Sur, Monterey and Ventura***_
     - `System Preferences` → `Security & Privacy` → `Privacy`
     - Click `+` sign and add the preferred `IDE` and `Terminal` in the following sections in left pane.
       - `Microphone` - **Required** to listen and respond.
       - `Accessibility` - **Required** to use key combinations for brightness and volume controls.
       - `Camera` - **[Optional]** Required only during face recognition/detection.
       - `Automation` - **Required** to control `System Events` and other apps like Outlook and Calendar.
       - `Files and Folders` **[OR]** `Full Disk Access` - **Required** for all `FileIO` operations.

     :warning: Known Issue with <a href=https://pypi.org/project/pyttsx3/>pyttsx3 module</a> on <a href=https://www.apple.com/macos/ventura/> macOS Ventura 13.0</a>: This version of macOS does not hold the attribute `VoiceAge`. <a href=https://github.com/nateshmbhat/pyttsx3/pull/247>Workaround has been raised as a PR</a><br><br>

   - **Linux** <br> _Tested on **Ubuntu 22.04 LTS**_
     - Store the host machine's password as the env var: `ROOT_PASSWORD`
     - Unlike macOS and Windows, `Ubuntu` does not have app specific permissions.

   - **Windows** <br> _Tested on **Windows 10**_
     - `Settings` → `Privacy`
       - `Microphone` - **Required** to listen and respond.
       - `Camera` - **[Optional]** Required only during face recognition/detection.
       - Unlike `macOS`, `Windows` pops a confirmation window to **Allow** or **Deny** access to files and folders.
     - Install [Anaconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html#windows-installers), [VisualStudio C++ BuildTools](https://visualstudio.microsoft.com/visual-cpp-build-tools/), and [Git](https://git-scm.com/download/win/)
     - Make sure C++ build tools are installed completely and restart
     - Add anaconda/miniconda scripts location to `PATH` in Environment Variables

## Test peripherals
**Camera**
```python
from jarvis.modules.camera import camera


if __name__ == '__main__':
    cam_object = camera.Camera()
    print(cam_object.get_index())  # Get index id of each camera
    print(cam_object.list_cameras())  # List all connected cameras
```

**Text to Speech**
```python
from jarvis.modules.speaker import speak


if __name__ == '__main__':
    speak_object = speak.Speaker()
    speak_object.run()
    print(list(speak_object.get_all_voices()))
```

**Speech to Text**
```python
import asyncio

from jarvis.modules.microphone import recognizer


if __name__ == '__main__':
    asyncio.run(recognizer.main())
```

## ENV Variables
Environment variables are loaded from a `.env` file and validated using `pydantic`

<details>
<summary><strong>More on Environment variables</strong></summary>

- **ROOT_PASSWORD** - System password to get the system vitals and run other `sudo` commands. Mandatory for `Linux`
- **NAME** - Name which Jarvis should address the user by. Defaults to `Vignesh`
- **TITLE** - Title which Jarvis should address the user by. Defaults to `sir`
- **PLOT_MIC** - Boolean value whether to show microphone usage in realtime. Defaults to `True`
- **LOG_RETENTION** - Number of days to store the logs. Defaults to `10`
- **WAKE_WORDS** - List of wake words to initiate Jarvis' listener. Defaults to `['jarvis']` (Defaults to `['alexa']` in legacy macOS)<br>
:warning: Jarvis has limitations on the wake words as it relies on ML libraries for wake word detection.

- **VOICE_NAME** - Name of the voice supported by the OperatingSystem. Defaults to the author's favorite.
- **VOICE_RATE** - Speed/rate at which the text should be spoken. Defaults to the value from `pyttsx3` module. Typically `200`

    <details>
    <summary><strong><i>To add more voices</i></strong></summary>

    **macOS**:
    >   - System Preferences → Accessibility → Spoken Content → System voice → Manage Voices...

    **Windows**:
    >   - Settings → Time & Language → Speech → Manage voices → Add voices

    </details>

- **SENSITIVITY** - Hot word detection sensitivity. Allowed range: [0-1] Defaults to `0.5`
- **TIMEOUT** - Timeout in seconds until which the listener should wait for speech. Defaults to `3`
- **PHRASE_LIMIT** - Timeout in seconds until which the listener will remain active. Defaults to `None`
- **LIMITED** - Boolean flag to run only the main version of `Jarvis` skipping background processes. Defaults to `False` Enforced based on the number of CPU cores.
- **DEBUG** - Boolean flag to enable debug level for logging. Defaults to `False`
- **RECOGNIZER_SETTINGS** - A JSON object that has with customized speech recognition settings.

    <details>
    <summary><strong><i>Custom settings for speech recognition</i></strong></summary>

    These are customized according to the author's voice pitch.
    Please use [recognizer.py](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/microphone/recognizer.py) to figure out the suitable values on a trial and error basis.

    > These settings are added (optionally), to avoid the hard coded `PHRASE_LIMIT`
    > <br>
    > Cons in using hard coded `PHRASE_LIMIT`:
    >   - Disables the listener after the set limit even the speaker is actively talking.
    >   - Listener will be active until the set limit even after the speaker has stopped talking.

    Sample settings (formatted as JSON object)
    - `RECOGNIZER_SETTINGS`: `'{"energy_threshold": 1100, "dynamic_energy_threshold": false, "pause_threshold": 2, "phrase_threshold": 0.1, "non_speaking_duration": 2}'`

    **Description**
    - `energy_threshold`: Minimum audio energy to consider for recording. Greater the value, louder the speech should be.
    - `dynamic_energy_threshold`: Change considerable audio energy threshold dynamically.
    - `pause_threshold`: Seconds of non-speaking audio before a phrase is considered complete.
    - `phrase_threshold`: Minimum seconds of speaking audio before it can be considered a phrase - values below this are ignored. This helps to filter out clicks and pops.
    - `non_speaking_duration`: Seconds of non-speaking audio to keep on both sides of the recording.

    </details>

---

### Peripherals
- **CAMERA_INDEX** - Camera index that has to be used. Run [camera.py](https://github.com/thevickypedia/Jarvis/tree/master/jarvis/modules/camera/camera.py) to get the index value of each camera.
- **SPEAKER_INDEX** - Speaker index that has to be used. Run [peripherals.py](https://github.com/thevickypedia/Jarvis/tree/master/jarvis/modules/peripherals.py) to get the index value of each speaker.
- **MICROPHONE_INDEX** - Microphone index that has to be used. Run [peripherals.py](https://github.com/thevickypedia/Jarvis/tree/master/jarvis/modules/peripherals.py) to get the index value of each microphone.

### Features
- **GIT_USER** - GitHub Username
- **GIT_PASS** - GitHub Token
- **WEATHER_API** - API Key from [openweathermap](https://openweathermap.org/) 
- **NEWS_API** - API Key from [newsapi](https://newsapi.org/docs/client-libraries/python)
- **MAPS_API** - API Key for maps from [Google](https://developers.google.com/maps/documentation/maps-static/get-api-key)
- **BIRTHDAY** - Birth date in the format DD-MM - Example: `24-April`
- **WOLFRAM_API_KEY** - API Key from wolfram alpha.

**[Email/SMS notifications](https://github.com/thevickypedia/gmail-connector)**
- **GMAIL_USER** - Gmail account username to send and read emails.
- **GMAIL_PASS** - Gmail account password to send and read emails.
- **ALT_GMAIL_USER** - Alternate gmail account username to send an SMS. (`GMAIL_USER` can be re-used)
- **ALT_GMAIL_PASS** - Alternate gmail account password to send an SMS. (`GMAIL_PASS` can be re-used)
- **RECIPIENT** - Email address to which the emails from jarvis have to be received.

**iOS integrations**
- **ICLOUD_USER** - iCloud account username/email.
- **ICLOUD_PASS** - iCloud account password.
- **ICLOUD_RECOVERY** - Recovery phone number to activate lost mode on a target device - Example: `+11234567890`
- **PHONE_NUMBER** - To send SMS from Jarvis - Example: `+11234567890`

**Calendar/Meeting integrations**
- **ICS_URL** - Shared calendar URL to get meetings information from. Should end with `.ics`
- **EVENT_APP** - To read events from `outlook` or `calendar` application in `macOS`. Defaults to `calendar` <br>
:bulb: &nbsp; When `calender` is used, the name of the _calendar_ within the `Calendar.app` should be **Jarvis** <br>

**Background scans [Defaults to 1 hour]**
- **SYNC_MEETINGS** - Interval in seconds to generate ``meetings`` information using an `ics` URL.
- **SYNC_EVENTS** - Interval in seconds to generate ``events`` information using `calendar` or `outlook` application.

**[Wi-Fi Controls](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/wifi/connector.py)**
- **WIFI_SSID** - SSID of the wireless connection.
- **WIFI_PASSWORD** - Password for the wireless connection.
- **CONNECTION_RETRY** - Frequency in seconds to check for an active internet connection. Defaults to 10 seconds.

**[VPNServer](https://github.com/thevickypedia/vpn-server) integration**
- **VPN_USERNAME** - Username to create vpn-server. Defaults to profile username.
- **VPN_PASSWORD** - Password to authenticate vpn-server. Defaults to profile password.
- **VPN_DOMAIN** - Domain name for the hosted zone.
- **VPN_RECORD_NAME** - Alias record name to access VPN server.

**[Car Controls](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/car)** - Applies only for JLR vehicles subscribed to `InControl` application.
- **CAR_EMAIL** - Email address to log in to InControl API.
- **CAR_PASS** - Password to authenticate InControl API.
- **CAR_PIN** - InControl PIN.

**[Garage Controls](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/myq/myq.py)** - Applies only for garages using [MyQ garage controller](https://www.myq.com/products/smart-garage-control).
- **MYQ_USERNAME** - Email address to log in to MyQ API.
- **MYQ_PASSWORD** - Password to authenticate MyQ API.

**[Telegram Bot](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/executors/telegram.py) integration**
- **BOT_TOKEN** - Telegram BOT token.
- **BOT_CHAT_IDS** - UserID/ChatID for a particular user.
- **BOT_USERS** - Usernames that should have access to Jarvis.

**[OS Agnostic Voice Model](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/audio/speech_synthesis.py)**
- **SPEECH_SYNTHESIS_TIMEOUT** - Timeout to connect to the docker container that processes text to speech requests.
- **SPEECH_SYNTHESIS_VOICE** - Voice for the speech synthesis model. Defaults to author's favorite.
- **SPEECH_SYNTHESIS_QUALITY** - Quality of speech synthesis conversion. Defaults to `medium`. <br>
    <details>
    <summary><strong><i>To enable independent speech-synthesis</i></strong></summary>

    ```shell
    docker run \
        -it \
        -p 5002:5002 \
        -e "HOME=${HOME}" \
        -v "$HOME:${HOME}" \
        -v /usr/share/ca-certificates:/usr/share/ca-certificates \
        -v /etc/ssl/certs:/etc/ssl/certs \
        -w "${PWD}" \
        --user "$(id -u):$(id -g)" \
        rhasspy/larynx
    ```

    :bulb: &nbsp; Speech Synthesis can run on a docker container for better voices but, response might be negligibly slower. If you don't have docker installed or simply don't want to use it, set the `SPEECH_SYNTHESIS_TIMEOUT` env var to 0. This is also done automatically if failed to launch a docker container upon startup.

    </details>

---

**[Offline communicator](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/executors/offline.py)**
- **OFFLINE_PORT** - Port number to initiate offline communicator. Defaults to `4483`
- **OFFLINE_PASS** - Secure phrase to authenticate offline requests. Defaults to `OfflineComm`
- **WORKERS** - Number of uvicorn workers (processes) to spin up. Defaults to `1`

**Stock Portfolio**
- **ROBINHOOD_USER** - Robinhood account username.
- **ROBINHOOD_PASS** - Robinhood account password.
- **ROBINHOOD_QR** - Robinhood login [QR code](https://robinhood.com/account/settings)

**API Features**
- **ROBINHOOD_ENDPOINT_AUTH** - Authentication token to access the robinhood portfolio which is generated every hour.
- **SURVEILLANCE_ENDPOINT_AUTH** - Token to access webcam live feed via Jarvis API.
- **SURVEILLANCE_SESSION_TIMEOUT** - Session time out for `/surveillance`. Defaults to 300 seconds.

</details>

### Background Tasks
There are two options to run background tasks on Jarvis.

- Jarvis can run internal tasks (offline communicator compatible) at certain intervals using a `background_tasks.yaml` file stored in `fileio` directory.
    <details>
    <summary><strong><i>Setup Instructions</i></strong></summary>

  This is the sample content of `background_tasks.yaml`

    ```yaml
    - seconds: 1_800
      task: just turn off all lights  # Runs every 30 minutes - 'just' flag retains the lights' last setting (eg: brightness or color)
    - seconds: 10_800
      task: remind me to drink water  # Runs every 3 hours ignoring the hours specified
      ignore_hours:
       - 21
       - 22
       - 23
       - 0
       - 1
       - 2
       - 3
       - 4
       - 5
       - 6
    ```
    </details>

- **CRONTAB** - Runs external tasks using cron expressions. Needs to be stored as env var.
    <details>
    <summary><strong><i>Sample value</i></strong></summary>

    ```yaml
    [
      "0 0 * * 1-5/2 find /var/log -delete",
      "0 5 * * 1 tar -zcf /var/backups/home.tgz /home/"
    ]
    ```
    </details>

### Contacts
Jarvis can send on demand notifications using a ``contacts.yaml`` file stored in ``fileio`` directory. Uses [gmail-connector](https://pypi.org/project/gmail-connector/) for SMS and email notifications.

<details>
<summary><strong><i>Setup Instructions</i></strong></summary>

> Note: Jarvis currently supports sending emails only when the ``contacts.yaml`` file is present, however phone numbers can be used directly.

```yaml
phone:
  Tony: 0123456789
  Thor: 1234567890
email:
  Eddard: ned@gmail.com
  Aegon: egg@yahoo.com
```
</details>

### Smart Devices
A source file `smart_devices.yaml` is used to store smart devices' hostnames.
Jarvis supports `MagicHome` for [lights](https://www.amazon.com/gp/product/B08C7GY43L), `LGWebOS` and `Roku` for TVs.

- TV hostnames should include the brand name [`LG`/`Roku`] to distinguish the modules accordingly.
  - This will be set by default, if yours doesn't include the brand name change it in the TV settings.

- To wake up `Roku` TVs using MAC address, make sure the `Bandwidth saver` feature is turned off under,
    ```text
    Settings/Network/Bandwidth saver >> Off
    ```

- For first time users on `LGWebOS` TVs, there will be a prompt on the TV to accept the connection request.
  - Once the connection request is accepted a client key will be generated and logged.
  - Please make sure to store this in `smart_devices.yaml` file to avoid repeated connection prompt.

<details>
<summary><strong><i>Setup Instructions</i></strong></summary>

- TV identifiers should have the word `tv` to distinguish between lights and tv.
- The name used in the keys (for both lights and tv) will be the identifier when an action is requested.
- Lights should be a dictionary of identifier and a list of hostnames.
- TVs should be a nested dictionary of multiple parameters.
- The source file (`smart_devices.yaml`) should be as following:

```yaml
bedroom:
  - 'HOSTNAMES'
hallway:
  - 'HOSTNAMES'
hallway basement:
  - 'HOSTNAMES'
kitchen:
  - 'HOSTNAMES'
living room:
  - 'HOSTNAMES'
party mode:  # Light hostnames that needs to be engaged for party mode, if not present individual lights can be enabled
  - 'HOSTNAMES'
living room tv:
  hostname: 'HOSTNAME'
  client_key: 'CLIENT_KEY'  # Generated automatically if unavailable
  mac_address:  # Mac addresses can either be a string or a list
  - 'WIRED_MAC_ADDRESS'
  - 'WIRELESS_MAC_ADDRESS'
bedroom tv:
  hostname: 'HOSTNAME'
  mac_address: 'MAC_ADDRESS'
```
</details>

### Automation Setup [Optional]
Jarvis can execute [offline compatible](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/offline/compatibles.py) tasks 
at pre-defined times without any user interaction. Uses an `automation.yaml` file as source which should be stored 
within the directory `fileio`

<details>
<summary><strong><i>Setup Instructions</i></strong></summary>

The YAML file should be a dictionary within a dictionary that looks like the below.

**OPTIONAL:** The key, `day` can be a `list` of days, or a `str` of a specific day or simply a `str` saying `weekday` or
`weekend` when the particular automation should be executed.

> Not having the key `day` will run the automation daily.
> Date format should match exactly as described below.

```yaml
06:00 AM:
  day: weekday  # Runs only between Monday and Friday
  task: set my bedroom lights to 50%
06:30 AM:
  day:  # Runs only on Monday, Wednesday and Friday
  - Monday
  - wednesday
  - FRIDAY
  task: set my bedroom lights to 100%
08:00 AM:  # Runs only on Saturday and Sunday
  day: weekend
  task: set my bedroom lights to 100%
09:00 PM:  # Runs daily
  task: set my bedroom lights to 5%
12:00 AM:  # Even performs tasks that are not supported via voice commands
  task: restart all background processes
```
</details>

### Simulation Setup [Optional]
Jarvis can execute [offline compatible](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/offline/compatibles.py) tasks 
as a simulation to test the required functions and send an email with the results. Uses a `simulation.yaml` file as source which should be stored
within the directory `fileio`

<details>
<summary><strong><i>Setup Instructions</i></strong></summary>

The YAML file should be a list of phrases within a dictionary that looks like the below.

```yaml
meeting_event:
- get me the events from my calendar
- what meetings do I have today
```

</details>

## Guide
Please refer to the [wiki](https://github.com/thevickypedia/Jarvis/wiki) page for API usage, access controls, env variables, features' overview and demo videos.

## FAQs
Please refer to the [FAQs](https://github.com/thevickypedia/Jarvis/wiki/FAQs) section of the wiki.

## Coding Standards
Docstring format: [`Google`](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) <br>
Styling conventions: [`PEP 8`](https://www.python.org/dev/peps/pep-0008/) <br>
Clean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/) and 
[`isort`](https://pycqa.github.io/isort/)

## [Release Notes](https://github.com/thevickypedia/Jarvis/blob/master/release_notes.rst)
**Requirement**
```shell
python -m pip install changelog-generator
```

**Usage**
```shell
changelog reverse -f release_notes.rst -t 'Release Notes'
```

## Linting
`PreCommit` will ensure linting, and the doc creation are run on every commit.

**Requirement**
```shell
pip install sphinx==5.1.1 pre-commit recommonmark
```

**Usage**
```shell
pre-commit run --all-files
```

## Pypi Package
[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)](https://packaging.python.org/tutorials/packaging-projects/)

[https://pypi.org/project/jarvis-ironman/](https://pypi.org/project/jarvis-ironman/)

## Runbook
[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html)

[https://thevickypedia.github.io/Jarvis/](https://thevickypedia.github.io/Jarvis/)

## License & copyright

&copy; Vignesh Sivanandha Rao

Licensed under the [MIT License](https://github.com/thevickypedia/Jarvis/blob/master/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "natural-language-ui",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "python,home-automation,natural-language-processing,text-to-speech,speech-recognition,jarvis,hotword-detection,virtual-assistant",
    "author": "",
    "author_email": "Vignesh Sivanandha Rao <svignesh1793@gmail.com>",
    "download_url": "",
    "platform": null,
    "description": "<p align=\"center\">\n  <img src=\"https://vigneshrao.com/Jarvis/logo.png\" width=\"371px\" height=\"350px\">\n</p>\n<h2 align=\"center\">Natural Language User Interface</h2>\n\n[![ForTheBadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)\n[![ForTheBadge built-with-swag](http://ForTheBadge.com/images/badges/built-with-swag.svg)](https://github.com/thevickypedia/Jarvis)\n\n![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)\n\n**Platform Supported**\n\n![Generic badge](https://img.shields.io/badge/Platform-Linux|MacOS|Windows-1f425f.svg)\n\n**Language Stats**\n\n![Language count](https://img.shields.io/github/languages/count/thevickypedia/Jarvis)\n![Code coverage](https://img.shields.io/github/languages/top/thevickypedia/Jarvis)\n\n**Repo Stats**\n\n[![GitHub Repo stars](https://img.shields.io/github/stars/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub Repo forks](https://img.shields.io/github/forks/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub Repo watchers](https://img.shields.io/github/watchers/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n\n[![GitHub](https://img.shields.io/github/license/thevickypedia/Jarvis)](https://github.com/thevickypedia/Jarvis/blob/master/LICENSE)\n[![GitHub repo size](https://img.shields.io/github/repo-size/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub code size](https://img.shields.io/github/languages/code-size/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![LOC](https://img.shields.io/tokei/lines/github/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n\n[![GitHub Repo issues](https://img.shields.io/github/issues-closed-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub Repo issues](https://img.shields.io/github/issues-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub Repo pr](https://img.shields.io/github/issues-pr-closed-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub Repo pr](https://img.shields.io/github/issues-pr-raw/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n\n**Code Stats**\n\n![Modules](https://img.shields.io/github/search/thevickypedia/Jarvis/module)\n![Python](https://img.shields.io/github/search/thevickypedia/Jarvis/.py)\n![Threads](https://img.shields.io/github/search/thevickypedia/Jarvis/thread)\n![Listener](https://img.shields.io/github/search/thevickypedia/Jarvis/listener)\n![Speaker](https://img.shields.io/github/search/thevickypedia/Jarvis/speaker)\n![Bash](https://img.shields.io/github/search/thevickypedia/Jarvis/.sh)\n![AppleScript](https://img.shields.io/github/search/thevickypedia/Jarvis/.scpt)\n![Make](https://img.shields.io/github/search/thevickypedia/Jarvis/Makefile)\n\n**Deployments**\n\n[![pages-build-deployment](https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/thevickypedia/Jarvis/actions/workflows/pages/pages-build-deployment)\n[![pypi](https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml/badge.svg)](https://github.com/thevickypedia/Jarvis/actions/workflows/python-publish.yml)\n\n[![Pypi-format](https://img.shields.io/pypi/format/jarvis-ironman)](https://pypi.org/project/jarvis-ironman/#files)\n[![Pypi-status](https://img.shields.io/pypi/status/jarvis-ironman)](https://pypi.org/project/jarvis-ironman)\n[![sourcerank](https://img.shields.io/librariesio/sourcerank/pypi/jarvis-ironman)](https://libraries.io/pypi/jarvis-ironman)\n\n**Activity**\n\n[![GitHub Repo created](https://img.shields.io/date/1599432310)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub last commit](https://img.shields.io/github/last-commit/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n[![GitHub last release](https://img.shields.io/github/release-date/thevickypedia/Jarvis)](https://api.github.com/repos/thevickypedia/Jarvis)\n\n**Development and Maintenance**\n\n[![Active Development](https://img.shields.io/badge/Development%20Level-Actively%20Developed-success.svg)](https://github.com/thevickypedia/Jarvis)\n[![Actively Maintained](https://img.shields.io/badge/Maintenance%20Level-Actively%20Maintained-success.svg)](https://github.com/thevickypedia/Jarvis)\n[![Maintainer](https://img.shields.io/badge/Maintained%20By-Vignesh%20Sivanandha%20Rao-blue.svg)](https://vigneshrao.com/)\n\n**Reach Out**\n\n[![StackOverflow](https://img.shields.io/stackexchange/stackoverflow/r/13691532)](https://stackoverflow.com/users/13691532/vignesh-rao)\n[![Ask Me | Anything ](https://img.shields.io/badge/Ask%20me-Anything-1abc9c.svg)](https://vigneshrao.com/contact)\n\n## Kick off\n\n**Install**\n```shell\npython -m pip install jarvis-ironman\n```\n\n**Initiate**\n```python\nimport jarvis\n\n\nif __name__ == '__main__':\n    jarvis.start()\n```\n\n## Prerequisites\n   - **MacOS** <br> _Tested on **macOS High Sierra, Mojave, Catalina, Big Sur, Monterey and Ventura***_\n     - `System Preferences` \u2192 `Security & Privacy` \u2192 `Privacy`\n     - Click `+` sign and add the preferred `IDE` and `Terminal` in the following sections in left pane.\n       - `Microphone` - **Required** to listen and respond.\n       - `Accessibility` - **Required** to use key combinations for brightness and volume controls.\n       - `Camera` - **[Optional]** Required only during face recognition/detection.\n       - `Automation` - **Required** to control `System Events` and other apps like Outlook and Calendar.\n       - `Files and Folders` **[OR]** `Full Disk Access` - **Required** for all `FileIO` operations.\n\n     :warning: Known Issue with <a href=https://pypi.org/project/pyttsx3/>pyttsx3 module</a> on <a href=https://www.apple.com/macos/ventura/> macOS Ventura 13.0</a>: This version of macOS does not hold the attribute `VoiceAge`. <a href=https://github.com/nateshmbhat/pyttsx3/pull/247>Workaround has been raised as a PR</a><br><br>\n\n   - **Linux** <br> _Tested on **Ubuntu 22.04 LTS**_\n     - Store the host machine's password as the env var: `ROOT_PASSWORD`\n     - Unlike macOS and Windows, `Ubuntu` does not have app specific permissions.\n\n   - **Windows** <br> _Tested on **Windows 10**_\n     - `Settings` \u2192 `Privacy`\n       - `Microphone` - **Required** to listen and respond.\n       - `Camera` - **[Optional]** Required only during face recognition/detection.\n       - Unlike `macOS`, `Windows` pops a confirmation window to **Allow** or **Deny** access to files and folders.\n     - Install [Anaconda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html#windows-installers), [VisualStudio C++ BuildTools](https://visualstudio.microsoft.com/visual-cpp-build-tools/), and [Git](https://git-scm.com/download/win/)\n     - Make sure C++ build tools are installed completely and restart\n     - Add anaconda/miniconda scripts location to `PATH` in Environment Variables\n\n## Test peripherals\n**Camera**\n```python\nfrom jarvis.modules.camera import camera\n\n\nif __name__ == '__main__':\n    cam_object = camera.Camera()\n    print(cam_object.get_index())  # Get index id of each camera\n    print(cam_object.list_cameras())  # List all connected cameras\n```\n\n**Text to Speech**\n```python\nfrom jarvis.modules.speaker import speak\n\n\nif __name__ == '__main__':\n    speak_object = speak.Speaker()\n    speak_object.run()\n    print(list(speak_object.get_all_voices()))\n```\n\n**Speech to Text**\n```python\nimport asyncio\n\nfrom jarvis.modules.microphone import recognizer\n\n\nif __name__ == '__main__':\n    asyncio.run(recognizer.main())\n```\n\n## ENV Variables\nEnvironment variables are loaded from a `.env` file and validated using `pydantic`\n\n<details>\n<summary><strong>More on Environment variables</strong></summary>\n\n- **ROOT_PASSWORD** - System password to get the system vitals and run other `sudo` commands. Mandatory for `Linux`\n- **NAME** - Name which Jarvis should address the user by. Defaults to `Vignesh`\n- **TITLE** - Title which Jarvis should address the user by. Defaults to `sir`\n- **PLOT_MIC** - Boolean value whether to show microphone usage in realtime. Defaults to `True`\n- **LOG_RETENTION** - Number of days to store the logs. Defaults to `10`\n- **WAKE_WORDS** - List of wake words to initiate Jarvis' listener. Defaults to `['jarvis']` (Defaults to `['alexa']` in legacy macOS)<br>\n:warning: Jarvis has limitations on the wake words as it relies on ML libraries for wake word detection.\n\n- **VOICE_NAME** - Name of the voice supported by the OperatingSystem. Defaults to the author's favorite.\n- **VOICE_RATE** - Speed/rate at which the text should be spoken. Defaults to the value from `pyttsx3` module. Typically `200`\n\n    <details>\n    <summary><strong><i>To add more voices</i></strong></summary>\n\n    **macOS**:\n    >   - System Preferences \u2192 Accessibility \u2192 Spoken Content \u2192 System voice \u2192 Manage Voices...\n\n    **Windows**:\n    >   - Settings \u2192 Time & Language \u2192 Speech \u2192 Manage voices \u2192 Add voices\n\n    </details>\n\n- **SENSITIVITY** - Hot word detection sensitivity. Allowed range: [0-1] Defaults to `0.5`\n- **TIMEOUT** - Timeout in seconds until which the listener should wait for speech. Defaults to `3`\n- **PHRASE_LIMIT** - Timeout in seconds until which the listener will remain active. Defaults to `None`\n- **LIMITED** - Boolean flag to run only the main version of `Jarvis` skipping background processes. Defaults to `False` Enforced based on the number of CPU cores.\n- **DEBUG** - Boolean flag to enable debug level for logging. Defaults to `False`\n- **RECOGNIZER_SETTINGS** - A JSON object that has with customized speech recognition settings.\n\n    <details>\n    <summary><strong><i>Custom settings for speech recognition</i></strong></summary>\n\n    These are customized according to the author's voice pitch.\n    Please use [recognizer.py](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/microphone/recognizer.py) to figure out the suitable values on a trial and error basis.\n\n    > These settings are added (optionally), to avoid the hard coded `PHRASE_LIMIT`\n    > <br>\n    > Cons in using hard coded `PHRASE_LIMIT`:\n    >   - Disables the listener after the set limit even the speaker is actively talking.\n    >   - Listener will be active until the set limit even after the speaker has stopped talking.\n\n    Sample settings (formatted as JSON object)\n    - `RECOGNIZER_SETTINGS`: `'{\"energy_threshold\": 1100, \"dynamic_energy_threshold\": false, \"pause_threshold\": 2, \"phrase_threshold\": 0.1, \"non_speaking_duration\": 2}'`\n\n    **Description**\n    - `energy_threshold`: Minimum audio energy to consider for recording. Greater the value, louder the speech should be.\n    - `dynamic_energy_threshold`: Change considerable audio energy threshold dynamically.\n    - `pause_threshold`: Seconds of non-speaking audio before a phrase is considered complete.\n    - `phrase_threshold`: Minimum seconds of speaking audio before it can be considered a phrase - values below this are ignored. This helps to filter out clicks and pops.\n    - `non_speaking_duration`: Seconds of non-speaking audio to keep on both sides of the recording.\n\n    </details>\n\n---\n\n### Peripherals\n- **CAMERA_INDEX** - Camera index that has to be used. Run [camera.py](https://github.com/thevickypedia/Jarvis/tree/master/jarvis/modules/camera/camera.py) to get the index value of each camera.\n- **SPEAKER_INDEX** - Speaker index that has to be used. Run [peripherals.py](https://github.com/thevickypedia/Jarvis/tree/master/jarvis/modules/peripherals.py) to get the index value of each speaker.\n- **MICROPHONE_INDEX** - Microphone index that has to be used. Run [peripherals.py](https://github.com/thevickypedia/Jarvis/tree/master/jarvis/modules/peripherals.py) to get the index value of each microphone.\n\n### Features\n- **GIT_USER** - GitHub Username\n- **GIT_PASS** - GitHub Token\n- **WEATHER_API** - API Key from [openweathermap](https://openweathermap.org/) \n- **NEWS_API** - API Key from [newsapi](https://newsapi.org/docs/client-libraries/python)\n- **MAPS_API** - API Key for maps from [Google](https://developers.google.com/maps/documentation/maps-static/get-api-key)\n- **BIRTHDAY** - Birth date in the format DD-MM - Example: `24-April`\n- **WOLFRAM_API_KEY** - API Key from wolfram alpha.\n\n**[Email/SMS notifications](https://github.com/thevickypedia/gmail-connector)**\n- **GMAIL_USER** - Gmail account username to send and read emails.\n- **GMAIL_PASS** - Gmail account password to send and read emails.\n- **ALT_GMAIL_USER** - Alternate gmail account username to send an SMS. (`GMAIL_USER` can be re-used)\n- **ALT_GMAIL_PASS** - Alternate gmail account password to send an SMS. (`GMAIL_PASS` can be re-used)\n- **RECIPIENT** - Email address to which the emails from jarvis have to be received.\n\n**iOS integrations**\n- **ICLOUD_USER** - iCloud account username/email.\n- **ICLOUD_PASS** - iCloud account password.\n- **ICLOUD_RECOVERY** - Recovery phone number to activate lost mode on a target device - Example: `+11234567890`\n- **PHONE_NUMBER** - To send SMS from Jarvis - Example: `+11234567890`\n\n**Calendar/Meeting integrations**\n- **ICS_URL** - Shared calendar URL to get meetings information from. Should end with `.ics`\n- **EVENT_APP** - To read events from `outlook` or `calendar` application in `macOS`. Defaults to `calendar` <br>\n:bulb: &nbsp; When `calender` is used, the name of the _calendar_ within the `Calendar.app` should be **Jarvis** <br>\n\n**Background scans [Defaults to 1 hour]**\n- **SYNC_MEETINGS** - Interval in seconds to generate ``meetings`` information using an `ics` URL.\n- **SYNC_EVENTS** - Interval in seconds to generate ``events`` information using `calendar` or `outlook` application.\n\n**[Wi-Fi Controls](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/wifi/connector.py)**\n- **WIFI_SSID** - SSID of the wireless connection.\n- **WIFI_PASSWORD** - Password for the wireless connection.\n- **CONNECTION_RETRY** - Frequency in seconds to check for an active internet connection. Defaults to 10 seconds.\n\n**[VPNServer](https://github.com/thevickypedia/vpn-server) integration**\n- **VPN_USERNAME** - Username to create vpn-server. Defaults to profile username.\n- **VPN_PASSWORD** - Password to authenticate vpn-server. Defaults to profile password.\n- **VPN_DOMAIN** - Domain name for the hosted zone.\n- **VPN_RECORD_NAME** - Alias record name to access VPN server.\n\n**[Car Controls](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/car)** - Applies only for JLR vehicles subscribed to `InControl` application.\n- **CAR_EMAIL** - Email address to log in to InControl API.\n- **CAR_PASS** - Password to authenticate InControl API.\n- **CAR_PIN** - InControl PIN.\n\n**[Garage Controls](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/myq/myq.py)** - Applies only for garages using [MyQ garage controller](https://www.myq.com/products/smart-garage-control).\n- **MYQ_USERNAME** - Email address to log in to MyQ API.\n- **MYQ_PASSWORD** - Password to authenticate MyQ API.\n\n**[Telegram Bot](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/executors/telegram.py) integration**\n- **BOT_TOKEN** - Telegram BOT token.\n- **BOT_CHAT_IDS** - UserID/ChatID for a particular user.\n- **BOT_USERS** - Usernames that should have access to Jarvis.\n\n**[OS Agnostic Voice Model](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/audio/speech_synthesis.py)**\n- **SPEECH_SYNTHESIS_TIMEOUT** - Timeout to connect to the docker container that processes text to speech requests.\n- **SPEECH_SYNTHESIS_VOICE** - Voice for the speech synthesis model. Defaults to author's favorite.\n- **SPEECH_SYNTHESIS_QUALITY** - Quality of speech synthesis conversion. Defaults to `medium`. <br>\n    <details>\n    <summary><strong><i>To enable independent speech-synthesis</i></strong></summary>\n\n    ```shell\n    docker run \\\n        -it \\\n        -p 5002:5002 \\\n        -e \"HOME=${HOME}\" \\\n        -v \"$HOME:${HOME}\" \\\n        -v /usr/share/ca-certificates:/usr/share/ca-certificates \\\n        -v /etc/ssl/certs:/etc/ssl/certs \\\n        -w \"${PWD}\" \\\n        --user \"$(id -u):$(id -g)\" \\\n        rhasspy/larynx\n    ```\n\n    :bulb: &nbsp; Speech Synthesis can run on a docker container for better voices but, response might be negligibly slower. If you don't have docker installed or simply don't want to use it, set the `SPEECH_SYNTHESIS_TIMEOUT` env var to 0. This is also done automatically if failed to launch a docker container upon startup.\n\n    </details>\n\n---\n\n**[Offline communicator](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/executors/offline.py)**\n- **OFFLINE_PORT** - Port number to initiate offline communicator. Defaults to `4483`\n- **OFFLINE_PASS** - Secure phrase to authenticate offline requests. Defaults to `OfflineComm`\n- **WORKERS** - Number of uvicorn workers (processes) to spin up. Defaults to `1`\n\n**Stock Portfolio**\n- **ROBINHOOD_USER** - Robinhood account username.\n- **ROBINHOOD_PASS** - Robinhood account password.\n- **ROBINHOOD_QR** - Robinhood login [QR code](https://robinhood.com/account/settings)\n\n**API Features**\n- **ROBINHOOD_ENDPOINT_AUTH** - Authentication token to access the robinhood portfolio which is generated every hour.\n- **SURVEILLANCE_ENDPOINT_AUTH** - Token to access webcam live feed via Jarvis API.\n- **SURVEILLANCE_SESSION_TIMEOUT** - Session time out for `/surveillance`. Defaults to 300 seconds.\n\n</details>\n\n### Background Tasks\nThere are two options to run background tasks on Jarvis.\n\n- Jarvis can run internal tasks (offline communicator compatible) at certain intervals using a `background_tasks.yaml` file stored in `fileio` directory.\n    <details>\n    <summary><strong><i>Setup Instructions</i></strong></summary>\n\n  This is the sample content of `background_tasks.yaml`\n\n    ```yaml\n    - seconds: 1_800\n      task: just turn off all lights  # Runs every 30 minutes - 'just' flag retains the lights' last setting (eg: brightness or color)\n    - seconds: 10_800\n      task: remind me to drink water  # Runs every 3 hours ignoring the hours specified\n      ignore_hours:\n       - 21\n       - 22\n       - 23\n       - 0\n       - 1\n       - 2\n       - 3\n       - 4\n       - 5\n       - 6\n    ```\n    </details>\n\n- **CRONTAB** - Runs external tasks using cron expressions. Needs to be stored as env var.\n    <details>\n    <summary><strong><i>Sample value</i></strong></summary>\n\n    ```yaml\n    [\n      \"0 0 * * 1-5/2 find /var/log -delete\",\n      \"0 5 * * 1 tar -zcf /var/backups/home.tgz /home/\"\n    ]\n    ```\n    </details>\n\n### Contacts\nJarvis can send on demand notifications using a ``contacts.yaml`` file stored in ``fileio`` directory. Uses [gmail-connector](https://pypi.org/project/gmail-connector/) for SMS and email notifications.\n\n<details>\n<summary><strong><i>Setup Instructions</i></strong></summary>\n\n> Note: Jarvis currently supports sending emails only when the ``contacts.yaml`` file is present, however phone numbers can be used directly.\n\n```yaml\nphone:\n  Tony: 0123456789\n  Thor: 1234567890\nemail:\n  Eddard: ned@gmail.com\n  Aegon: egg@yahoo.com\n```\n</details>\n\n### Smart Devices\nA source file `smart_devices.yaml` is used to store smart devices' hostnames.\nJarvis supports `MagicHome` for [lights](https://www.amazon.com/gp/product/B08C7GY43L), `LGWebOS` and `Roku` for TVs.\n\n- TV hostnames should include the brand name [`LG`/`Roku`] to distinguish the modules accordingly.\n  - This will be set by default, if yours doesn't include the brand name change it in the TV settings.\n\n- To wake up `Roku` TVs using MAC address, make sure the `Bandwidth saver` feature is turned off under,\n    ```text\n    Settings/Network/Bandwidth saver >> Off\n    ```\n\n- For first time users on `LGWebOS` TVs, there will be a prompt on the TV to accept the connection request.\n  - Once the connection request is accepted a client key will be generated and logged.\n  - Please make sure to store this in `smart_devices.yaml` file to avoid repeated connection prompt.\n\n<details>\n<summary><strong><i>Setup Instructions</i></strong></summary>\n\n- TV identifiers should have the word `tv` to distinguish between lights and tv.\n- The name used in the keys (for both lights and tv) will be the identifier when an action is requested.\n- Lights should be a dictionary of identifier and a list of hostnames.\n- TVs should be a nested dictionary of multiple parameters.\n- The source file (`smart_devices.yaml`) should be as following:\n\n```yaml\nbedroom:\n  - 'HOSTNAMES'\nhallway:\n  - 'HOSTNAMES'\nhallway basement:\n  - 'HOSTNAMES'\nkitchen:\n  - 'HOSTNAMES'\nliving room:\n  - 'HOSTNAMES'\nparty mode:  # Light hostnames that needs to be engaged for party mode, if not present individual lights can be enabled\n  - 'HOSTNAMES'\nliving room tv:\n  hostname: 'HOSTNAME'\n  client_key: 'CLIENT_KEY'  # Generated automatically if unavailable\n  mac_address:  # Mac addresses can either be a string or a list\n  - 'WIRED_MAC_ADDRESS'\n  - 'WIRELESS_MAC_ADDRESS'\nbedroom tv:\n  hostname: 'HOSTNAME'\n  mac_address: 'MAC_ADDRESS'\n```\n</details>\n\n### Automation Setup [Optional]\nJarvis can execute [offline compatible](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/offline/compatibles.py) tasks \nat pre-defined times without any user interaction. Uses an `automation.yaml` file as source which should be stored \nwithin the directory `fileio`\n\n<details>\n<summary><strong><i>Setup Instructions</i></strong></summary>\n\nThe YAML file should be a dictionary within a dictionary that looks like the below.\n\n**OPTIONAL:** The key, `day` can be a `list` of days, or a `str` of a specific day or simply a `str` saying `weekday` or\n`weekend` when the particular automation should be executed.\n\n> Not having the key `day` will run the automation daily.\n> Date format should match exactly as described below.\n\n```yaml\n06:00 AM:\n  day: weekday  # Runs only between Monday and Friday\n  task: set my bedroom lights to 50%\n06:30 AM:\n  day:  # Runs only on Monday, Wednesday and Friday\n  - Monday\n  - wednesday\n  - FRIDAY\n  task: set my bedroom lights to 100%\n08:00 AM:  # Runs only on Saturday and Sunday\n  day: weekend\n  task: set my bedroom lights to 100%\n09:00 PM:  # Runs daily\n  task: set my bedroom lights to 5%\n12:00 AM:  # Even performs tasks that are not supported via voice commands\n  task: restart all background processes\n```\n</details>\n\n### Simulation Setup [Optional]\nJarvis can execute [offline compatible](https://github.com/thevickypedia/Jarvis/blob/master/jarvis/modules/offline/compatibles.py) tasks \nas a simulation to test the required functions and send an email with the results. Uses a `simulation.yaml` file as source which should be stored\nwithin the directory `fileio`\n\n<details>\n<summary><strong><i>Setup Instructions</i></strong></summary>\n\nThe YAML file should be a list of phrases within a dictionary that looks like the below.\n\n```yaml\nmeeting_event:\n- get me the events from my calendar\n- what meetings do I have today\n```\n\n</details>\n\n## Guide\nPlease refer to the [wiki](https://github.com/thevickypedia/Jarvis/wiki) page for API usage, access controls, env variables, features' overview and demo videos.\n\n## FAQs\nPlease refer to the [FAQs](https://github.com/thevickypedia/Jarvis/wiki/FAQs) section of the wiki.\n\n## Coding Standards\nDocstring format: [`Google`](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) <br>\nStyling conventions: [`PEP 8`](https://www.python.org/dev/peps/pep-0008/) <br>\nClean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/) and \n[`isort`](https://pycqa.github.io/isort/)\n\n## [Release Notes](https://github.com/thevickypedia/Jarvis/blob/master/release_notes.rst)\n**Requirement**\n```shell\npython -m pip install changelog-generator\n```\n\n**Usage**\n```shell\nchangelog reverse -f release_notes.rst -t 'Release Notes'\n```\n\n## Linting\n`PreCommit` will ensure linting, and the doc creation are run on every commit.\n\n**Requirement**\n```shell\npip install sphinx==5.1.1 pre-commit recommonmark\n```\n\n**Usage**\n```shell\npre-commit run --all-files\n```\n\n## Pypi Package\n[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)](https://packaging.python.org/tutorials/packaging-projects/)\n\n[https://pypi.org/project/jarvis-ironman/](https://pypi.org/project/jarvis-ironman/)\n\n## Runbook\n[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html)\n\n[https://thevickypedia.github.io/Jarvis/](https://thevickypedia.github.io/Jarvis/)\n\n## License & copyright\n\n&copy; Vignesh Sivanandha Rao\n\nLicensed under the [MIT License](https://github.com/thevickypedia/Jarvis/blob/master/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020 Vignesh Sivanandha Rao  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Natural Language User Interface",
    "version": "7.1.1",
    "split_keywords": [
        "python",
        "home-automation",
        "natural-language-processing",
        "text-to-speech",
        "speech-recognition",
        "jarvis",
        "hotword-detection",
        "virtual-assistant"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5299124e19878686227e8391b566cd9a52ce7b917b4f5ba599afb033fff9354e",
                "md5": "8a5ef553c6943dd10bc42bd8038116c2",
                "sha256": "61e79d11e9888b3ca6c9633a485b147f850c60c0ebc9211af74bcff09c85d8f8"
            },
            "downloads": -1,
            "filename": "natural_language_ui-7.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8a5ef553c6943dd10bc42bd8038116c2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3626203,
            "upload_time": "2023-01-31T03:40:30",
            "upload_time_iso_8601": "2023-01-31T03:40:30.219645Z",
            "url": "https://files.pythonhosted.org/packages/52/99/124e19878686227e8391b566cd9a52ce7b917b4f5ba599afb033fff9354e/natural_language_ui-7.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-31 03:40:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "natural-language-ui"
}
        
Elapsed time: 0.03619s