## Install Ubuntu Packages
`bash sudo apt update sudo apt install ffmpeg apt-get install wget ` * Pre-install those packages using ubuntu apt
## Install using pip `bash pip install AudioPlaza ` * You can install this from PYPI, pip.
## Using Example
1. Audio Downsample `python from AudioPlaza.downsample import audio_downsample input_path = "./input.wav" # 입력 파일명 out_path = "./out.wav" # 출력 파일명 sample_rate = 22050 # 샘플레이트 (22.05 khz) audio_downsample(input_path, out_path, sr=sample_rate) `
2. Audio Trimming/Padding 1 (Zero, One, Repeat Padding) * 그냥 0, 1, 맨 끝 오디오를 기반으로 패팅 * 너무 길면 트리밍 * 같은 숫자로 하기 때문에 미세한 노이즈가 반영되지 못하는 경우가 존재
`python from AudioPlaza.trim1 import trimmer input_path = "./input.wav" # 입력 파일명 out_path = "./out.wav" # 출력 파일명 sample_rate = 22050 # 샘플레이트 (22.05 khz) padding_sec = 0.3 # 앞 뒤로 패딩을 몇초 줄건지 tr = trimmer(sample_rate=sample_rate, pad="zero") # pad = "zero", "one", "repeat" tr.trim(input_path, out_path, padding_sec=padding_sec) `
3. Audio Trimming 2 (Noise Sampling) * 노이즈(말이 아닌 부분)을 샘플링하여 만들고, 이를 패딩에 활용해주는 기법. * 말이 뚝 짤리는 등의 문제는 해결할 수 없지만, 0으로 되어 소리가 끊겨 모델의 학습에 부정적 영향을 주는 경우는 방지. `python from AudioPlaza.trim2 import trimmer input_path = "./input.wav" # 입력 파일명 out_path = "./out.wav" # 출력 파일명 sample_rate = 22050 # 샘플레이트 (22.05 khz) padding_sec = 0.3 # 앞 뒤로 패딩을 몇초 줄건지 tr = trimmer(sample_rate=sample_rate, dict_size=50) # dict_size => 노이즈 딕셔너리의 사이즈 / 너무 크지 않게 주의 (50 기본값) tr.trim(input_path, out_path, padding_sec=padding_sec) `
4. Download Audio from Google Drive `python from AudioPlaza.googledrive import gdown fid = "" fname = "" gdown(fid, fname) `
5. Get Audio Duration Statistics `python from AudioPlaza.duration import get_duration, get_folder_duration dur = get_duration("./audio.wav") print(dur) # ~~ sec stat = get_folder_duration("./wavs/") print(stat) # 정보 stat.draw_plot("./stat.png") #내용을 plot으로 그려서 시각화 `
## Version Information * 0.0.1: Initial version with trim, downsample, googledrive, duration statistics. (Some features from RAONDIO)
Metadata
Release files for AudioPlaza 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| AudioPlaza-0.1.2.tar.gz | 5.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| AudioPlaza-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / AudioPlaza-0.1.2.tar.gz
| Download URL | AudioPlaza-0.1.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b080f947ecf4d0f5f951e45deb83c5d04014517952825517c9184663fd0cef5
|
|
BLAKE2b-256 checksum How to use checksums |
fe884659f2219747c169e2180a9cf4d64f9b77fae01ef2a2d9babc20009b721c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / AudioPlaza-0.1.2-py3-none-any.whl
| Download URL | AudioPlaza-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a9385241b6a10990242a53ffb71ea250dcc977f3c565ec6042f73a579ff10bc
|
|
BLAKE2b-256 checksum How to use checksums |
3e582e43db2299631de6a2cfb27353d10881db56ab24953a1ce447d75d77f245
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for AudioPlaza 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.