def check_answer(self, proposition): return {'success': texts_difference(proposition, self.text.text) == 0, 'text': self.text.text}
def recognize_speech_and_compare(audio_file, text_to_compare): recognized_text = recognize_speech(audio_file) if comparators.texts_difference(text_to_compare, recognized_text) == 0: return True return False