nussl/separation/spatial/duet.py
def _compute_spectrogram(self, sample_rate):
        """ Creates the STFT matrices for channel 0 and 1, and computes the frequency matrix.
        Parameter:
            sample_rate (integer): sample rate

        Returns:
            stft_ch0 (np.matrix): a 2D Numpy matrix containing the stft of channel 0
            stft_ch1 (np.matrix): a 2D Numpy matrix containing the stft of channel 1
            wmat (np.matrix): a 2D Numpy matrix containing the frequencies of analysis of the Fourier transform
        """

        # Compute the stft of the two channel mixtures
        self.audio_signal.stft_params = self.stft_params
        self.audio_signal.stft()

        stft_ch0 = self.audio_signal.get_stft_channel(0)
        stft_ch1 = self.audio_signal.get_stft_channel(1)

        # Compute the freq. matrix for later use in phase calculations
        n_time_bins = len(self.audio_signal.time_bins_vector)
        wmat = np.array(np.tile(np.mat(
            self.audio_signal.freq_vector).T, (1, n_time_bins))) * (
            2 * np.pi / sample_rate)
        wmat += constants.EPSILON
        return stft_ch0, stft_ch1, wmat
 Creates the STFT matrices for channel 0 and 1, and computes the frequency matrix.
        Parameter:
            sample_rate (integer): sample rate

        Returns:
            stft_ch0 (np.matrix): a 2D Numpy matrix containing the stft of channel 0
            stft_ch1 (np.matrix): a 2D Numpy matrix containing the stft of channel 1
            wmat (np.matrix): a 2D Numpy matrix containing the frequencies of analysis of the Fourier transform
        
Creates the STFT matrices for channel 0 and 1, and computes the frequency matrix.
Parameter:
sample_rate (integer): sample rate
Creates the STFT matrices for channel 0 and 1 and computes the frequency matrix . Parameter : sample_rate ( integer ) : sample rate
def _compute_spectrogram(self, sample_rate):
        self.audio_signal.stft_params = self.stft_params
        self.audio_signal.stft()
        stft_ch0 = self.audio_signal.get_stft_channel(0)
        stft_ch1 = self.audio_signal.get_stft_channel(1)
        n_time_bins = len(self.audio_signal.time_bins_vector)
        wmat = np.array(np.tile(np.mat(
            self.audio_signal.freq_vector).T, (1, n_time_bins))) * (
            2 * np.pi / sample_rate)
        wmat += constants.EPSILON
        return stft_ch0, stft_ch1, wmat
def _compute_spectrogram ( self , sample_rate ) : self . audio_signal . stft_params = self . stft_params self . audio_signal . stft ( ) stft_ch0 = self . audio_signal . get_stft_channel ( 0 ) stft_ch1 = self . audio_signal . get_stft_channel ( 1 ) n_time_bins = len ( self . audio_signal . time_bins_vector ) wmat = np . array ( np . tile ( np . mat ( self . audio_signal . freq_vector ) . T , ( 1 , n_time_bins ) ) ) * ( 2 * np . pi / sample_rate ) wmat += constants . EPSILON return stft_ch0 , stft_ch1 , wmat
Creates the STFT matrices for channel 0 and 1, and computes the frequency matrix.
Creates the STFT matrices for channel 0 and 1 and computes the frequency matrix .
""" Creates the STFT matrices for channel 0 and 1, and computes the frequency matrix.
        Parameter:
            sample_rate (integer): sample rate

        Returns:
            stft_ch0 (np.matrix): a 2D Numpy matrix containing the stft of channel 0
            stft_ch1 (np.matrix): a 2D Numpy matrix containing the stft of channel 1
            wmat (np.matrix): a 2D Numpy matrix containing the frequencies of analysis of the Fourier transform
        """ # Compute the stft of the two channel mixtures # Compute the freq. matrix for later use in phase calculations
stft_ch0 (np.matrix): a 2D Numpy matrix containing the stft of channel 0
stft_ch1 (np.matrix): a 2D Numpy matrix containing the stft of channel 1
wmat (np.matrix): a 2D Numpy matrix containing the frequencies of analysis of the Fourier transform
stft_ch0 ( np . matrix ) : a 2D Numpy matrix containing the stft of channel 0 stft_ch1 ( np . matrix ) : a 2D Numpy matrix containing the stft of channel 1 wmat ( np . matrix ) : a 2D Numpy matrix containing the frequencies of analysis of the Fourier transform
self
sample_rate