-
-
Notifications
You must be signed in to change notification settings - Fork 43
Silence
Sambit Paul edited this page Jul 31, 2022
·
3 revisions
The Silence class aims to provide two key functionalities:
- Silence Detection
- Splitting by Silence
Given an audio file (read using WAV class), this identifies all the segments of silence within the audio segment.
WAV objRead = new WAV();
objRead.readWAV("audio.wav"); //Filepath of the audio to be processed
int silence_length = 500; //in milliseconds
int silence_threshold = -20 //in db
double iter_steps = 0.25 //in milliseconds
Silence s1 = new Silence(silence_length, silence_threshold, iter_steps);
s1.detectSilence(objRead);
int[][] silences_ms = s1.getSilence(true); //segment boundaries in milliseconds
//OR
int[][] silences_indices = s1.getSilence(); //segment boundaries as indices
After segments of silence are detected, the original audio can be split into segments which do not contain any silence.
This has to be done after silent segments have been detected.
WAV objRead = new WAV();
objRead.readWAV("audio.wav");
String saveDirectory = "./split_audio/"; //this folder must exist
int silence_length = 500; //in milliseconds
int silence_threshold = -20 //in db
double iter_steps = 0.25 //in milliseconds
Silence s1 = new Silence(silence_length, silence_threshold, iter_steps);
s1.detectSilence(objRead);
s1.splitBySilence(saveDirectory);
Wiki
-
Filters
- IIR Filters
- FIR Filters
- Kernel-Based Filter
- Adaptive Filters
-
Signals
-
Peak Detection
-
Transformations
-
Speech
-
Windowing