Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b7223d8

Browse filesBrowse files
authored
Corrected docstring on magspec,powspec and logpowspec
1 parent a02a920 commit b7223d8
Copy full SHA for b7223d8

1 file changed

+3-3Lines changed: 3 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎python_speech_features/sigproc.py‎

Copy file name to clipboardExpand all lines: python_speech_features/sigproc.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def magspec(frames,NFFT):
7676
7777
:param frames: the array of frames. Each row is a frame.
7878
:param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded.
79-
:returns: If frames is an NxD matrix, output will be NxNFFT. Each row will be the magnitude spectrum of the corresponding frame.
79+
:returns: If frames is an NxD matrix, output will be Nx(NFFT/2+1). Each row will be the magnitude spectrum of the corresponding frame.
8080
"""
8181
complex_spec = numpy.fft.rfft(frames,NFFT)
8282
return numpy.absolute(complex_spec)
@@ -86,7 +86,7 @@ def powspec(frames,NFFT):
8686
8787
:param frames: the array of frames. Each row is a frame.
8888
:param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded.
89-
:returns: If frames is an NxD matrix, output will be NxNFFT. Each row will be the power spectrum of the corresponding frame.
89+
:returns: If frames is an NxD matrix, output will be Nx(NFFT/2+1). Each row will be the power spectrum of the corresponding frame.
9090
"""
9191
return 1.0/NFFT * numpy.square(magspec(frames,NFFT))
9292

@@ -96,7 +96,7 @@ def logpowspec(frames,NFFT,norm=1):
9696
:param frames: the array of frames. Each row is a frame.
9797
:param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded.
9898
:param norm: If norm=1, the log power spectrum is normalised so that the max value (across all frames) is 1.
99-
:returns: If frames is an NxD matrix, output will be NxNFFT. Each row will be the log power spectrum of the corresponding frame.
99+
:returns: If frames is an NxD matrix, output will be Nx(NFFT/2+1). Each row will be the log power spectrum of the corresponding frame.
100100
"""
101101
ps = powspec(frames,NFFT);
102102
ps[ps<=1e-30] = 1e-30

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.