Audioperm, a python library for generating different permutations of audible segments from audio files.
Project description
Audioperm, a python library for generating different permutations of audible segments from audio files.
Audioperm
A python library for generating different permutations of audible segments from audio files.
pip install audioperm
Use:
- Silence Removal from Audio
- Audio / Speech augmentation
- Word segmentation
- Word level permutation generation
- Add new synthetic data for deep learning
- Speaker recognition, Speaker verification, Audio classification, Audio fingerprinting
Documentation: https://zabir-nabil.github.io/audioperm/
Source Code: https://github.com/zabir-nabil/audioperm
Word segmentation
from audioperm import AudioPerm
from audioperm.utils import save_audio
ap = AudioPerm("i_love_cats.m4a")
label = "i love cats"
words = ap.word_segments()
label_words = label.split()
for i, w in enumerate(words):
save_audio(w, label_words[i] + ".wav")
cats.wav i_love_cats.m4a i.wav love.wav
Word-level permutation
import numpy as np
from audioperm import AudioPerm
from audioperm.utils import save_audio
ap = AudioPerm("i_love_cats.m4a")
ap.word_segments(return_words=False)
perm_sentences = ap.permute(n_permutations = 5)
for i, s in enumerate(perm_sentences):
s = np.hstack(s).astype(np.int16) # will fix later
save_audio(s, f"perm_{i}.wav")
cats.wav i.wav perm_1.wav perm_4.wav
i_love_cats.m4a love.wav perm_2.wav perm_0.wav
perm_3.wav
Others
To run the code: Google Colab
Any contribution is welcome.
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
audioperm-0.0.3.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for audioperm-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04f5914e0fdc43963ac0e007249a4f1451c8e9b806ea0aeee679f1b0e5aad74f |
|
MD5 | 77d4849944b9d7bf9d3fdf555f9ca36b |
|
BLAKE2b-256 | e84e4780e2628460970ba86b7d8c4ca9088d1c1c5b65d7d13ca6ea7046cda7d2 |