Skip to content

The spectrogram computed by "torchaudio.compliance.kaldi.spectrogram" and "compute-spectrogram-feats" are different #332

@yjw123456

Description

@yjw123456

Dear Sir or Madam,

I compared the spectrogram generated by "torchaudio.compliance.kaldi.spectrogram" and "compute-spectrogram-feats" using default settings, however the outputs are different.

# The code for torchaudio is: 
wav, sample_rate = torchaudio.load('wav/1.wav')

spectrum=torchaudio.compliance.kaldi.spectrogram(wav, blackman_coeff=0.42, channel=-1, dither=1.0, energy_floor=0.0, frame_length=25.0, frame_shift=10.0, min_duration=0.0, preemphasis_coefficient=0.97, raw_energy=True, remove_dc_offset=True, round_to_power_of_two=True, sample_frequency=16000.0, snip_edges=True, subtract_mean=False, window_type='povey')
# Kaldi is:
compute-spectrogram-feats  --blackman_coeff=0.42 --channel=-1 --dither=1.0 --energy_floor=0.0 --frame_length=25.0 --frame_shift=10.0 --min_duration=0.0 --preemphasis_coefficient=0.97 --raw_energy=True --remove_dc_offset=True --round_to_power_of_two=True --sample_frequency=16000.0 --snip_edges=True --subtract_mean=False --window_type='povey'   scp:wav.scp ark,t,scp:1_stft.ark,1_stft.scp

Can you give me some clue of it?

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions