API

Features

Base.summaryMethod
Base.summary(f::Features)

Display a table summarizing each field of the given feature (name, value, type).

Only available in HTML context.

source
Base.summaryMethod
Base.summary(c::ComposedFunction{<:Any,<:Features})

Provides a summary for each feature

source
AudioSources.loadMethod
AudioSources.load(s::AbstractAudioSource, withprops::Bool; subrange::Union{AbstractRange, Colon}=:, ch=1)

Similar to load(s::AbstractAudioSource), with aditional option: set withprops to true to return a FeaturesProperties object with the audio data.

source

Properties

SpeechFeatures.FeaturesPropertiesType
FeaturesProperties{T}

T is used to know which feature is associated.

Fields

  • fs is the frequency sampling of the input to the feature extractor
  • fs_init keep track of the initial fs when several Features are chained
  • scale is a Vector giving the feature resolution, in its given unit
source
SpeechFeatures.DataPropsType
DataProps{T}::DataType = Tuple{AbstractArray, FeaturesProperties{T}}

Alias type that is the input and output type of all Features functions.

source
Base.summaryMethod
Base.summary(props::FeaturesProperties)

Display a table summarizing the given features properties.

source

Frames

Default field values:

Frames
fieldvaluetype
frameduration0.025Float64
framestep0.01Float64
dithering0.0Float64
preemph0.97Float64
removedctrueBool
windownamehannString
padding0Int64
dropedgetrueBool
SpeechFeatures.FramesType
Frames <: Features

Segment resulting from framing the signals. This representation is usually used to extract the short-term Fourier transform.

source
SpeechFeatures.FramesMethod
Frames(; <keyword arguments>)

Initialize frames with default values if not specified.

Arguments

  • frameduration = 0.025 in seconds
  • framestep = 0.01 time between two frames in seconds
  • dithering = 0.0 add gaussian noise to the signal
  • preemph = 0.97 improve signal-to-noise ratio by boosting high frequencies
  • removedc = true
  • windowname = "hann" framing window, one of ["hann", "hamming", "povey", "rectangular"]
  • padding = 0 amount of padding
  • dropedge = true
source
SpeechFeatures.FramesMethod
(f::Frames)((x, props)::DataProps{AudioSources.AbstractAudioSource})

Apply Frames to the given signal.

Result is a matrix of size (frame length, number of frames), and the new FeaturesProperties

source

STFT

SpeechFeatures.STFTMethod
(f::STFT)((X, props)::DataProps{Frames})

Apply Short-Term Fourier Transform to the given Frames matrix.

Result is a matrix of size (≈ frame length / 2, number of frames), and the new FeaturesProperties.

source

FBANK

Default field values:

FBANK
fieldvaluetype
numfilters26Int64
lofreq80Int64
hifreq-400Int64
SpeechFeatures.FBANKMethod
FBANK(; <keyword arguments>)

Initialize FBANK with default values if not specified.

Arguments

  • numfilters = 26 number of filters ("triangles")
  • lofreq = 80 lowest frequency to keep
  • hifreq = -400 Nyquist frequency + hifreq is the highest frequency to keep
source
SpeechFeatures.FBANKMethod
(f::FBANK)((X, props)::DataProps{STFT})

Apply Mel filterbank to the given matrix.

Result is a matrix of size (numfilters, number of frames), and the new FeaturesProperties.

source

MFCC

Default field values:

MFCC
fieldvaluetype
nceps13Int64
liftering22Int64
SpeechFeatures.MFCCMethod
MFCC(; <keyword arguments>)

Initialize MFCC with default values if not specified.

Arguments

  • nceps = 13 number of cepstral coefficients
  • liftering = 22 lifter value
source
SpeechFeatures.MFCCMethod
(f::MFCC)((X, props)::Union{DataProps{FBANK}, DataProps{STFT}})

Apply MFCC to the given matrix.

Result is a matrix of size (nceps, number of frames), and the new FeaturesProperties.

source

Autocorr

SpeechFeatures.AutocorrMethod
(f::Autocorr)((X, props)::DataProps{Frames})

Apply autocorrelation to the given frames.

Result is a matrix of size (frame length, number of frames), and the new FeaturesProperties

source

AddDeltas

Default field values:

AddDeltas
fieldvaluetype
order2Int64
winlen2Int64
SpeechFeatures.AddDeltasMethod
AddDeltas(; <keyword arguments>)

Initialize AddDeltas with default values if not specified.

Arguments

  • order = 2 derivative order
  • winlen = 2 length of delta window
source
SpeechFeatures.AddDeltasMethod
(f::AddDeltas)((X, props)::DataProps{<:Features})

Apply AddDeltas to the given Features matrix.

Result is a matrix of size (nb input matrix rows * (order+1), number of frames), and the new FeaturesProperties

source

Index