コード例 #1
0
ファイル: MFCC.cs プロジェクト: AdamStefan/Speech-Recognition
        public Mfcc(int numberOfFilterBanks = 46, int numberOfFftCoeff = 512, int lowerfrequency = 0,
            int samplingRate = 16000, int higherfrequency = 3400)
        {
            _numberOfFilterBanks = numberOfFilterBanks;

            _dct = new DiscreteCosinusTransform(_numberOfFilterBanks);
            _numberOfFftCoeff = numberOfFftCoeff;
            _lowerfrequency = lowerfrequency;
            _samplingRate = samplingRate;
            _higherfrequency = higherfrequency;
        }
コード例 #2
0
        public void TestFft()
        {
            var data = new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
            FourierTransform ft = new FourierTransform();
            ft.ComputeFft(data, 16);
            double energy;
            var result = ft.GetMagnitudeSquared(1, out energy);

            var dct = new DiscreteCosinusTransform(data.Length);
            var ret = dct.PerformDct(data);
        }