marytts.util.data.audio
Class AudioConverterUtils

java.lang.Object
  extended by marytts.util.data.audio.AudioConverterUtils

public class AudioConverterUtils
extends java.lang.Object

Audio Convertion Utilities

Author:
Sathish Chandra Pammi

Nested Class Summary
static class AudioConverterUtils.HighPassFilter
          A high-pass filter with flexible cutoff frequency and transition bandwidth.
static class AudioConverterUtils.SequenceAudioProcessor
           
static class AudioConverterUtils.Stereo2Mono
           
 
Constructor Summary
AudioConverterUtils()
           
 
Method Summary
static javax.sound.sampled.AudioInputStream convertBit24ToBit16(javax.sound.sampled.AudioInputStream ais)
          24-Bit Audio to 16-bit Audio converter
static javax.sound.sampled.AudioInputStream convertBit24ToBit16(javax.sound.sampled.AudioInputStream ais, int shiftBits)
          24-Bit Audio to 16-bit Audio converter
static javax.sound.sampled.AudioInputStream downSampling(javax.sound.sampled.AudioInputStream ais, int targetSamplingRate)
          DownSampling given Audio Input Stream
static int[] getSamples(javax.sound.sampled.AudioInputStream ais)
          Get samples in Integer Format (un-normalized) from AudioInputStream
static void removeEndpoints(java.lang.String inputFile, java.lang.String outputFile, int energyBufferLength, double speechStartLikelihood, double speechEndLikelihood, double shiftFromMinimumEnergyCenter, int numClusters, double minimumStartSilenceInSeconds, double minimumEndSilenceInSeconds)
          Removes endpoints from given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioConverterUtils

public AudioConverterUtils()
Method Detail

convertBit24ToBit16

public static javax.sound.sampled.AudioInputStream convertBit24ToBit16(javax.sound.sampled.AudioInputStream ais)
                                                                throws java.lang.Exception
24-Bit Audio to 16-bit Audio converter

Parameters:
AudioInputStream -
Returns:
AudioInputStream
Throws:
java.lang.Exception

convertBit24ToBit16

public static javax.sound.sampled.AudioInputStream convertBit24ToBit16(javax.sound.sampled.AudioInputStream ais,
                                                                       int shiftBits)
                                                                throws java.lang.Exception
24-Bit Audio to 16-bit Audio converter

Parameters:
AudioInputStream -
shiftBits -
Returns:
AudioInputStream
Throws:
java.lang.Exception

getSamples

public static int[] getSamples(javax.sound.sampled.AudioInputStream ais)
                        throws java.lang.Exception
Get samples in Integer Format (un-normalized) from AudioInputStream

Parameters:
ais -
Returns:
Throws:
java.lang.Exception

downSampling

public static javax.sound.sampled.AudioInputStream downSampling(javax.sound.sampled.AudioInputStream ais,
                                                                int targetSamplingRate)
                                                         throws java.lang.Exception
DownSampling given Audio Input Stream

Parameters:
ais -
targetSamplingRate -
Returns:
Throws:
java.lang.Exception

removeEndpoints

public static void removeEndpoints(java.lang.String inputFile,
                                   java.lang.String outputFile,
                                   int energyBufferLength,
                                   double speechStartLikelihood,
                                   double speechEndLikelihood,
                                   double shiftFromMinimumEnergyCenter,
                                   int numClusters,
                                   double minimumStartSilenceInSeconds,
                                   double minimumEndSilenceInSeconds)
                            throws java.io.IOException,
                                   javax.sound.sampled.UnsupportedAudioFileException
Removes endpoints from given file.

Parameters:
inputFile -
outputFile -
energyBufferLength -
speechStartLikelihood -
speechEndLikelihood -
shiftFromMinimumEnergyCenter -
numClusters -
minimumStartSilenceInSeconds -
minimumEndSilenceInSeconds -
Throws:
java.io.IOException
javax.sound.sampled.UnsupportedAudioFileException