AudioPlaza: RAONDATA speech team's Audio Preprocessing written by python
Project description
Install Ubuntu Packages
sudo apt update
sudo apt install ffmpeg
apt-get install wget
Using Example
- Audio Downsample
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)
- Audio Trimming
from AudioPlaza.trim 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)
- Download Audio from Google Drive
from AudioPlaza.googledrive import gdown
fid = ""
fname = ""
gdown(fid, fname)
- Get Audio Duration Statistics
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)
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
AudioPlaza-0.0.4.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for AudioPlaza-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41bb0d319127a86b4133c48959b091399cb7c8db2c290a60fffe56e4121b1e6f |
|
MD5 | 8884fd772925409b8cba65d7d8b9b5df |
|
BLAKE2b-256 | 3ceeccd26fd93cf735e45cfa499af62363d428b3e0a39a367bba4bbf65bf4012 |