We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am sorry if I missed something obvious, but it seems like the power_spectrum variable isn't used in the AudioDataset.getitem() function in https://github.com/astorfi/3D-convolutional-speaker-recognition-pytorch/blob/master/code/2-enrollment/DataProviderEnrollment.py? Also, the file is read twice.
def __getitem__(self, idx): # Get the sound file path sound_file_path = os.path.join(self.audio_dir, self.sound_files[idx].split()[1]) ############################## ### Reading and processing ### ############################## # Reading .wav file fs, signal = wav.read(sound_file_path) # Reading .wav file import soundfile as sf signal, fs = sf.read(sound_file_path) # Label extraction label = int(self.sound_files[idx].split()[0]) ########################### ### Feature Extraction #### ########################### # DEFAULTS: num_coefficient = 40 # Staching frames frames = speechpy.processing.stack_frames(signal, sampling_frequency=fs, frame_length=0.025, frame_stride=0.01, zero_padding=True) # # Extracting power spectrum (choosing 3 seconds and elimination of DC) power_spectrum = speechpy.processing.power_spectrum(frames, fft_points=2 * num_coefficient)[:, 1:] logenergy = speechpy.feature.lmfe(signal, sampling_frequency=fs, frame_length=0.025, frame_stride=0.01, num_filters=num_coefficient, fft_length=1024, low_frequency=0, high_frequency=None) ######################## ### Handling sample #### ######################## sample = {'feature': logenergy, 'label': label} ######################## ### Post Processing #### ######################## if self.transform: sample = self.transform(sample) return sample
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am sorry if I missed something obvious, but it seems like the power_spectrum variable isn't used in the AudioDataset.getitem() function in https://github.com/astorfi/3D-convolutional-speaker-recognition-pytorch/blob/master/code/2-enrollment/DataProviderEnrollment.py?
Also, the file is read twice.
The text was updated successfully, but these errors were encountered: