Commit Graph

47 Commits

Author SHA1 Message Date
Fabio Manganiello 59c693d6a0
[#394] All `manifest.yaml` converted to `manifest.json`.
YAML isn't part of the Python standard library, while JSON is.

If we want `setup.py` to dynamically parse the available integration
manifest files in order to populate the extra dependencies, then it's
better to rely on a JSON format for manifest files - the parser is part
of the standard library and it doesn't require the user to install
`pyyaml` before `platypush`.
2024-05-17 02:21:57 +02:00
Fabio Manganiello a9498ea191 [WIP] Added initial hotword integration. 2024-05-02 00:51:09 +00:00
Fabio Manganiello 4505c46071
[Sound] Don't override device index if it's already defined in the info.
continuous-integration/drone/push Build is passing Details
2024-01-08 23:03:08 +01:00
Fabio Manganiello f960ec4bf4 [`sound`] Plugin refactor.
- Added `input_format`/`output_format` options to both input and output
  audio streams.

- Replaced the previous (confusing) occurrences of `ffmpeg_format` and
  `format`.

- Added custom `dtype` option for `sound.play`.

- Added `join` flag (default: false) to `sound.play` to wait for the
  playback to finish.
2023-10-31 00:44:05 +00:00
Fabio Manganiello 23e53f13f0 Removed/commented references to `numpy.typing`.
That module isn't available yet on the numpy version installed on Debian
`oldstable`.
2023-10-23 20:23:57 +00:00
Fabio Manganiello fc869bf5db [Fix] sounddevice arguments fix.
Different versions of the `sounddevice` dependency may or may not return
the `index` parameter when querying the available sound devices.

Thus, the code should be ready for both cases.
2023-10-23 20:11:14 +00:00
Fabio Manganiello e24438980a
[`sound`] Better logic for default sound device auto-detection.
continuous-integration/drone/push Build is passing Details
2023-10-22 18:07:25 +02:00
Fabio Manganiello 1e93af86f4
Fixed some broken docstring references.
continuous-integration/drone/push Build is passing Details
2023-10-09 01:33:45 +02:00
Fabio Manganiello c3337ccc6c
[#311] Docs deps autogen sphinx plugin.
continuous-integration/drone/push Build is passing Details
Added an `add_dependencies` plugin to the Sphinx build process that
parses the manifest files of the scanned backends and plugins and
automatically generates the documentation for the required dependencies
and triggered events.

This means that those dependencies are no longer required to be listed
in the docstring of the class itself.

Also in this commit:

- Black/LINT for some integrations that hadn't been touched in a long
  time.

- Deleted some leftovers from previous refactors (deprecated
  `backend.mqtt`, `backend.zwave.mqtt`, `backend.http.request.rss`).

- Deleted deprecated `inotify` backend - replaced by `file.monitor` (see
  #289).
2023-09-24 17:00:08 +02:00
Fabio Manganiello 761f2768cb
[#316] Added RPM dependencies.
continuous-integration/drone/push Build is passing Details
2023-09-21 23:20:06 +02:00
Fabio Manganiello 3e8d6bb01e Removed `typing-extensions` dependency.
continuous-integration/drone/push Build is failing Details
The package isn't present on older versions of Debian.
2023-09-18 14:05:39 +02:00
Fabio Manganiello 98e9abde18
Extended manifest files with Python system packages (if available).
continuous-integration/drone/push Build is passing Details
- If a Python optional dependency is available as a system package on
  the target system, try and install it that route rather than pip. It's
  usually faster and it decreases the risk of breaking system packages.

- Added support for apk dependencies in manifest files. This brings the
  number of distros officially supported by all the extensions to four:

  - Alpine
  - Arch
  - Debian
  - Ubuntu
2023-08-16 22:43:51 +02:00
Fabio Manganiello ba827b0248
Added `sound` plugin documentation.
- Added example of how to stream audio over HTTP.

- Added Portaudio to the apt/pacman dependencies.
2023-06-28 00:10:36 +02:00
Fabio Manganiello a103ea49f1
Fixed ffmpeg/audio consumer synchronization upon timeout. 2023-06-27 15:12:15 +02:00
Fabio Manganiello 77f7cd8b90
Don't use typing.Self (yet).
typing.Self has only been introduced in Python 3.10.
2023-06-27 14:17:04 +02:00
Fabio Manganiello f2540437b7
Sound plugin rewritten almost from scratch. 2023-06-27 13:31:38 +02:00
Fabio Manganiello 9aa8e4538a
Better termination logic for the ffmpeg audio converter. 2023-06-16 11:47:37 +02:00
Fabio Manganiello a6351dddd4
Extracted `AudioRecorder` out of `SoundPlugin`. 2023-06-16 03:12:55 +02:00
Fabio Manganiello da93f1b3b0
[Chore] pylint 2023-06-14 01:44:36 +02:00
Fabio Manganiello c8786b75de
`sound.recordplay` merged into `sound.record`. 2023-06-12 22:15:02 +02:00
Fabio Manganiello be794316a8
Merged `sound.stream_recording` and `sound.record`. 2023-06-12 13:06:02 +02:00
Fabio Manganiello a415c5b231
Merged outfile/fifo logic in `sound.stream_recording`. 2023-06-12 12:33:14 +02:00
Fabio Manganiello e238fcb6e4
Refactoring the `sound` plugin to use ffmpeg as a stream converter. 2023-06-11 12:48:49 +02:00
Fabio Manganiello d7208c6bbc
Refactored Tornado routes for native pub/sub support.
The Redis pub/sub mechanism is now a native feature for Tornado routes
through the `PubSubMixin`.

(Plus, lint/black chore for the sound plugin)
2023-05-30 21:58:27 +02:00
Fabio Manganiello 3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00
Fabio Manganiello 2a78f81a7b Major LINT fixes 2021-04-05 00:58:44 +02:00
Fabio Manganiello 6aa52f0522 typo 2019-09-27 10:35:16 +02:00
Fabio Manganiello 43ca3a6f94 Added support for streaming audio from an input source over HTTP 2019-07-23 18:22:00 +02:00
Fabio Manganiello 9c4646bed5 Fixed documentation and added missing docs to the index 2019-07-16 20:28:00 +02:00
Fabio Manganiello 2d2db499be Running recording in a separate thread so it doesn't block the receiving backend and added playback/recording start/pause/stop events 2019-02-15 19:23:01 +01:00
Fabio Manganiello f9f43964a2 Support for stream names 2018-12-28 00:30:25 +01:00
Fabio Manganiello fae45d8ca3 Returning only the real part of the FFT 2018-12-27 22:47:44 +01:00
Fabio Manganiello 54c3381ae3 - Added frames throttling support on Leap Motion backend
- Moved the Leap listener to another process to prevent it from hanging the other backends
- Added support for sound and mix frequency analysis
2018-12-27 20:24:51 +01:00
Fabio Manganiello 2e82651dbf Expressed triangular wave as a function of the associated sawtooth-shape wave 2018-12-27 17:33:05 +01:00
Fabio Manganiello debf9a017b Sound plugin moved back to __init__ for sake of better readthedocs generation 2018-12-27 17:26:16 +01:00
Fabio Manganiello 56ff58d06b Better sound release logic 2018-12-27 01:10:45 +01:00
Fabio Manganiello c445763979 - Support for sound "release" (removal from active stream)
- Added `query_ports` method to MIDI plugin
2018-12-27 00:09:05 +01:00
Fabio Manganiello f2d2315610 Extended Sound class docstring 2018-12-26 23:16:37 +01:00
Fabio Manganiello 3598d7fcd5 Support for multiple sound waves (triangular, square and sawtooth) 2018-12-26 23:14:52 +01:00
Fabio Manganiello 3b681bbf57 Added played files/notes in stream in query_streams 2018-12-26 16:58:41 +01:00
Fabio Manganiello 3554968468 Support for multiple sounds on the same stream 2018-12-26 16:10:14 +01:00
Fabio Manganiello c2544524e1 Added missing docstring line 2018-12-25 19:26:59 +01:00
Fabio Manganiello 2fb5e5abc6 Support for mixes of multiple sounds 2018-12-25 19:26:08 +01:00
Fabio Manganiello d89184358a Support for playback control for individual sound streams 2018-12-25 17:31:20 +01:00
Fabio Manganiello 3baf0b1589 Initial support for playing multiple sounds to the same stream 2018-12-24 18:58:44 +01:00
Fabio Manganiello 3d2636b09c Further split between sound and core modules 2018-12-24 17:15:29 +01:00
Fabio Manganiello 65465e3a18 - Refactored the class sound out of the plugin module
- More robust stream naming and index assignment logic
2018-12-24 17:12:11 +01:00