From 7749a73f5ba9b9693d67e395bde31d6e2a40368e Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 5 Feb 2026 17:12:35 +0100 Subject: [PATCH] wip #7977 @0.5 --- src/Api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api.php b/src/Api.php index f3fb965..2ab6902 100644 --- a/src/Api.php +++ b/src/Api.php @@ -45,7 +45,7 @@ class Api public function textToSpeech($text, $locale, $gender, $voiceName, $saveToFile) { - if (stristr('|', $locale)) { + if (stristr($locale, '|')) { $e = explode('|', $locale); $locale = $e[1]; } @@ -55,7 +55,7 @@ class Api $ssml .= htmlspecialchars($text, ENT_XML1 | ENT_SUBSTITUTE | ENT_QUOTES); $ssml .= ""; - Log::info('TTS ' . mb_strlen($text) . ' chars // ' . $locale . ' // ' . $gender . ' // ' . $voiceName . ' :: ' . $ssml); + Log::info('TTS ' . mb_strlen($text) . ' chars // ' . $locale . ' // ' . $gender . ' // ' . $voiceName . ' :: ' . htmlspecialchars($ssml)); $this->_call('/v1', 'post', [ 'X-Microsoft-OutputFormat' => 'audio-48khz-192kbitrate-mono-mp3', -- 2.39.5