Skip to main content

a simple audio recorder

Project description

recorder

A simple audio recorder which is Based on PyAudio

Usage

install

pip install recorder

get device info

get all device info

from recorder import Recorder
r = Recorder()
print(r.get_device_info())  

get specified device info

from recorder import Recorder
r = Recorder()
print(r.get_device_info(index=0))  

record

record for 5 seconds and return the data as numpy array

from recorder import Recorder
r = Recorder()
np_data = r.record(5)  
print(np_data) 

record for 5 seconds and save the data to file out.wav

from recorder import Recorder
r = Recorder()
r.record(5, output='out.wav')  

get wave data with queue

get wave data from queue and print data

from recorder import Recorder
r = Recorder()
q = r.get_wave_queue()
while True:
    print(q.get())

play

play a piece of sound

from recorder import Recorder
Recorder.play('out.wav')

close

close the recorder

from recorder import Recorder
r = Recorder()
r.close()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for recorder, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size recorder-0.0.2.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page