Hello Marat and Steve, The problem of comparing two versions of the codec is difficult. It is very easy for a bug to slip in, so we need a good way of comparing.
Listening tests are unreliable. We need an objective measure. The best test I have come up with is comparing the two waveforms using a utility like some Octave code. Plot the synthesised speech from the two versions on top of each other. Plot the difference. Measure the mean square error between them over a test utterance. Minor differences (say 1 part in 1000) are OK. You need a file I/O system running on the target hardware for this, like semi-hosting or an equivalent tool in your IDE. Sources of differences include float representation/precision, system calls with different initial states or implementations like random number generators, compiler differences. Small round off errors can accumulate over many frames in a state based/recursive system like codec 2. Fixed point code is actually easier to verify that float, as it can be bit exact across platforms. When I ported codec 2 to the STM32F4 a few years ago I recall the only difference was in unvoiced speech, perhaps due to the noise generation. I accepted this two noise sequences can sound the same even though not identical in the time domain. However I would love to see this fully tracked down. It would be nice to have a standard go/no-go test for codec 2 porting, like I have for the fdmdv and cohpsk modems. Cheers, David On 17/09/16 06:08, Marat Galyamov wrote: > Hello. > I try to use the Codec2 on the STM32F746 microcontroller. For a start, I > took files of the codec and collected the project for the PC in the > CodeBlocks IDE with the compiler GCC. > > Coding and decoding of the raw-file took place successfully, the > regenerated file has high quality. > > Then I collected the project in the IAR IDE (for STM32F746-Discovery > board) and added to it the same files of the codec which I used in the > project for the PC. > Coding and decoding took place successfully, quality of the regenerated > file seemed a little worse, and if to compare contents of regenerated > files, then in between there is a difference. Files of 48 kilobyte in > size have about 400 different bytes - checked the special utility which > compares files is byte-serial. > > Why between regenerated files (the PC and STM32) the difference is? How > it can be corrected? > > Thanks. Excuse for my English. > > > > > -- > Marat Galyamov > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Freetel-codec2 mailing list > Freetel-codec2@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/freetel-codec2 > ------------------------------------------------------------------------------ _______________________________________________ Freetel-codec2 mailing list Freetel-codec2@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freetel-codec2