mp3播放时间
import os os_sep = os.sep this_file_abspath = os.path.abspath(__file__) this_file_dirname, this_file_name = os.path.dirname(this_file_abspath), os.path.abspath(__file__).split(os_sep)[ -1] f_mp3 = '{}{}{}'.format(this_file_dirname, os_sep, 'auido.mp3') from playsound import playsound import time this_time = time.time() playsound(f_mp3) t_spend = time.time() - this_time print(t_spend)