Skip to content

Commit

Permalink
Feature improvements and bug fixes on JarvisAPI
Browse files Browse the repository at this point in the history
Support audio responses for multiple and timed tasks
Exhaust all audio options before returning string
Resolve edge case scenario in pyttsx3
Enable speech-synthesis if audio driver fails
Create weather alert monitor to notify harsh weather
Remove redundant template
  • Loading branch information
dormant-user committed Apr 22, 2023
1 parent 919a2c8 commit a8e77c0
Show file tree
Hide file tree
Showing 36 changed files with 465 additions and 229 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ Environment variables are loaded from a `.env` file and validated using `pydanti
- **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.

**Scheduled Weather Alert**
- **WEATHER_ALERT** - Time (in 24h `HH:MM` format) when the weather alert should be fired - Example: `09:00`
> Alerts in SMS and Email if temperature is higher than 100 or lower than 36 or severe weather warnings.<br>
> This feature can also be enabled from `automation.yaml` by using the keyword `weather` in phrase for the `task`
**[Wi-Fi Controls](https://github.com/thevickypedia/pywifi-controls)**
- **WIFI_SSID** - SSID of the wireless connection.
- **WIFI_PASSWORD** - Password for the wireless connection.
Expand Down Expand Up @@ -284,7 +289,7 @@ Environment variables are loaded from a `.env` file and validated using `pydanti
-v /etc/ssl/certs:/etc/ssl/certs \
-w "${PWD}" \
--user "$(id -u):$(id -g)" \
rhasspy/larynx
thevickypedia/speech-synthesis
```

: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.
Expand Down
10 changes: 9 additions & 1 deletion docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ <h2>Features<a class="headerlink" href="#features" title="Permalink to this head
<li><p><strong>SYNC_MEETINGS</strong> - Interval in seconds to generate <code class="docutils literal notranslate"><span class="pre">meetings</span></code> information using an <code class="docutils literal notranslate"><span class="pre">ics</span></code> URL.</p></li>
<li><p><strong>SYNC_EVENTS</strong> - Interval in seconds to generate <code class="docutils literal notranslate"><span class="pre">events</span></code> information using <code class="docutils literal notranslate"><span class="pre">calendar</span></code> or <code class="docutils literal notranslate"><span class="pre">outlook</span></code> application.</p></li>
</ul>
<p><strong>Scheduled Weather Alert</strong></p>
<ul class="simple">
<li><p><strong>WEATHER_ALERT</strong> - Time (in 24h <code class="docutils literal notranslate"><span class="pre">HH:MM</span></code> format) when the weather alert should be fired - Example: <code class="docutils literal notranslate"><span class="pre">09:00</span></code></p></li>
</ul>
<blockquote>
<div><p>Alerts in SMS and Email if temperature is higher than 100 or lower than 36 or severe weather warnings.<br>
This feature can also be enabled from <code class="docutils literal notranslate"><span class="pre">automation.yaml</span></code> by using the keyword <code class="docutils literal notranslate"><span class="pre">weather</span></code> in phrase for the <code class="docutils literal notranslate"><span class="pre">task</span></code></p>
</div></blockquote>
<p><strong><a class="reference external" href="https://github.com/thevickypedia/pywifi-controls">Wi-Fi Controls</a></strong></p>
<ul class="simple">
<li><p><strong>WIFI_SSID</strong> - SSID of the wireless connection.</p></li>
Expand Down Expand Up @@ -331,7 +339,7 @@ <h2>Features<a class="headerlink" href="#features" title="Permalink to this head
<span class="w"> </span>-v<span class="w"> </span>/etc/ssl/certs:/etc/ssl/certs<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-w<span class="w"> </span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">PWD</span><span class="si">}</span><span class="s2">&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--user<span class="w"> </span><span class="s2">&quot;</span><span class="k">$(</span>id<span class="w"> </span>-u<span class="k">)</span><span class="s2">:</span><span class="k">$(</span>id<span class="w"> </span>-g<span class="k">)</span><span class="s2">&quot;</span><span class="w"> </span><span class="se">\</span>
<span class="w"> </span>rhasspy/larynx
<span class="w"> </span>thevickypedia/speech-synthesis
</pre></div>
</div>
<p>:bulb:   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 <code class="docutils literal notranslate"><span class="pre">SPEECH_SYNTHESIS_TIMEOUT</span></code> env var to 0. This is also done automatically if failed to launch a docker container upon startup.</p>
Expand Down
7 changes: 6 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ Environment variables are loaded from a `.env` file and validated using `pydanti
- **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.

**Scheduled Weather Alert**
- **WEATHER_ALERT** - Time (in 24h `HH:MM` format) when the weather alert should be fired - Example: `09:00`
> Alerts in SMS and Email if temperature is higher than 100 or lower than 36 or severe weather warnings.<br>
> This feature can also be enabled from `automation.yaml` by using the keyword `weather` in phrase for the `task`
**[Wi-Fi Controls](https://github.com/thevickypedia/pywifi-controls)**
- **WIFI_SSID** - SSID of the wireless connection.
- **WIFI_PASSWORD** - Password for the wireless connection.
Expand Down Expand Up @@ -284,7 +289,7 @@ Environment variables are loaded from a `.env` file and validated using `pydanti
-v /etc/ssl/certs:/etc/ssl/certs \
-w "${PWD}" \
--user "$(id -u):$(id -g)" \
rhasspy/larynx
thevickypedia/speech-synthesis
```

: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.
Expand Down
7 changes: 6 additions & 1 deletion docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ Environment variables are loaded from a `.env` file and validated using `pydanti
- **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.

**Scheduled Weather Alert**
- **WEATHER_ALERT** - Time (in 24h `HH:MM` format) when the weather alert should be fired - Example: `09:00`
> Alerts in SMS and Email if temperature is higher than 100 or lower than 36 or severe weather warnings.<br>
> This feature can also be enabled from `automation.yaml` by using the keyword `weather` in phrase for the `task`

**[Wi-Fi Controls](https://github.com/thevickypedia/pywifi-controls)**
- **WIFI_SSID** - SSID of the wireless connection.
- **WIFI_PASSWORD** - Password for the wireless connection.
Expand Down Expand Up @@ -284,7 +289,7 @@ Environment variables are loaded from a `.env` file and validated using `pydanti
-v /etc/ssl/certs:/etc/ssl/certs \
-w "${PWD}" \
--user "$(id -u):$(id -g)" \
rhasspy/larynx
thevickypedia/speech-synthesis
```

: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.
Expand Down
6 changes: 6 additions & 0 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,12 @@ Weather
:members:
:undoc-members:

====

.. automodule:: jarvis.executors.weather_monitor
:members:
:undoc-members:

Word Match
==========

Expand Down
43 changes: 33 additions & 10 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ <h2 id="_">_</h2>
</li>
<li><a href="index.html#jarvis.modules.telegram.file_handler._list_files">_list_files() (in module jarvis.modules.telegram.file_handler)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#jarvis.modules.car.connector.Connect._login_user">_login_user() (jarvis.modules.car.connector.Connect method)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#jarvis.modules.models.models._main_process_validations">_main_process_validations() (in module jarvis.modules.models.models)</a>
</li>
<li><a href="index.html#jarvis.modules.telegram.bot.TelegramBot._make_request">_make_request() (jarvis.modules.telegram.bot.TelegramBot method)</a>
Expand Down Expand Up @@ -190,6 +190,8 @@ <h2 id="_">_</h2>
<li><a href="index.html#jarvis.modules.car.controller.Control._preconditioning_control">_preconditioning_control() (jarvis.modules.car.controller.Control method)</a>
</li>
<li><a href="index.html#jarvis.modules.car.controller.Control._prov_command">_prov_command() (jarvis.modules.car.controller.Control method)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig._rate">_rate (jarvis.modules.models.classes.EnvConfig attribute)</a>
</li>
<li><a href="index.html#jarvis.modules.tv.lg.LGWebOS._reconnect">_reconnect (jarvis.modules.tv.lg.LGWebOS attribute)</a>
</li>
Expand Down Expand Up @@ -605,6 +607,10 @@ <h2 id="E">E</h2>
<li><a href="index.html#jarvis.modules.models.classes.Indicators.end">(jarvis.modules.models.classes.Indicators attribute)</a>
</li>
</ul></li>
<li><a href="index.html#jarvis.modules.templates.templates.endpoint">endpoint (in module jarvis.modules.templates.templates)</a>
</li>
<li><a href="index.html#jarvis.modules.templates.templates.EndpointTemplates">EndpointTemplates (class in jarvis.modules.templates.templates)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.RecognizerSettings.energy_threshold">energy_threshold (jarvis.modules.models.classes.RecognizerSettings attribute)</a>
</li>
<li><a href="index.html#jarvis.api.squire.discover.Entrypoint">Entrypoint (class in jarvis.api.squire.discover)</a>
Expand All @@ -616,11 +622,11 @@ <h2 id="E">E</h2>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig">EnvConfig (class in jarvis.modules.models.classes)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.Config">EnvConfig.Config (class in jarvis.modules.models.classes)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.event_app">event_app (jarvis.modules.models.classes.EnvConfig attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.event_app">event_app (jarvis.modules.models.classes.EnvConfig attribute)</a>
</li>
<li><a href="index.html#jarvis.modules.meetings.events.event_app_launcher">event_app_launcher() (in module jarvis.modules.meetings.events)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.FileIO.event_script">event_script (jarvis.modules.models.classes.FileIO attribute)</a>
Expand Down Expand Up @@ -1424,6 +1430,13 @@ <h2 id="J">J</h2>

<ul>
<li><a href="index.html#module-jarvis.executors.weather">module</a>
</li>
</ul></li>
<li>
jarvis.executors.weather_monitor

<ul>
<li><a href="index.html#module-jarvis.executors.weather_monitor">module</a>
</li>
</ul></li>
<li>
Expand Down Expand Up @@ -2031,6 +2044,8 @@ <h2 id="M">M</h2>
<li><a href="index.html#module-jarvis.executors.vpn_server">jarvis.executors.vpn_server</a>
</li>
<li><a href="index.html#module-jarvis.executors.weather">jarvis.executors.weather</a>
</li>
<li><a href="index.html#module-jarvis.executors.weather_monitor">jarvis.executors.weather_monitor</a>
</li>
<li><a href="index.html#module-jarvis.executors.wiki">jarvis.executors.wiki</a>
</li>
Expand Down Expand Up @@ -2128,7 +2143,11 @@ <h2 id="M">M</h2>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#jarvis.api.routers.surveillance.monitor">monitor() (in module jarvis.api.routers.surveillance)</a>

<ul>
<li><a href="index.html#jarvis.executors.weather_monitor.monitor">(in module jarvis.executors.weather_monitor)</a>
</li>
</ul></li>
<li><a href="index.html#jarvis.modules.crontab.expression.CronExpression.MONTH_NAMES">MONTH_NAMES (jarvis.modules.crontab.expression.CronExpression attribute)</a>
</li>
<li><a href="index.html#jarvis.modules.crontab.expression.CronExpression.MONTHS">MONTHS (jarvis.modules.crontab.expression.CronExpression attribute)</a>
Expand Down Expand Up @@ -2208,11 +2227,11 @@ <h2 id="O">O</h2>
<li><a href="index.html#jarvis.api.modals.models.OfflineCommunicatorModal">OfflineCommunicatorModal (class in jarvis.api.modals.models)</a>
</li>
<li><a href="index.html#jarvis.executors.offline.on_demand_offline_automation">on_demand_offline_automation() (in module jarvis.executors.offline)</a>
</li>
<li><a href="index.html#jarvis.modules.myq.myq.Operation.OPEN">OPEN (jarvis.modules.myq.myq.Operation attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#jarvis.modules.myq.myq.Operation.OPEN">OPEN (jarvis.modules.myq.myq.Operation attribute)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.open_gmail_pass">open_gmail_pass (jarvis.modules.models.classes.EnvConfig attribute)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.open_gmail_user">open_gmail_user (jarvis.modules.models.classes.EnvConfig attribute)</a>
Expand All @@ -2226,10 +2245,6 @@ <h2 id="O">O</h2>
<li><a href="index.html#jarvis.modules.myq.myq.operation">operation (in module jarvis.modules.myq.myq)</a>
</li>
<li><a href="index.html#jarvis.executors.car.Operations">Operations (class in jarvis.executors.car)</a>
</li>
<li><a href="index.html#jarvis.modules.templates.templates.origin">origin (in module jarvis.modules.templates.templates)</a>
</li>
<li><a href="index.html#jarvis.modules.templates.templates.OriginTemplates">OriginTemplates (class in jarvis.modules.templates.templates)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.Settings.os">os (jarvis.modules.models.classes.Settings attribute)</a>
</li>
Expand All @@ -2252,6 +2267,8 @@ <h2 id="P">P</h2>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.parse_microphone_index">parse_microphone_index() (jarvis.modules.models.classes.EnvConfig class method)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.parse_speaker_index">parse_speaker_index() (jarvis.modules.models.classes.EnvConfig class method)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.parse_weather_alert">parse_weather_alert() (jarvis.modules.models.classes.EnvConfig class method)</a>
</li>
<li><a href="index.html#jarvis.modules.utils.util.part_of_day">part_of_day() (in module jarvis.modules.utils.util)</a>
</li>
Expand Down Expand Up @@ -2314,6 +2331,8 @@ <h2 id="P">P</h2>
<li><a href="index.html#jarvis.executors.lights_squire.preset">preset() (in module jarvis.executors.lights_squire)</a>
</li>
<li><a href="index.html#jarvis.modules.telegram.bot.TelegramBot.process_document">process_document() (jarvis.modules.telegram.bot.TelegramBot method)</a>
</li>
<li><a href="index.html#jarvis.api.routers.offline.process_ok_response">process_ok_response() (in module jarvis.api.routers.offline)</a>
</li>
<li><a href="index.html#jarvis.modules.telegram.bot.TelegramBot.process_response">process_response() (jarvis.modules.telegram.bot.TelegramBot method)</a>
</li>
Expand Down Expand Up @@ -2510,6 +2529,8 @@ <h2 id="S">S</h2>
<li><a href="index.html#jarvis.modules.models.classes.BackgroundTask.seconds">seconds (jarvis.modules.models.classes.BackgroundTask attribute)</a>
</li>
<li><a href="index.html#jarvis.executors.guard.security_runner">security_runner() (in module jarvis.executors.guard)</a>
</li>
<li><a href="index.html#jarvis.modules.exceptions.SegmentationError">SegmentationError</a>
</li>
<li><a href="index.html#jarvis.modules.telegram.bot.TelegramBot.send_audio">send_audio() (jarvis.modules.telegram.bot.TelegramBot method)</a>
</li>
Expand Down Expand Up @@ -2952,6 +2973,8 @@ <h2 id="W">W</h2>
<li><a href="index.html#jarvis.api.triggers.stock_report.Investment.watchlist">watchlist() (jarvis.api.triggers.stock_report.Investment method)</a>
</li>
<li><a href="index.html#jarvis.executors.weather.weather">weather() (in module jarvis.executors.weather)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.weather_alert">weather_alert (jarvis.modules.models.classes.EnvConfig attribute)</a>
</li>
<li><a href="index.html#jarvis.modules.models.classes.EnvConfig.weather_api">weather_api (jarvis.modules.models.classes.EnvConfig attribute)</a>
</li>
Expand Down
Loading

0 comments on commit a8e77c0

Please sign in to comment.