Record sound: Difference between revisions
Content deleted Content added
Taking down to draft |
|||
Line 1: | Line 1: | ||
{{task}} |
{{draft task}} |
||
Record sound (mono 16-bit PCM) into an integer array. |
Record sound (mono 16-bit PCM) into an integer array. |
Revision as of 01:41, 30 December 2010
Record sound is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.
Record sound (mono 16-bit PCM) into an integer array.
Python
<lang python>import pyaudio
chunk = 1024 FORMAT = pyaudio.paInt16 CHANNELS = 1 RATE = 44100
p = pyaudio.PyAudio()
stream = p.open(format = FORMAT,
channels = CHANNELS, rate = RATE, input = True, frames_per_buffer = chunk)
data = stream.read(chunk) print [ord(i) for i in data]</lang>