Cross-platform audio playback/recording (C++/PortAudio/ASIO/WASAPI) with Python bindings
Project description
paudio - Windows audio playback/recording with PortAudio/ASIO/WASAPI and Python bindings
概要 Windows上でオーディオのデバイス列挙・再生・録音(ASIO、WASAPIループバック)を提供するC++実装と、そのPythonバインディングです。CLI実行とPython APIの両方が利用できます。
インストール pipでインストール可能(PyPI公開後):
pip install paudio
Pythonの使い方 デバイス一覧(標準出力へ表示)
import paudio
paudio.list_devices()
再生(非ブロッキング制御)
import time, paudio
p = paudio.Player()
p.load("C:/music/test.wav")
p.start()
while p.is_playing():
time.sleep(0.1)
p.stop()
録音(非ブロッキング制御)
import time, paudio
r = paudio.Recorder()
# デフォルトデバイスへ録音
r.setup("C:/recordings/out.wav")
r.start()
time.sleep(5)
r.stop()
# ASIOでチャンネル範囲(1ベース)。例: 44-54 は11ch
# r.setup("C:/recordings/out.wav", device_index=5, channels=(44, 54))
主な機能
- デバイス列挙(WASAPI/ASIO、WASAPIループバックの表示)
- WAV再生(16/24/32bit PCM、簡易リサンプル)
- 録音:
- WASAPIループバック(システム音、2ch)
- ASIO(チャンネル範囲指定対応、1ベース)
注意
- WASAPIループバックは2ch固定です。
- 通常WASAPI入力は先頭Nchの取得のみで、中腹からのチャンネル範囲指定は未対応です。
ライセンス MIT(本プロジェクト)。PortAudioおよびASIO SDKの各ライセンスに従います。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_p_audio-0.1.2.tar.gz.
File metadata
- Download URL: py_p_audio-0.1.2.tar.gz
- Upload date:
- Size: 2.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdc49fb478ae1f82438e229d8afdfa3ee9b1ed5a2b268adbea7eb20cb5b8440c
|
|
| MD5 |
68890e7214c97fcf0ca015d3d53aa379
|
|
| BLAKE2b-256 |
5bbcd2b8c7e9d56a4b0c633558f32dd748288f167b8fa16ec823225f57ac8f59
|
File details
Details for the file py_p_audio-0.1.2-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: py_p_audio-0.1.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 207.3 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22da43612631344b5f5723e450d66f18ebbad36de29f2c1f7acaf57b20d26d6f
|
|
| MD5 |
5a9dc7ef5a88ea3865b418bc9d505918
|
|
| BLAKE2b-256 |
6ee1a3a0abd555ea378ce2aa3be556a777f5c5d013c958585f8d6b6c01503e29
|