diff --git a/bundles/org.openhab.voice.googletts/src/main/java/org/openhab/voice/googletts/internal/GoogleCloudAPI.java b/bundles/org.openhab.voice.googletts/src/main/java/org/openhab/voice/googletts/internal/GoogleCloudAPI.java index 7fc039187e7bc..0a5ef5983e8fb 100644 --- a/bundles/org.openhab.voice.googletts/src/main/java/org/openhab/voice/googletts/internal/GoogleCloudAPI.java +++ b/bundles/org.openhab.voice.googletts/src/main/java/org/openhab/voice/googletts/internal/GoogleCloudAPI.java @@ -328,14 +328,16 @@ public byte[] synthesizeSpeech(String text, GoogleTTSVoice voice, String codec) String format = getFormatForCodec(codec); try { return synthesizeSpeechByGoogle(text, voice, format); - } catch (AuthenticationException | CommunicationException e) { - logger.warn("Error initializing Google Cloud TTS service: {}", e.getMessage()); + } catch (AuthenticationException e) { + logger.warn("Error authenticating Google Cloud TTS service: {}", e.getMessage()); if (oAuthService != null) { oAuthFactory.ungetOAuthService(GoogleTTSService.SERVICE_PID); oAuthService = null; } - voices.clear(); + } catch (CommunicationException e) { + logger.warn("Error initializing Google Cloud TTS service: {}", e.getMessage()); } + voices.clear(); return null; }