@@ -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