v1.10.3#286
Merged
Merged
Conversation
Handle Jeedom tts.php responses that return a file path: decode and strip response content, verify path with os.path.exists, and read file with a context manager. Replace several English log messages with French equivalents for consistency and improve debug formatting (use %d for length). Add missing "espeak" and "pico" entries to VSCode settings and bump plugin version to 1.10.3 in plugin_info.
Check HTTP response content from VoiceRSS for MP3 magic bytes before using it. The code now verifies status code and that response.content starts with ID3 or an MPEG sync frame (0xFF 0xE0+); if not, it logs a warning (showing up to 80 chars of the response) and avoids treating the payload as audio. Assigns filecontent only when valid and removes the previous unused/incorrect handling. This prevents non-MP3 API errors or HTML responses from being processed as audio.
Bump dependency versions in resources/requirements.txt: google-cloud-texttospeech 2.36.0 -> 2.37.0 and google-genai 2.8.0 -> 2.9.0. These upgrades bring minor fixes and improvements from the newer releases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request focuses on improving the robustness and clarity of TTS (Text To Speech) file handling, especially for JeedomTTS and VoiceRSS integrations, and updates dependencies and plugin metadata. It also standardizes and clarifies log messages, particularly error reporting, mostly translating them to French for consistency.
TTS file handling improvements:
Logging and error message standardization:
%dfor integer formatting and providing more context in error messages.Dependency and metadata updates:
google-cloud-texttospeechto2.37.0andgoogle-genaito2.9.0inrequirements.txtfor improved compatibility and features.1.10.2to1.10.3inplugin_info/info.json.Development environment:
"espeak"and"pico"to the list of recognized words in.vscode/settings.jsonto reduce false positives in spell checking for TTS-related dependencies. [1] [2]