Speech

Provides a demonstration of using different speech tools available in JDSP

Silence Detection

                    
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
                    
                  

Splitting by Silence

                    
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);