def __init__(self, config_provider): text_to_speech = None if (config_provider.acting or config_provider.browser or config_provider.calculator or config_provider.hand_gesture or config_provider.happy_colour or config_provider.mixing_desk or config_provider.optical_character_recognition or config_provider.play_your_cards_right or config_provider.slideshow or config_provider.weather): from texttospeech import TextToSpeech text_to_speech = TextToSpeech() speech_to_text = None if (config_provider.acting or config_provider.browser or config_provider.calculator or config_provider.mixing_desk or config_provider.phrase_translation or config_provider.play_your_cards_right or config_provider.weather): from speechtotext import SpeechToText speech_to_text = SpeechToText() self.acting = None if config_provider.acting: from acting import Acting self.acting = Acting(text_to_speech, speech_to_text) self.browser = None if config_provider.browser: from browser import Browser self.browser = Browser(text_to_speech, speech_to_text) self.calculator = None if config_provider.calculator: from calculator import Calculator self.calculator = Calculator(text_to_speech, speech_to_text) self.hand_gesture = None if config_provider.hand_gesture: from handgesture import HandGesture self.hand_gesture = HandGesture(text_to_speech) self.happy_colour = None if config_provider.happy_colour: from happycolour import HappyColour self.happy_colour = HappyColour(text_to_speech) self.mixing_desk = None if config_provider.mixing_desk: from mixingdesk import MixingDesk self.mixing_desk = MixingDesk(text_to_speech, speech_to_text) self.optical_character_recognition = None if config_provider.optical_character_recognition: from opticalcharacterrecognition import OpticalCharacterRecognition self.optical_character_recognition = OpticalCharacterRecognition( text_to_speech) self.phrase_translation = None if config_provider.phrase_translation: from phrasetranslation import PhraseTranslation self.phrase_translation = PhraseTranslation(speech_to_text) self.play_your_cards_right = None if config_provider.play_your_cards_right: from playyourcardsright import PlayYourCardsRight self.play_your_cards_right = PlayYourCardsRight( text_to_speech, speech_to_text) self.slideshow = None if config_provider.slideshow: from slideshow import Slideshow self.slideshow = Slideshow(text_to_speech) self.television = None if config_provider.television: from television import Television self.television = Television() self.weather = None if config_provider.weather: from weather import Weather self.weather = Weather(text_to_speech, speech_to_text)