
import ybc_speech as speech
import ybc_bot as bot
import ybc_box as box 
while True :
    op = box.buttonbox('选一个',['开始','退出'])
    if  op == '开始':
        op1 = box.buttonbox('选一个',['输入问题:','口头'])
        if op1 == '输入问题:':
            voice = box.enterbox('输入问题:')
        elif  op1 =='口头':
            voice = voice = speech.record('1.wav',6)
        res = bot.chat(voice)
        speech.speak(res,3)
        box.msgbox(res)
    else:
        break 


