AbstractCachedTTSService: make synthesize method non final (#3437)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo
2023-03-08 22:57:26 +01:00
committed by GitHub
parent 07ffc11c87
commit a3a95b5bb9
@@ -30,15 +30,15 @@ import org.osgi.service.component.annotations.Reference;
@NonNullByDefault
public abstract class AbstractCachedTTSService implements CachedTTSService {
private TTSCache ttsCache;
private final TTSCache ttsCache;
@Override
public final AudioStream synthesize(String text, Voice voice, AudioFormat requestedFormat) throws TTSException {
return ttsCache.get(this, text, voice, requestedFormat);
public AbstractCachedTTSService(final @Reference TTSCache ttsCache) {
this.ttsCache = ttsCache;
}
public AbstractCachedTTSService(@Reference TTSCache ttsCache) {
this.ttsCache = ttsCache;
@Override
public AudioStream synthesize(String text, Voice voice, AudioFormat requestedFormat) throws TTSException {
return ttsCache.get(this, text, voice, requestedFormat);
}
@Override