Page 503 - 3-2
P. 503

# Display interim results, but with a carriage return at the end of the

                            # line, so subsequent lines will overwrite them.
                            # If the previous result was longer than this one, we need to print

                            # some extra spaces to overwrite the previous result



                            os.system('clear')
                            if re.search(u' 쌤', transcript,re.I)or re.search(u' 샘',transcript,re.I) or re.search(u' 선
            생님',transcript,re.I):

                                    time.sleep(3)
                                    screen = pygame.display.set_mode((1080, 1920), DOUBLEBUF)



                                    speak = " 혹시....  그 똑똑하고 잘생긴 선생님 말씀하시는 건가요???????"

                                    face =pygame.image.load('Qeye.png')
                                    screen.blit(face,(200,200))

                                    pygame.display.flip()



                                    os.system('wget       -q       -U       Mozilla      -O        output.mp3
            "http://translate.google.com/translate_tts?ie=UTF-8&total=1&idx=0&textlen=32&client=tw-ob&q=%
            s&tl=ko-kr"' % speak)
                                    pygame.mixer.music.load("output.mp3")

                                    pygame.mixer.music.play()
                                    time.sleep(7)

                                    system_restart()



                            if  re.search(u' 야식추천',    transcript,re.I)or  re.search(u' 야식',transcript,re.I)  or
            re.search(u' 추천',transcript,re.I):
                                    time.sleep(3)

                                    screen = pygame.display.set_mode((1080, 1920), DOUBLEBUF)



                                    food1 =pygame.image.load('food1.png')
                                    food1 = pygame.transform.scale(food1, (900, 1200))

                                    food2 =pygame.image.load('food2.png')
                                    food2 = pygame.transform.scale(food2, (900, 1200))

                                    food3 =pygame.image.load('food3.png')
                                    food3 = pygame.transform.scale(food3, (900, 1200))

                                    food4 =pygame.image.load('food4.png')


                                                         - 503 -
   498   499   500   501   502   503   504   505   506   507   508