semvec/pypi-packages huggingface dataset:
recorder 0.0.2
a simple audio recorder
License: MIT Licence
Keywords: pip,recorder

# recorder
A simple audio recorder which is Based on PyAudio
# Usage
### install
```
pip install recorder
```
### get device info
get all device info
```python
from recorder import Recorder
r = Recorder()
print(r.get_device_info())  
```
get specified device info
```python
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
```python
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` 
```python
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
```python
from recorder import Recorder
r = Recorder()
q = r.get_wave_queue()
while True:
    print(q.get())
```


### play
play a piece of sound
```python
from recorder import Recorder
Recorder.play('out.wav')
```
### close
close the recorder
```python
from recorder import Recorder
r = Recorder()
r.close()
```
wavechart 0.0.2
some utils to show audio wave
License: MIT Licence
Keywords: pip,wavechart

# WaveChart
a chart util to show audio wave
# Usage
### Install
```
pip install wavechart
```

### Static chart
Display the waveform of a sound file
```python
import wavechart
chart = wavechart.StaticWaveChart(path='audio.wav')
chart.show()
```

### Dynamic chart
Display the waveform of a sound queue in the format of numpy array
```python
from recorder import Recorder
import wavechart

r = Recorder()
wave_queue = r.get_wave_queue()
chart = wavechart.DynamicWaveChart(wave_queue=wave_queue)
chart.show()
```