* refactor(tts): remove redundant 4-space codeblock filter
- Deleted the regex that removed lines starting with four spaces.
- Original intent was to strip "indented code blocks" (Markdown legacy syntax).
- In practice, SillyTavern already handles explicit code fences (```...``` and ~~~...~~~).
- Indented code blocks are rarely used and the regex caused unnecessary text loss in normal messages.
- Simplifies codeblock skipping logic and avoids accidental removal of valid content.
* Remove commented out code
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Skip TTS for voices explicitly set to disabled (fixes#4970)
* Always show disabled message in commands and fix restoring voice map UI
* Always show a message on manual TTS trigger
* Fix null current job on disabled
* Adjust type annotation
* Force update worker when disabled play is attempted
* Treat audio control queue as manual
* Update TTS message processing to include manual flag
* Don't show toast if was already shown by manual playback
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat(tts): Add support for Volcengine TTS provider
* refactor: Remove the redundant comments in the Volcengine TTS-related code.
* fix(volcengine): Fix the audio data processing logic in the voice generation interface
* feat(tts): Enhance Volcengine TTS functionality and improve error handling
- Return more detailed error information when generating voice fails
- Add multiple preset voice options and support custom voice management
- Reconstruct the audio stream processing logic to enhance reliability
- Improve the UI interface, adding a voice selection dropdown menu and operation buttons
* refactor(tts): Optimize the code structure and error handling of the Volcengine TTS provider
- Remove the unused "voices" array and "model" parameter
- Improve the text processing logic, eliminating unnecessary separators
- Standardize the error handling logic, simplifying the status code checks
- Fix the DOM operation method, using "createElement" instead of string concatenation
- Ensure the existence check of the "customVoices" array
* Fix: Change the Content-Type of the audio response to audio/mpeg.
* Clean-up
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* Add regex filter option to TTS extension
- Added checkbox to enable/disable regex filtering of TTS text
- Added text input for custom regex patterns
- Default pattern removes emojis and non-English text while preserving letters, numbers, spaces, and punctuation
- Regex is applied after asterisk removal and other text processing
- Includes error handling for invalid regex patterns
- Automatically cleans up extra spaces after regex removal
* reverted the accidental change in tts_skip_tags description
clarified the regex description
* Add regex validation warning to TTS settings
* fixed regex field in UI
* reworked the regex warning
* changed the regex event to change (input might not have worked correctly)
* Apply review comments
* Spacing fix
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feat: add tts provider MiniMax
* fix: address code review feedback from @Cohee1207
- Moved inline styles to CSS classes in minimax.js
- Removed unused MINIMAX API key from secrets.js
- Removed static headers from debug logs
- Changed default API host to international endpoint
- Sorted TTS providers alphabetically in index.js
* feat: improve error handling and add language-specific test sentences based on selected voice
* fix: if no language mapping to MiniMax Format should use "auto"
* fix: move this minimax-tts.css under /public/scripts/extensions/tts/
* refactor: move minimax api communication to Node backend
* chore: unify import style for minimax router
* Move css into subfolder
* More secure secret key handling
* Better UI layout
* Finish secrets update
* Replace with a normal import
* This block shouldn't be here
---------
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
* feature: 'kokoro-js' supports TTS #3412
* Linting, add credits for kokoro library
* Fix voice preview
* Fix display languages on previews
* Fix settings restoration. Debounce model init on settings change
* Fix engine sorting
* Move TTS processing to a web worker. Remove unused gain setting
* Speaking rate fix
* Update status when recreating a worker
* Pass voices list from TTS engine
* Call dispose function on provider change
* Extend worker init timeout to 10 minutes
---------
Co-authored-by: ryan <1014670860@qq.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
The extension_settings.tts.skip_tags setting is meant to skip sending
tags and their content to the TTS API provider. The original regular
expression matched content inside tags with ".*?". Unfortunately,
Javascript's engine does *not* match newlines on the "." without the /s
flag.
The /s flag was added in ES2018. To be more compatible, the regex
has been changed to "[\s\S]+?". This gives similar performance (instead
of using capture groups) and matches all content within a tag, as the
original regex intended.