Pythonスクリプトで音声を再生したい
背景として、macOSならsayコマンドで読み上げができる
sayコマンドを使わずに、どんなプラットフォームでも動くやり方で、できたデータを再生したい
A few of the libraries discussed in this tutorial play and record bytes objects, whereas others use NumPy arrays to store raw audio data.
numpy arrayで表した音声データを再生できるライブラリ
you can use pyaudio to play and record audio on a variety of platforms, including Windows, Linux, and Mac.
playing sounds with pyaudio is a bit more complex than playing sounds with the libraries you’ve seen earlier.
pyaudio gives you more low-level control