athena.transform

Package Contents

Classes

AudioFeaturizer Interface of audio Features extractions.

Functions

compute_cmvn(audio_feature, mean=None, variance=None, local_cmvn=False) Compute cmvn on feature.
read_wav(wavfile, audio_channels=1) read wav from file
class athena.transform.AudioFeaturizer(config={'type': 'Fbank'})

Interface of audio Features extractions.

dim

return the dimension of the feature if only ReadWav, return 1

num_channels

return the channel of the feature

__call__(self, audio=None, sr=None, speed=1.0)

extract feature from audo data :param audio data or audio file :sr sample rate :return feature

__impl(self, audio=None, sr=None, speed=1.0)

:param audio data or audio file, a tensor :sr sample rate, a tensor :return feature

athena.transform.compute_cmvn(audio_feature, mean=None, variance=None, local_cmvn=False)

Compute cmvn on feature.

athena.transform.read_wav(wavfile, audio_channels=1)

read wav from file args: audio_channels = 1 returns: tf.squeeze(audio_data * 32768, axis=-1), tf.cast(sample_rate, dtype=tf.int32)