Playing wav files with python simpleaudio produces: SimpleaudioError: Unable to start queue. -- CODE: -66681
Playing wav files with python simpleaudio produces: SimpleaudioError: Unable to start queue. -- CODE: -66681
import simpleaudio as sa
wave_obj = sa.WaveObject.from_wave_file('path to wav file/test.wav')
play_obj = wave_obj.play()
play_obj.wait_done() # Wait until sound has finished playing
代码一直有效,直到我安装了几个包(firebase、Crypto、python_jwt、cryptodome、pycrypto)。现在它产生:
SimpleaudioError Traceback (most recent call last)
<ipython-input-8-15372821820f> in <module>
2
3 wave_obj = sa.WaveObject.from_wave_file('/Users/mohamed/Files/IBM Watson TTS/Segments/output.wav')
----> 4 play_obj = wave_obj.play()
5 play_obj.wait_done() # Wait until sound has finished playing
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/simpleaudio/shiny.py in play(self)
18 def play(self):
19 return play_buffer(self.audio_data, self.num_channels,
---> 20 self.bytes_per_sample, self.sample_rate)
21
22 @classmethod
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/simpleaudio/shiny.py in play_buffer(audio_data, num_channels, bytes_per_sample, sample_rate)
59 def play_buffer(audio_data, num_channels, bytes_per_sample, sample_rate):
60 play_id = _sa._play_buffer(audio_data, num_channels, bytes_per_sample,
---> 61 sample_rate)
62 return PlayObject(play_id)
SimpleaudioError: Unable to start queue. -- CODE: -66681
重新启动计算机修复它。
import simpleaudio as sa
wave_obj = sa.WaveObject.from_wave_file('path to wav file/test.wav')
play_obj = wave_obj.play()
play_obj.wait_done() # Wait until sound has finished playing
代码一直有效,直到我安装了几个包(firebase、Crypto、python_jwt、cryptodome、pycrypto)。现在它产生:
SimpleaudioError Traceback (most recent call last)
<ipython-input-8-15372821820f> in <module>
2
3 wave_obj = sa.WaveObject.from_wave_file('/Users/mohamed/Files/IBM Watson TTS/Segments/output.wav')
----> 4 play_obj = wave_obj.play()
5 play_obj.wait_done() # Wait until sound has finished playing
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/simpleaudio/shiny.py in play(self)
18 def play(self):
19 return play_buffer(self.audio_data, self.num_channels,
---> 20 self.bytes_per_sample, self.sample_rate)
21
22 @classmethod
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/simpleaudio/shiny.py in play_buffer(audio_data, num_channels, bytes_per_sample, sample_rate)
59 def play_buffer(audio_data, num_channels, bytes_per_sample, sample_rate):
60 play_id = _sa._play_buffer(audio_data, num_channels, bytes_per_sample,
---> 61 sample_rate)
62 return PlayObject(play_id)
SimpleaudioError: Unable to start queue. -- CODE: -66681
重新启动计算机修复它。