Java实现Shazam声音识别算法(2)

DftOperate dfaOperate = new DftOperate();
        //For all the chunks:
        for(int times = 0;times < amountPossible; times++) {
            Complex[] complex = new Complex[chenkSize];
            for(int i = 0;i < chenkSize;i++) {
                //Put the time domain data into a complex number with imaginary part as 0:
                complex[i] = new Complex(audio[(times*chenkSize)+i], 0);
            }
            //Perform FFT analysis on the chunk:
            SmartAuto.results[times] = dfaOperate.fft(complex);
        }
        System.out.println("results = " + SmartAuto.results.toString());
    }

Linux公社的RSS地址https://www.linuxidc.com/rssFeed.aspx

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/ade37f77f6e804568c68c48ead6ba707.html