예제 #1
0
파일: models.py 프로젝트: Bisk1/kongming
 def check_answer(self, proposition):
     return {'success': texts_difference(proposition, self.text.text) == 0,
             'text': self.text.text}
예제 #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