Example usage for javax.sound.sampled UnsupportedAudioFileException getMessage

List of usage examples for javax.sound.sampled UnsupportedAudioFileException getMessage

Introduction

In this page you can find the example usage for javax.sound.sampled UnsupportedAudioFileException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:it.sardegnaricerche.voiceid.sr.Voiceid.java

/**
 * Run the diarization process and generate the clusters (speakers)
 * representations. Split the original audio file according to the
 * identified clusters.//from w  w  w. j  ava2  s.  c o m
 * 
 * @throws VoiceidException
 * @throws IOException
 */
public void extractClusters() throws VoiceidException, IOException {
    try {
        if (!Utils.isGoodWave(this.inputfile)) {
            logger.info("Ok, let's transcode this wav"); // TODO: rename to
            // another wav e
            // resample
            throw new VoiceidException("Transcoding of bad(format) wav files still not implemented!");
        }
        this.wavPath = new File(Utils.getBasename(this.inputfile) + ".wav");
    } catch (UnsupportedAudioFileException e) {
        logger.severe(e.getMessage());
        this.toWav();
    } catch (IOException e) {
        logger.severe(e.getMessage());
    }
    clusters = diarizationManager.extractClusters(inputfile);
    this.trimClusters();
}