Exemplo n.º 1
0
 def check_answer(self, proposition):
     return {'success': texts_difference(proposition, self.text.text) == 0,
             'text': self.text.text}
Exemplo n.º 2
0
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