From 089b4885b8badfd2bb6fb7107acb20b2bcff5331 Mon Sep 17 00:00:00 2001 From: Gunther Cox Date: Fri, 18 Mar 2016 19:29:31 -0400 Subject: [PATCH] Remove Mac-only speech synthesis adapter. This adapter is being removed from the chatterbot core in favor of continuing work with it in the chatterbot-voice repo. Future work involving speech recognition and speech synthesis will continue there (https://github.com/gunthercox/chatterbot-voice). --- chatterbot/adapters/io/__init__.py | 1 - chatterbot/adapters/io/tts.py | 29 ----------------------------- 2 files changed, 30 deletions(-) delete mode 100644 chatterbot/adapters/io/tts.py diff --git a/chatterbot/adapters/io/__init__.py b/chatterbot/adapters/io/__init__.py index a44fff95c..8ceaacdd3 100644 --- a/chatterbot/adapters/io/__init__.py +++ b/chatterbot/adapters/io/__init__.py @@ -2,5 +2,4 @@ from .terminal import TerminalAdapter from .io_json import JsonAdapter from .no_output import NoOutputAdapter -from .tts import MacOSXTTS from .multi_adapter import MultiIOAdapter diff --git a/chatterbot/adapters/io/tts.py b/chatterbot/adapters/io/tts.py deleted file mode 100644 index aa8f96823..000000000 --- a/chatterbot/adapters/io/tts.py +++ /dev/null @@ -1,29 +0,0 @@ -from chatterbot.adapters.io import IOAdapter -from chatterbot.utils.read_input import input_function - -import os -import platform -import subprocess - - -class MacOSXTTS(IOAdapter): - """ - A TTS engine using Mac's built-in say command. - """ - - def process_input(self): - """ - Read the user's input from the terminal. - """ - user_input = input_function() - return user_input - - def process_response(self, statement): - """ - Speak the response. - """ - cmd = ['say', str(statement.text)] - if platform.system().lower() == 'darwin': - subprocess.call(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - - return statement.text