README 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. README
  2. for codec2/unittest
  3. Created David Rowe 31 July 2012
  4. Training (experimental) sparse phase VQs:
  5. 1/ In ../src/phase.c phase_experiment() enable:
  6. print_sparse_pred_error()
  7. and 'make' c2sim (in src)
  8. 2/ Run over a training database:
  9. $ ./c2sim /xhome1/codec2/samples/train.spc --phaseexp > train_phtrain.txt
  10. a) check stats in Octave:
  11. octave> load ../src/train_phtrain.txt
  12. octave> std(nonzeros(train_phtrain(:,1:20)))
  13. octave> hist(nonzeros(train_phtrain(:,1:20)),20)
  14. 3/ Extract and convert to floats vector you wish to train for example
  15. first 20 (out of MAX_AMP == 80):
  16. $ ./extract ../src/train_phtrain.txt train_phtrain.flt 1 20
  17. 4/ Convert to rectangular:
  18. $ ./polar2rect train_phtrain.flt train_phtrainr.flt
  19. 5/ Run this program:
  20. $ ./vqtrainph train_phtrainr.flt 20 1024 vq.txt
  21. Ouput is vq.txt
  22. Tests
  23. -----
  24. + build up insmallest possible stesp
  25. + impl errors v alg errors
  26. + use actual phase data as codebook
  27. + test vq with rand phases first or known data