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.

Source Distribution

recorder-0.0.2.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file recorder-0.0.2.tar.gz.

File metadata

  • Download URL: recorder-0.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for recorder-0.0.2.tar.gz
Algorithm Hash digest
SHA256 311ded36a517c30b20102c904f9a50eb86ef7a32431ed0077f4d195d276221ee
MD5 9b5b320d087a78758a54441cff7d4173
BLAKE2b-256 575c72796223b369af88cfe697d2ac1d8afb2d3c2fac89515d36edf5e573c21d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page