URL filter in TTS

This commit is contained in:
legop3
2026-11-13 16:54:02 -05:00
parent 684acdd2b6
commit 00cd125fda
@@ -110,7 +110,7 @@ function maybeSpeak(socket, message, ttsOptions) {
issueCommand(message.roverId, { issueCommand(message.roverId, {
type: 'tts', type: 'tts',
tts: { tts: {
text: message.text, text: message.text.replace(/\b(?:https?:\/\/|www\.)\S{25,}[^\s.,!?;:"'()\[\]{}]/g, ' [link] '),
engine: ttsOptions.engine, engine: ttsOptions.engine,
voice: ttsOptions.voice, voice: ttsOptions.voice,
pitch: ttsOptions.pitch, pitch: ttsOptions.pitch,