AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Remove urls tts macos (#4260)
gravelBridgec17d825bbac8
diff --git a/autogpt/speech/base.py b/autogpt/speech/base.pyindex a7570d9456..07c8d9fe7b 100644--- a/autogpt/speech/base.py+++ b/autogpt/speech/base.py@@ -1,5 +1,6 @@"""Base class for all voice classes."""import abc+import refrom threading import Lockfrom autogpt.singleton import AbstractSingleton@@ -29,6 +30,11 @@ class VoiceBase(AbstractSingleton):text (str): The text to say.voice_index (int): The index of the voice to use."""+ text = re.sub(+ r"\b(?:https?://[-\w_.]+/?\w[-\w_.]*\.(?:[-\w_.]+/?\w[-\w_.]*\.)?[a-z]+(?:/[-\w_.%]+)*\b(?!\.))",+ "",+ text,+ )with self._mutex:return self._speech(text, voice_index)