[voice] Make use of Java17 features (#15487)
Use Map/Set/List.of instead of Collections. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
parent
56e7daf898
commit
ab135421a0
@ -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;
|
||||
@ -49,8 +48,8 @@ public class PicoTTSService extends AbstractCachedTTSService {
|
||||
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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user