Commit graph

4200 commits

Author SHA1 Message Date
13bde4adba
[#398] Replaced camera response objects with schemas. 2024-05-09 01:41:15 +02:00
579faf63bc
[Automatic] Updated components cache 2024-05-08 20:00:37 +00:00
7a849379f9
[#399] Added @when decorator as an alias for @hook.
Closes: #399
2024-05-08 21:58:58 +02:00
85e44542e2
[Automatic] Updated UI files 2024-05-07 10:49:01 +00:00
c094fac7dc
Merge pull request #407 from blacklight/snyk-upgrade-1d870abd0ad2c511fe65000600f02a14
[Snyk] Upgrade cronstrue from 2.47.0 to 2.48.0
2024-05-07 12:42:38 +02:00
9dc0fbe6e7
Merge branch 'master' into snyk-upgrade-1d870abd0ad2c511fe65000600f02a14 2024-05-07 12:42:30 +02:00
d6b1337c5a
Merge pull request #413 from blacklight/dependabot/npm_and_yarn/platypush/backend/http/webapp/express-4.19.2
Bump express from 4.18.2 to 4.19.2 in /platypush/backend/http/webapp
2024-05-07 12:40:57 +02:00
0adde5a107
Merge pull request #414 from blacklight/dependabot/npm_and_yarn/platypush/backend/http/webapp/ejs-3.1.10
Bump ejs from 3.1.9 to 3.1.10 in /platypush/backend/http/webapp
2024-05-07 12:40:41 +02:00
89ced918f1
Merge pull request #412 from blacklight/dependabot/npm_and_yarn/platypush/backend/http/webapp/webpack-dev-middleware-5.3.4
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /platypush/backend/http/webapp
2024-05-07 12:40:28 +02:00
bf52f44f92
Merge pull request #411 from blacklight/dependabot/npm_and_yarn/platypush/backend/http/webapp/follow-redirects-1.15.6
Bump follow-redirects from 1.15.4 to 1.15.6 in /platypush/backend/http/webapp
2024-05-07 12:40:08 +02:00
e285009da3
Merge pull request #409 from blacklight/snyk-upgrade-f2aa58c6cb66ee05c32f925b535a8b1f
[Snyk] Upgrade core-js from 3.35.1 to 3.36.0
2024-05-07 12:39:56 +02:00
3edc8d1077
Merge pull request #408 from blacklight/snyk-upgrade-29d2bb6c813d352072249a6db7e3a805
[Snyk] Upgrade vue from 3.4.18 to 3.4.19
2024-05-07 12:39:36 +02:00
cbaca5f303
Merge pull request #406 from blacklight/snyk-upgrade-bf6b4c595d14f755033e14807ed62fa7
[Snyk] Upgrade @fortawesome/fontawesome-free from 6.4.2 to 6.5.1
2024-05-07 12:39:20 +02:00
df79bb3ea6
Merge pull request #410 from blacklight/snyk-upgrade-73632136d273593f5bc9c7ffc6fd9c71
[Snyk] Upgrade sass from 1.70.0 to 1.71.0
2024-05-07 12:39:04 +02:00
228031c4ad
[#331] Automatically initialize __init__.py in script dirs.
Closes: #331
2024-05-07 02:59:13 +02:00
fdeba9e53c
[Automatic] Updated components cache 2024-05-06 00:28:09 +00:00
3c88593e9a
[#293] Merged midi plugin and backend.
Closes: #293
2024-05-06 02:26:27 +02:00
6a8c83f99b
🐛 Don't add the new password salt/iterations columns if already present.
And, similarly, don't remove them if they aren't on the user table.
2024-05-05 21:58:51 +02:00
901338e228
[#397] Replaced bcrypt dependency with native hashlib logic.
Closes: #397
2024-05-05 21:38:27 +02:00
dependabot[bot]
9651354fbf
Bump ejs from 3.1.9 to 3.1.10 in /platypush/backend/http/webapp
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](https://github.com/mde/ejs/compare/v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 10:39:57 +00:00
a5826892dd
[CI/CD] Added python-setuptools to build dependencies.
It's apparently been extracted out of the core Python library on the
version 3.12 of the interpreter.
2024-05-02 03:31:41 +02:00
373d98fc6a
[Automatic] Updated UI files 2024-05-02 01:11:36 +00:00
61e466d8e2
[UI] Added tts.picovoice component and assistant.picovoice icon. 2024-05-02 03:07:47 +02:00
4ac73837f6
[Automatic] Updated components cache 2024-05-02 00:51:58 +00:00
72bc697122 [assistant.picovoice] Extended documentation. 2024-05-02 00:51:09 +00:00
b2c07a31f2 Fixed tests 2024-05-02 00:51:09 +00:00
d813356d9c [music.mopidy] Handle the case where add returns a list. 2024-05-02 00:51:09 +00:00
1192782729 [tts.picovoice] Convert digits before replacing other substrings. 2024-05-02 00:51:09 +00:00
4734909912 🐛 The EventMatchResult object shouldn't be initialized with args from the event.
If there's a good use-case for overriding `Event._matches_condition`
with a logic that also parses the event arguments, then those arguments
should be accessed directly from the event object, not from the match
result.

Initializing `EventMatchResult` with the arguments from the event means
that, if `EventMatchResult.parsed_args` are populated with custom
extracted arguments, then the upstream event arguments will also be
modified.

If the event is matched against multiple conditions, this will result in
the extracted tokens getting modified by each `matches_condition`
iteration.
2024-05-02 00:51:09 +00:00
237fc58928 [tts.picovoice] A more robust logic for replacing unsupported characteres on the input. 2024-05-02 00:51:09 +00:00
d8e24207c5 Added openai plugin. 2024-05-02 00:51:09 +00:00
bd4b1d3e0f [assistant.picovoice] Sync between the speech and intent engines. 2024-05-02 00:51:09 +00:00
a373091c64 Prevent duplicate hook runs.
Instead of being a list, the hooks in the hook processor should be
backed by by-name and by-value maps.

Don't insert a hook if its exact backing method has already been
inserted. This is actually very common when hooks are defined as Python
snippets imported in other scripts too.
2024-05-02 00:51:09 +00:00
632d98703b New architecture for the assistant speech detection logic.
The assistant object now runs in its own thread and leverages an
external `SpeechProcessor` that uses two threads to scan for both
intents and speech in parallel on audio frames.
2024-05-02 00:51:09 +00:00
6f8816d23d Prevent a potential recursion error in wait_for_either.
We shouldn't overwrite `event._set` and `event._clear` if those values
have already been set.

Those attributes hold the original references to `Event.set` and
`Event.clear` respectively, and the `OrEvent` logic overwrites them with
a callback-based logic.

This shouldn't happen if those attributes are already present.
2024-05-02 00:51:09 +00:00
af1392b5b9 [assistant] Added ResponseEndEvent and IntentMatchedEvent 2024-05-02 00:51:09 +00:00
bb9b6cd319 [assistant.picovoice] Various improvements.
- Added `intent_model_path` parameter.

- Always apply `expanduser` to configuration paths.

- Better logic to infer the fallback model path.

- The Picovoice Leonardo object should always be removed after
  `assistant.picovoice.transcribe` is called.
2024-05-02 00:51:09 +00:00
f0a780b759 Added assistant.picovoice.transcribe and assistant.picovoice.say. 2024-05-02 00:51:09 +00:00
f04f7ce9d7 [tts.picovoice] Better text pre-processing logic. 2024-05-02 00:51:09 +00:00
37d70d67ac [assistant.picovoice] Implemented assistant.picovoice.send_text_query. 2024-05-02 00:51:09 +00:00
fa1d5eb672 [tts.picovoice] Added text pre-processing workaround.
This workaround is required until
https://github.com/Picovoice/orca/issues/10 is fixed.
2024-05-02 00:51:09 +00:00
a345b12244 [assistant.picovoice] Leverage upstream _on_mute_changed.
The plugin should leverage `AssistantPlugin._on_mute_changed` to handle
the boilerplate state managent on mute/unmute actions instead of
re-implementing the same logic.
2024-05-02 00:51:09 +00:00
2c197c275e [assistant.picovoice] Implemented mic mute/unmute handling. 2024-05-02 00:51:09 +00:00
9de49c71a1 [assistant.picovoice] Conversation flow improvements.
- The `Responding` state should be modelled as an extra event/binary
  flag, not as an assistant state. The assistant may be listening for
  hotwords even while the `tts` plugin is responding, and we don't want
  the two states to interfere with each either - neither to build a more
  complex state machine that also needs to take concurrent states into
  account.

- Stop any responses being rendered upon the `tts` plugin when a new
  hotword audio is detected. If e.g. I say "Ok Google", I should always
  be able to trigger the assistant and stop any concurrent audio
  process.

- `SpeechRecognizedEvent` should be emitted even if `cheetah`'s latest
  audio frame results weren't marked as final, and the speech detection
  window timed out. Cheetah's `is_final` detection seems to be quite
  buggy sometimes, and it may not properly detect the end of utterances,
  especially with non-native accents. The workaround is to flush out
  whatever text is available (if at least some speech was detected) into
  a `SpeechRecognizedEvent` upon timeout.
2024-05-02 00:51:09 +00:00
a6f7b6e790 Added more default imports under the platypush module root.
These objects can now also be imported in scripts through
`from platypush import <name>`:

- `Variable`
- `cron`
- `hook`
- `procedure`
2024-05-02 00:51:09 +00:00
aa333db05c [assistant.picovoice] More features.
- Added wiring between `assistant.picovoice` and `tts.picovoice`.

- Added `RESPONDING` status to the assistant.

- Added ability to override the default speech model upon
  `start_conversation`.

- Better handling of conversation timeouts.

- Cache Cheetah objects in a `model -> object` map - at least the
  default model should be pre-loaded, since model loading at runtime
  seems to take a while, and that could impact the ability to detect the
  speech in the first seconds after a hotword is detected.
2024-05-02 00:51:09 +00:00
af875c996e Added tts.picovoice plugin. 2024-05-02 00:51:09 +00:00
a4c911a5d7 Added ffmpeg requirement for assistant.picovoice. 2024-05-02 00:51:09 +00:00
8193c5702c s/partial_transcript/transcript/g 2024-05-02 00:51:09 +00:00
8378bee7c6 Refactored AssistantEvent.
`AssistantEvent.assistant` is now modelled as an opaque object that
behaves the following way:

- The underlying plugin name is saved under `event.args['_assistant']`.

- `event.assistant` is a property that returns the assistant instance
  via `get_plugin`.

- `event.assistant` is reported as a string (plugin qualified name) upon
  event dump.

This allows event hooks to easily use `event.assistant` to interact with
the underlying assistant and easily modify the conversation flow, while
event hook conditions can still be easily modelled as equality
operations between strings.
2024-05-02 00:51:09 +00:00