-
|
From reading here I enabled TTS for output. But am now hearing the Thinking sections, which are normally hidden being read. Is there an option to disable that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I do not see a separate setting for this at the moment. It looks like a small cleanup bug rather than an option you missed. The TTS path already tries to remove closed thinking blocks before sending text to speech. The problem is that the cleaner currently matches bare tags like: but the streaming code later rewrites the tag to include the elapsed time: That attributed tag no longer matches the current cleanup regex, so the hidden section can become plain text for TTS. A narrow fix would be to let the TTS text cleaner accept attributes on the opening tag, and optionally strip a dangling opening block too: let cleaned = content
.replace(/<think(?:ing)?(?:\s+[^>]*)?>[\s\S]*?<\/think(?:ing)?>/gi, '')
.replace(/<think(?:ing)?(?:\s+[^>]*)?>[\s\S]*$/gi, '');That would cover both Until that is patched, turning off TTS mode is the safest workaround if you are using models that emit thinking sections. |
Beta Was this translation helpful? Give feedback.
I do not see a separate setting for this at the moment. It looks like a small cleanup bug rather than an option you missed.
The TTS path already tries to remove closed thinking blocks before sending text to speech. The problem is that the cleaner currently matches bare tags like:
but the streaming code later rewrites the tag to include the elapsed time:
That attributed tag no longer matches the current cleanup regex, so the hidden section can become plain text for TTS.
A narrow fix would be to let the TTS text cleaner accept attributes on the opening tag, and optionally strip a dangling opening block too: