麦克风监控 能用 但是不明白 求解


def ui():
    time.sleep(0.5)
    pyautogui.hotkey("ctrl", "g")
    time.sleep(1)
    pyautogui.press('1')


def target():
    def print_sound(indata, outdata, frames, time, status):
        global volume_norm


        volume_norm = np.linalg.norm(indata)*10
        # print("|" * int(volume_norm))

        if int(volume_norm) > 8:
            print(int(volume_norm))
            ui()




    while True:
    # while time.time() + 3600*24:
        with sd.Stream(callback=print_sound):

            sd.sleep(10000*10000)

是监控麦克风的 网上抄袭的 很好用 但是不懂 能解释一下吗? 尤其是最后两句sd.sleep(10000*10000)被我改了为了加时间,但是显然没用 我又加了个while True:循环