Skip to content

Commit

Permalink
[voice] Make use of Java17 features (#15487)
Browse files Browse the repository at this point in the history
Use Map/Set/List.of instead of Collections.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
  • Loading branch information
holgerfriedrich authored Aug 24, 2023
1 parent 56e7daf commit ab13542
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
package org.openhab.voice.picotts.internal;

import java.util.Collections;
import java.util.Locale;
import java.util.Set;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -49,8 +48,8 @@ public PicoTTSService(@Reference TTSCache ttsCache) {
new PicoTTSVoice("es-ES"), new PicoTTSVoice("fr-FR"), new PicoTTSVoice("it-IT"))
.collect(Collectors.toSet());

private final Set<AudioFormat> audioFormats = Collections.singleton(
new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, false, 16, null, 16000L));
private final Set<AudioFormat> audioFormats = Set
.of(new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, false, 16, null, 16000L));

@Override
public Set<Voice> getAvailableVoices() {
Expand Down

0 comments on commit ab13542

Please sign in to comment.