Commit Graph

9 Commits

Author SHA1 Message Date
Fabio Manganiello 317241eb36
[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-04-14 21:24:06 +02:00
Fabio Manganiello 6305934f97
Added `assistant.picovoice.transcribe` and `assistant.picovoice.say`.
continuous-integration/drone/push Build is passing Details
2024-04-14 01:07:17 +02:00
Fabio Manganiello ea1fa39cb7
[assistant.picovoice] Implemented `assistant.picovoice.send_text_query`.
continuous-integration/drone/push Build is passing Details
2024-04-14 00:09:25 +02:00
Fabio Manganiello c86e3be0d1
[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-04-13 21:00:30 +02:00
Fabio Manganiello 8082123c58
[assistant.picovoice] Implemented mic mute/unmute handling.
continuous-integration/drone/push Build is passing Details
2024-04-13 20:51:34 +02:00
Fabio Manganiello fa49db4107
[assistant.picovoice] Conversation flow improvements.
continuous-integration/drone/push Build is passing Details
- 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-04-13 20:03:35 +02:00
Fabio Manganiello 3b73b22db9
[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-04-10 22:26:45 +02:00
Fabio Manganiello fa70c91a67
[assistant.picovoice] Better partial transcript + flush handling logic.
continuous-integration/drone/push Build is passing Details
2024-04-08 13:33:07 +02:00
Fabio Manganiello c7094c7886
`picovoice` -> `assistant.picovoice` 2024-04-08 13:26:44 +02:00
Renamed from platypush/plugins/picovoice/__init__.py (Browse further)