Commit Graph

136 Commits

Author SHA1 Message Date
Wouter Born
db72021460
Update Eclipse files (#4514)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-12-24 07:02:47 +01:00
Gaël L'hopital
7492d1cd14
Warning chase in org.openhab.core.audio (#4497)
Signed-off-by: Gaël L'hopital <gael@lhopital.org>
2024-12-17 19:41:02 +01:00
Holger Friedrich
8d837f9823
Prepare for OH 5.0.0 (#4496)
* Prepare for OH 5.0.0

* Switch to 5.0.0-SNAPSHOT
* Fix spotless after unleash
* resolve itest runbundles
* Fix linux-specific pom

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-12-15 18:49:23 +01:00
openhab-bot
0f2e56f39d [unleash-maven-plugin] Preparation for next development cycle. 2024-12-15 11:41:19 +00:00
openhab-bot
0c93cc0456
New Crowdin updates (#4480)
* New translations addons.properties (Catalan)
* New translations addons.properties (Czech)
* New translations audio.properties (Catalan)
* New translations automation.properties (Catalan)
* New translations automation.properties (Czech)
* New translations chart.properties (Catalan)
* New translations chart.properties (Czech)
* New translations defaultsystemchannels.properties (Catalan)
* New translations defaultsystemchannels.properties (Czech)
* New translations ephemeris.properties (Catalan)
* New translations firmware.properties (Catalan)
* New translations hli.properties (Catalan)
* New translations i18n.properties (Catalan)
* New translations inbox.properties (Catalan)
* New translations jsonstorage.properties (Catalan)
* New translations jsr223.properties (Catalan)
* New translations jsr223.properties (Czech)
* New translations languagesupport.properties (Catalan)
* New translations languagesupport.properties (Portuguese)
* New translations languagesupport.properties (Portuguese, Brazilian)
* New translations lsp.properties (Catalan)
* New translations magic.properties (Catalan)
* New translations marketplace.properties (Catalan)
* New translations messages.properties (Catalan)
* New translations network.properties (Catalan)
* New translations persistence.properties (Catalan)
* New translations restauth.properties (Catalan)
* New translations scriptprofile.properties (Catalan)
* New translations scriptprofile.properties (Czech)
* New translations sitemap.properties (Catalan)
* New translations systemprofiles.properties (Catalan)
* New translations systemprofiles.properties (Czech)
* New translations systemthingstatusinfos.properties (Catalan)
* New translations tags.properties (Catalan)
* New translations units.properties (Catalan)
* New translations units.properties (Czech)
* New translations validation.properties (Catalan)
* New translations validation.properties (Czech)
* New translations voice.properties (Catalan)
* New translations voice.properties (Czech)
2024-12-08 11:45:41 +01:00
Kai Kreuzer
21e605d212
Apply spotless after release, resolve bundles (#4301)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-07-07 23:22:27 +02:00
openhab-bot
07e23eac3c [unleash-maven-plugin] Preparation for next development cycle. 2024-07-07 16:05:56 +00:00
GiviMAD
e14b0a8d0d
[audio|voice] Add console commands to troubleshoot audio sources and speech-to-text services (#4202)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-05-12 12:25:46 +02:00
GiviMAD
8bca481fff
[audio] Fix bitrate calc (#4141)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-04-28 17:43:49 +02:00
Holger Friedrich
c316b07c47
Update plugins (#4197)
* set minimum Maven version to 3.6.3
* build-helper-maven-plugin, 3.4.0 to 3.5.0, see
  https://github.com/mojohaus/build-helper-maven-plugin/releases/tag/3.5.0
* jvnet maven-jaxb2-plugin, 0.15.2 to 0.15.3
* license-maven-plugin, 4.2 to 4.3
* maven-archetype-plugin, 3.0.1 to 3.2.1
* maven-assembly-plugin, 3.4.2 to 3.7.1, see https://github.com/apache/maven-assembly-plugin/releases
* maven-clean-plugin, 3.3.1 to 3.3.2, see https://github.com/apache/maven-clean-plugin/releases
* maven-dependency-plugin, 3.6.0/3.3.0/3.1.1 to 3.6.1, see
  https://github.com/apache/maven-dependency-plugin/releases/tag/maven-dependency-plugin-3.6.1
* maven-jar-plugin, 3.3.0 to 3.4.1, see https://github.com/apache/maven-jar-plugin/releases
* maven-javadoc-plugin, 3.6.2 to 3.6.3, see https://github.com/apache/maven-javadoc-plugin/releases
* maven-plugin-plugin, 3.11.0 to 3.12.0, see
  https://github.com/apache/maven-plugin-tools/releases/tag/maven-plugin-tools-3.12.0
* maven-shade-pluginm 3.5.2 to 3.5.3
* maven-source-plugin, 3.3.0 to 3.3.1
* maven-surefire-plugin, 3.1.2 to 3.2.5, see https://github.com/apache/maven-surefire/releases
* sortpom-maven-plugin, 3.3.0 to 3.4.1, see https://github.com/Ekryd/sortpom/releases
* spotless-maven-plugin, 2.38.0 to 2.43.0, see
  https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md
* openhab 18n-maven-plugin, 4.0.2 to 4.1.2

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-27 09:34:39 +02:00
Holger Friedrich
a79a9c651b
Reduce SAT warnings (#4187)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-20 19:17:47 +02:00
Gwendal Roulleau
06ee46dff6
Audio parsing : Fix byte / bit confusion (#4116)
Fix two errors for calculating bitrate and duration of sound.
In AudioSinkUtilsImpl : confusion between byte / bite
In AudioWaveUtils : confusion between byte / bite AND with the defintion of framesize (framesize already includes channels number)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2024-03-01 18:06:04 +01:00
Wouter Born
85056d9d7b
Some more code cleanup (#4021)
This cleanup includes:

* Use enhanced for loops
* Use text blocks
* Use Objects.equals
* Fix some typos
* Remove redundant variable initialization
* Remove redundant null checks with instanceof
* Remove redundant thrown Exceptions
* Remove redundant empty String concatenation

Signed-off-by: Wouter Born <github@maindrain.net>
2024-02-04 11:17:55 +01:00
Wouter Born
6cf048434b
Replace Markdown backticks with JavaDoc code tags (#4023)
* Replace Markdown backticks with JavaDoc code tags

The proper way to format code with JavaDoc is using code tags and not Markdown backticks.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-20 09:56:41 +01:00
GiviMAD
3c61c1d649
[Audio] Add piped audio stream and fix raw PCM streams format (#3960)
* [Audio] Add piped audio stream and fix pcm format usage

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-01-07 14:18:50 +01:00
Wouter Born
c757819a15
Fix JavaDoc issues (#4004)
Fixes various issues including wrong parameter names, references, links and dangling JavaDocs.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-04 00:03:48 +01:00
Wouter Born
2babea4c9a
Update license headers to 2024 (#4011)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:20:34 +01:00
Wouter Born
896b05e177
Replace or remove assert statements (#3994)
Java assertions are disabled by default so in this PR they are replaced/removed where applicable.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 22:21:42 +01:00
Wouter Born
041e3b5127
Remove redundant modifiers (#4000)
Removes redundant modifiers from the code.
These modifiers redeclare the default modifiers that apply to interfaces, enums etc.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-02 19:29:29 +01:00
Wouter Born
ba5647b871
More code cleanups (#3975)
While cleaning up the code I found a some more code to cleanup:

* Remove unnecessary boxing
* Use `contains(..)` instead of `indexOf(..) != -1`
* Use `assertInstanceOf` in tests
* Make expensive trace logging conditional
* Remove redundant constructor
* Replace `collect(Collectors.toUnmodifiableList())` with `toList()`
* Replace `filter(..).count() == 0L` with `noneMatch(..)`
* Replace `filter(..).count() > 0` with `anyMatch(..)`

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-28 13:15:50 +01:00
Wouter Born
e958d5b46a
Replace lambdas with method references (#3972)
Method references are more readable because they refer to class names and usually result in less code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-28 09:55:31 +01:00
Wouter Born
b08a01c93f
Remove unnecessary parenthesis from lambdas (#3968)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-12-27 17:52:13 +01:00
Holger Friedrich
839ba1ab4c
Apply spotless after release, resolve bundles (#3953)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-12-22 23:14:28 +01:00
openhab-bot
3b279587b1 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 11:48:43 +00:00
Wouter Born
7af02598ef
Small code cleanup (#3873)
* Removes hyphens from JavaDoc parameters
* Fixes a few 'exists' grammar mistakes

Signed-off-by: Wouter Born <github@maindrain.net>
2023-11-15 16:47:58 +01:00
Holger Friedrich
9ad2fef549
Fix javadoc warnings (#3870)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-11-15 09:21:07 +01:00
Gwendal Roulleau
26283dab75
[webaudio] Allow stopping play (#3766)
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-11-01 08:50:01 +01:00
Wouter Born
e8e1c9fe73
Simplify code that creates List, Map and Set objects (#3836)
Simplifies the code by using List.of, List.copyOf etc. where possible which results in less code and imports.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 18:00:00 +02:00
Wouter Born
09b3160a55
Simplify code using Stream.toList (#3831)
Stream.toList was introduced in Java 16 and creates an unmodifiable List so it can be used to simplify code whenever the List is not expected to be modified.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-09 09:20:08 +02:00
Holger Friedrich
ce5cef959b
Migrate to java.nio.file.createTempFile (#3767)
Use function from nio package as it uses more restrictive file permissions.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-08-26 15:08:03 +02:00
Kai Kreuzer
5692232e2b Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:11:37 +02:00
openhab-bot
fd93f0a766 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 17:14:35 +00:00
lolodomo
f0adf76719
HTTP audio servlet: check end of play every 2 seconds (#3695)
Instead of 5s before.
It helps triggering the end of playback earlier for audio sinks in asynchronous mode.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-11 18:46:01 +02:00
Gwendal Roulleau
3ec1457583
[audio] Improve audio duration computation (#3675)
Allows the use of a Sizeable interface (for AudioStream that we know the length of, but we cannot clone). We can then improve the duration detection, for example for the pulseaudio sink (PR coming after).
We can also give the length information to sink in more cases.

Add the support of the mark / reset methods to some common AudioStream. We then allow more stream analysis for sink requiring it (Stream analysis often requires to get back in time after consuming a few bytes)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-07-02 11:19:34 +02:00
Gwendal Roulleau
8eddad5c76
[audio] Enhance AudioSink capabilities using the AudioServlet (#3461)
* [audio] More capabilities for AudioSink using the AudioServlet

AudioServlet can now serve all type of AudioStream multiple times by buffering data in memory or in temporary file.
Adding method to ease disposal of temporary file after playing a sound
Adding an identifyier to audio stream for further development (allow audio sink to cache computation data)

We can now send audio with a Runnable for a delayed task to be executed after. This delayed task includes temporary file deletion and volume restoration.
This is a no breaking change / no behaviour modification for other addon AudioSink, as existing AudioSink must explicitly override the old behaviour to use this capability.
Add AudioSinkSync / AudioSinkAsync abstract classes to use this capability easily.
WebAudioSink now implements this capability, with the help of a modified AudioServlet

Adding (approximative, better than nothing) sound duration computation method for MP3 and WAV.
Use this sound duration computation to guess when the async sound is finished and when to do the post process (i.e. volume restoration)

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-06-16 21:54:11 +02:00
openhab-bot
5550ea79b2
New Crowdin updates (#3639)
* New translations audio.properties (Romanian)

* New translations addons.properties (Romanian)

* New translations i18n.properties (Romanian)

* New translations network.properties (Romanian)

* New translations marketplace.properties (Romanian)

* New translations validation.properties (Finnish)

* New translations scriptprofile.properties (French)

* New translations scriptprofile.properties (Slovenian)

* New translations validation.properties (Hebrew)

* New translations validation.properties (Polish)

* New translations validation.properties (Slovenian)

* New translations hli.properties (French)

* New translations hli.properties (Polish)

* New translations automation.properties (Hebrew)

* New translations automation.properties (Polish)
2023-05-29 14:26:59 +02:00
Holger Friedrich
769aa562a1
Code cleanup: Use Java 17 features (#3522)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-16 21:43:59 +02:00
Wouter Born
4851bfbcae
Fix recently introduced SAT issues (#3516)
* Fix recently introduced SAT issues

Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-01 17:18:22 +02:00
J-N-K
6294c48be4
Use try-with-resources on Files.walk/Files.list (#3504)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-29 09:54:41 +02:00
Wouter Born
ec3af50f11
Upgrade to Karaf 4.4.3 (#3252)
* Sync runtime dependencies with Karaf 4.4.3, most notably:
  * Jetty 9.4.50.v20221201
  * Pax Logging 2.2.0
  * Pax Web 8.0.15
* Use OSGi R8 as compile dependency
* Rework Servlets to use Http Whiteboard annotations in favor of proprietary `org.openhab.core.io.http.servlet` classes
* Resolve itest runbundles

Also-by: Jan N. Klug <github@klug.nrw>

Signed-off-by: Wouter Born <github@maindrain.net>
2023-03-01 13:09:07 +01:00
J-N-K
8d64ecfd8d
Update license header to 2023 (#3294)
* Update license header to 2023

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-03 09:45:42 +01:00
jimtng
ab96a6ba55
[voice ]Only call getVolume when necessary (#3280)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2022-12-29 12:19:45 +01:00
Wouter Born
7888da1684
Fix some recently introduced SAT and NPE issues (#3251)
Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 15:11:49 +01:00
Wouter Born
687688db7e
Update Eclipse .classpath files (#3250)
Also adds some missing files for recently added projects.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 14:14:35 +01:00
J-N-K
3fc4d23734
Fix spotless and resolve itests (#3239)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 11:09:31 +01:00
openhab-bot
35254b3a0a [unleash-maven-plugin] Preparation for next development cycle. 2022-12-18 23:08:22 +00:00
GiviMAD
e7ebc79897
[audio|voice] Add actions/commands to synthesize melodies and add configurable melody to the dialog processor (#3139)
* [voice] Add notification sounds to dialog processor
* [audio] add actions and commands to play melodies

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-12-11 16:13:59 +01:00
GiviMAD
c6b1fe266a
[voice] Use a builder to configure the dialog context and remove some deprecated method usages (#3195)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2022-12-10 13:49:42 +01:00
Дилян Палаузов
f64874e226
Fix a/an typos (#3184) 2022-11-30 21:16:18 +01:00
Дилян Палаузов
e556fdf81b
Fix a/an typos (#3181)
* Typos a/an
* Fix typo generation in generateTagClasses.groovy

Signed-off-by: Wouter Born <github@maindrain.net>
2022-11-29 20:57:48 +01:00