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)

 

posted @ 2018-04-08 14:38  papering  阅读(156)  评论(0编辑  收藏  举报