Class SoundInfo

ru.yandex.speechkit

public  class  SoundInfo 

Information on an audio.

This data may be needed when working with an audio, for example, for recording it to an audio file or when playing the audio using various players.

Constructors

SoundInfo(SoundFormat format, int channelCount, int sampleRate, int sampleSize)

Creates an object of the SoundInfo class.

Methods

intgetChannelCount()

Returns the number of audio channels.

SoundFormatgetFormat()

Returns the audio format.

intgetSampleRate()

Returns the audio sample rate in Hertz.

intgetSampleSize()

Returns the bit depth.

StringtoString()

Constructor Detail

SoundInfo

public SoundInfo (SoundFormat format, int channelCount, int sampleRate, int sampleSize)

Creates an object of the SoundInfo class.

Parameters:
format

Audio format.

channelCount

Number of audio channels: 1 — mono; 2 — stereo.

sampleRate

Audio sample rate in Hertz.

sampleSize

The bit depth (8 or 16 bit), in bytes.

Method Detail

getChannelCount

public int getChannelCount ()

Returns the number of audio channels.

Returns:

Number of audio channels: 1 — mono; 2 — stereo.

getFormat

public SoundFormat getFormat ()

Returns the audio format.

Returns:

Audio format.

getSampleRate

public int getSampleRate ()

Returns the audio sample rate in Hertz.

Returns:

Audio sample rate in Hertz.

getSampleSize

public int getSampleSize ()

Returns the bit depth.

Returns:

The bit depth (8 or 16 bit), in bytes.

toString

public String toString ()