我正在尝试通过静音将 mp3 文件拆分为块并获取
File "C:\Anaconda3\envs\py27\lib\site-packages\pydub\playback.py", line 71, in play
_play_with_ffplay(audio_segment)
File "C:\Anaconda3\envs\py27\lib\site-packages\pydub\playback.py", line 18, in _play_with_ffplay
seg.export(f.name, "wav")
File "C:\Anaconda3\envs\py27\lib\site-packages\pydub\audio_segment.py", line 780, in export
out_f = _fd_or_path_or_tempfile(out_f, 'wb+')
File "C:\Anaconda3\envs\py27\lib\site-packages\pydub\utils.py", line 57, in _fd_or_path_or_tempfile
fd = open(fd, mode=mode)
IOError: [Errno 13] Permission denied: 'd:\\tmp\\tmpo5dfj5.wav'
当我尝试播放它时
audio = AudioSegment.from_mp3(lessonFilePath)
chunks = split_on_silence(audio, min_silence_len=2000, silence_thresh=-16)
ordinalAudio = 0
chunk = chunks[ordinalAudio]
play(chunk) # here it is rising
我可以访问这个目录,我可以执行
fd = open(fd, mode=mode)
在我自己的单独脚本中。
还有什么可以检查的?