SoundInfo class

ru.yandex.speechkit

public  class  SoundInfo 

Sound attributes stored in the SoundBuffer class.

Nested classes

Constructors

SoundInfo(Codec codec, int channelCount, int sampleRate, int sampleSize, int sampleCount)

Creates an object of the SoundInfo class.

Methods

intgetChannelCount()

Returns the number of audio channels.

CodecgetCodec()

Returns the codec.

intgetSampleCount()

Returns the number of samples.

intgetSampleRate()

Returns the sample rate.

intgetSampleSize()

Returns the bit depth.

Constructor descriptions

SoundInfo

public SoundInfo (Codec codec, int channelCount, int sampleRate, int sampleSize, int sampleCount)

Creates an object of the SoundInfo class.

Parameters:
codec

The codec used.

channelCount

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

sampleRate

The sample rate in Hertz.

sampleSize

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

sampleCount

The number of samples. One sample lasts for 1/bit rate of a second.

Method descriptions

getChannelCount

public int getChannelCount ()

Returns the number of audio channels.

Returns:

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

getCodec

public Codec getCodec ()

Returns the codec.

Returns:

The codec used.

getSampleCount

public int getSampleCount ()

Returns the number of samples.

Returns:

The number of samples. 1 sample lasts for 1/bit rate of a second.

getSampleRate

public int getSampleRate ()

Returns the sample rate.

Returns:

The sample rate in Hertz.

getSampleSize

public int getSampleSize ()

Returns the bit depth.

Returns:

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