pyACA: Documentation 0.3.1
Source Code for Audio Content Analysis
All Classes Namespaces Files Functions Variables Pages
Functions
pyACA.FeatureTimeStd Namespace Reference

computes the standard deviation of a time domain signal More...

Functions

 FeatureTimeStd (x, iBlockLength, iHopLength, f_s)
 computes the standard deviation of a time domain signal
 

Detailed Description

computes the standard deviation of a time domain signal

Args: x: audio signal iBlockLength: block length in samples iHopLength: hop length in samples f_s: sample rate of audio data (unused)

Returns: vstd standard deviation t time stamp

Function Documentation

◆ FeatureTimeStd()

FeatureTimeStd ( x,
iBlockLength,
iHopLength,
f_s )

computes the standard deviation of a time domain signal

Parameters
xarray with floating point audio data (dimension samples x channels)
iBlockLengthblock length in samples
iHopLengthhop length in samples
f_ssample rate of audio data
Returns
vstd: standard deviation
t: time stamp

Definition at line 30 of file FeatureTimeStd.py.

30def FeatureTimeStd(x, iBlockLength, iHopLength, f_s):
31
32 # create blocks
33 xBlocks, t = pyACA.ToolBlockAudio(x, iBlockLength, iHopLength, f_s)
34
35 # number of results
36 iNumOfBlocks = xBlocks.shape[0]
37
38 # allocate memory
39 vstd = np.zeros(iNumOfBlocks)
40
41 for n, block in enumerate(xBlocks):
42 # calculate the rms
43 vstd[n] = np.std(block)
44
45 return vstd, t