From: Vincent Vanwaelscappel Date: Thu, 5 Feb 2026 16:12:35 +0000 (+0100) Subject: wip #7977 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7749a73f5ba9b9693d67e395bde31d6e2a40368e;p=cubist_azuretts.git wip #7977 @0.5 --- 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',