最終更新:2021-04-19 (月) 05:32:30 (1105d)  

Python/wave
Top / Python / wave

Read and write WAV files

https://docs.python.org/ja/3/library/wave.html

主な処理

クラス

Python/wave.Wave_read

Wave_read.readframes(chunk)

  • 最大 n 個のオーディオフレームを読み込んで、 bytes オブジェクトとして返します。
  • return Python/bytes

Wave_read.getframerate?()

  • サンプリングレートを返します。

Wave_read.getnframes?()

  • オーディオフレーム数を返します。

Python/wave.Wave_write?

  • wf = wave.open(sys.argv[1], 'rb')
    data = wf.readframes(CHUNK)