import pyglet


def question_voice(audio):
    if audio==0:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key1.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==1:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key2.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==2:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key3.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()    

    if audio==3:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key4.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==4:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key5.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==5:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key6.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==6:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key7.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==7:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key8.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==8:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key9.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==9:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key10.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==10:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key11.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==11:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key12.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==12:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key13.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==13:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key14.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if audio==14:
        que_1 = pyglet.resource.media('Answers/KbcQuestion/Ans_key15.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()


def vocie_of_solution(index):
    if index==0:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-1.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==1:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-2.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==2:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-3.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==3:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-4.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==4:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-5.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==5:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-6.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==6:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-7.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==7:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-8.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==8:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-9.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==9:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-10.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==10:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-11.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==11:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-12.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==12:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-13.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==13:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-14.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()

    if index==14:
        que_1 = pyglet.resource.media('Answers/write-Ans/Question-15.mp3')
        que_1.play()
        def exit_callback(dt):
            pyglet.app.exit()
        pyglet.clock.schedule_once(exit_callback , que_1.duration)
        pyglet.app.run()