You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(125) |
Nov
(7) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(9) |
Jun
(150) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
(15) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(183) |
2010 |
Jan
|
Feb
(1) |
Mar
(26) |
Apr
(23) |
May
(4) |
Jun
(8) |
Jul
(9) |
Aug
(19) |
Sep
(6) |
Oct
(27) |
Nov
(5) |
Dec
(135) |
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
(22) |
May
(8) |
Jun
(8) |
Jul
(2) |
Aug
(12) |
Sep
(3) |
Oct
(13) |
Nov
(31) |
Dec
(40) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
(27) |
Jul
(6) |
Aug
(19) |
Sep
(14) |
Oct
(8) |
Nov
(10) |
Dec
(82) |
2013 |
Jan
(12) |
Feb
(14) |
Mar
(11) |
Apr
(4) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(11) |
Sep
(16) |
Oct
(2) |
Nov
(23) |
Dec
(86) |
2014 |
Jan
(1) |
Feb
(18) |
Mar
(5) |
Apr
(13) |
May
(2) |
Jun
(8) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(65) |
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(2) |
Nov
(6) |
Dec
(41) |
2016 |
Jan
(2) |
Feb
(2) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(5) |
Aug
(8) |
Sep
(3) |
Oct
(26) |
Nov
(11) |
Dec
(45) |
2017 |
Jan
(12) |
Feb
(9) |
Mar
(4) |
Apr
(8) |
May
(20) |
Jun
(13) |
Jul
(18) |
Aug
(6) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:56
|
Update of /cvsroot/sp-tk/SPTK/src/bin/uels In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/uels Modified Files: _uels.c uels.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _uels.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/uels/_uels.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** _uels.c 11 Dec 2014 08:30:51 -0000 1.28 --- _uels.c 14 Dec 2015 01:14:23 -0000 1.29 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 75,81 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 75,81 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: uels.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/uels/uels.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** uels.c 11 Dec 2014 08:30:51 -0000 1.31 --- uels.c 14 Dec 2015 01:14:23 -0000 1.32 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 89,105 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 89,105 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:55
|
Update of /cvsroot/sp-tk/SPTK/src/bin/spec In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/spec Modified Files: spec.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: spec.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/spec/spec.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** spec.c 11 Dec 2014 08:30:50 -0000 1.31 --- spec.c 14 Dec 2015 01:14:22 -0000 1.32 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 86,95 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 86,95 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 97,103 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 97,103 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:54
|
Update of /cvsroot/sp-tk/SPTK/src/bin/rawtowav In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/rawtowav Modified Files: rawtowav.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: rawtowav.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/rawtowav/rawtowav.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** rawtowav.c 8 May 2015 05:15:48 -0000 1.14 --- rawtowav.c 14 Dec 2015 01:14:21 -0000 1.15 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:53
|
Update of /cvsroot/sp-tk/SPTK/src/bin/ndps2c In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/ndps2c Modified Files: _ndps2c.c ndps2c.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: ndps2c.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/ndps2c/ndps2c.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ndps2c.c 27 Feb 2014 09:45:45 -0000 1.1 --- ndps2c.c 14 Dec 2015 01:14:20 -0000 1.2 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 71,80 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 71,80 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 83,89 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 83,89 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: _ndps2c.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/ndps2c/_ndps2c.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _ndps2c.c 30 Jun 2014 07:27:34 -0000 1.2 --- _ndps2c.c 14 Dec 2015 01:14:20 -0000 1.3 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 62,68 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 62,68 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:52
|
Update of /cvsroot/sp-tk/SPTK/src/bin/mgcep In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/mgcep Modified Files: _mgcep.c mgcep.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _mgcep.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/mgcep/_mgcep.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** _mgcep.c 11 Dec 2014 08:30:41 -0000 1.30 --- _mgcep.c 14 Dec 2015 01:14:19 -0000 1.31 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 80,86 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 80,86 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: mgcep.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/mgcep/mgcep.c,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** mgcep.c 11 Dec 2014 08:30:41 -0000 1.41 --- mgcep.c 14 Dec 2015 01:14:19 -0000 1.42 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 104,119 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 104,119 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:51
|
Update of /cvsroot/sp-tk/SPTK/src/bin/mfcc In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/mfcc Modified Files: _mfcc.c mfcc.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: mfcc.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/mfcc/mfcc.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mfcc.c 11 Dec 2014 08:30:41 -0000 1.11 --- mfcc.c 14 Dec 2015 01:14:19 -0000 1.12 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 90,106 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 90,106 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: _mfcc.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/mfcc/_mfcc.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** _mfcc.c 11 Dec 2014 08:30:41 -0000 1.13 --- _mfcc.c 14 Dec 2015 01:14:18 -0000 1.14 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 73,79 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 73,79 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:50
|
Update of /cvsroot/sp-tk/SPTK/src/bin/lsp2sp In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/lsp2sp Modified Files: _lsp2sp.c lsp2sp.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _lsp2sp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/lsp2sp/_lsp2sp.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** _lsp2sp.c 11 Dec 2014 08:30:40 -0000 1.5 --- _lsp2sp.c 14 Dec 2015 01:14:17 -0000 1.6 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 62,68 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 62,68 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: lsp2sp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/lsp2sp/lsp2sp.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lsp2sp.c 11 Dec 2014 08:30:40 -0000 1.6 --- lsp2sp.c 14 Dec 2015 01:14:18 -0000 1.7 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 86,95 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 86,95 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 98,104 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 98,104 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:49
|
Update of /cvsroot/sp-tk/SPTK/src/bin/levdur In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/levdur Modified Files: _levdur.c levdur.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _levdur.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/levdur/_levdur.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** _levdur.c 11 Dec 2014 08:30:38 -0000 1.21 --- _levdur.c 14 Dec 2015 01:14:17 -0000 1.22 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 68,74 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 68,74 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: levdur.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/levdur/levdur.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** levdur.c 11 Dec 2014 08:30:39 -0000 1.25 --- levdur.c 14 Dec 2015 01:14:17 -0000 1.26 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 76,92 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 76,92 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:48
|
Update of /cvsroot/sp-tk/SPTK/src/bin/ifft In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/ifft Modified Files: _ifft.c ifft.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _ifft.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/ifft/_ifft.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** _ifft.c 11 Dec 2014 08:30:37 -0000 1.20 --- _ifft.c 14 Dec 2015 01:14:15 -0000 1.21 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 58,64 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 58,64 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: ifft.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/ifft/ifft.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** ifft.c 11 Dec 2014 08:30:37 -0000 1.28 --- ifft.c 14 Dec 2015 01:14:16 -0000 1.29 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 68,84 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 68,84 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:47
|
Update of /cvsroot/sp-tk/SPTK/src/bin/freqt In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/freqt Modified Files: _freqt.c freqt.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: freqt.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/freqt/freqt.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** freqt.c 11 Dec 2014 08:30:35 -0000 1.23 --- freqt.c 14 Dec 2015 01:14:15 -0000 1.24 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 76,92 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 76,92 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: _freqt.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/freqt/_freqt.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** _freqt.c 11 Dec 2014 08:30:35 -0000 1.17 --- _freqt.c 14 Dec 2015 01:14:15 -0000 1.18 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 63,69 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 63,69 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:46
|
Update of /cvsroot/sp-tk/SPTK/src/bin/fft2 In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/fft2 Modified Files: _fft2.c fft2.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _fft2.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/fft2/_fft2.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** _fft2.c 11 Dec 2014 08:30:34 -0000 1.17 --- _fft2.c 14 Dec 2015 01:14:13 -0000 1.18 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 67,73 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 67,73 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: fft2.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/fft2/fft2.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** fft2.c 11 Dec 2014 08:30:34 -0000 1.26 --- fft2.c 14 Dec 2015 01:14:14 -0000 1.27 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 76,85 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 76,85 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 87,93 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 87,93 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:45
|
Update of /cvsroot/sp-tk/SPTK/src/bin/delta In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/delta Modified Files: delta.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: delta.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/delta/delta.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** delta.c 11 Dec 2014 08:30:33 -0000 1.23 --- delta.c 14 Dec 2015 01:14:12 -0000 1.24 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 78,87 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 78,87 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 91,97 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 91,97 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:44
|
Update of /cvsroot/sp-tk/SPTK/src/bin/c2sp In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/c2sp Modified Files: _c2sp.c c2sp.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: c2sp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/c2sp/c2sp.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** c2sp.c 11 Dec 2014 08:30:32 -0000 1.25 --- c2sp.c 14 Dec 2015 01:14:12 -0000 1.26 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 83,92 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 83,92 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 94,100 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 94,100 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: _c2sp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/c2sp/_c2sp.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** _c2sp.c 11 Dec 2014 08:30:32 -0000 1.15 --- _c2sp.c 14 Dec 2015 01:14:12 -0000 1.16 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 61,67 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 61,67 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:43
|
Update of /cvsroot/sp-tk/SPTK/src/bin/b2mc In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/b2mc Modified Files: _b2mc.c b2mc.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _b2mc.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/b2mc/_b2mc.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** _b2mc.c 11 Dec 2014 08:30:31 -0000 1.15 --- _b2mc.c 14 Dec 2015 01:14:10 -0000 1.16 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 60,66 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 60,66 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: b2mc.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/b2mc/b2mc.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** b2mc.c 11 Dec 2014 08:30:31 -0000 1.24 --- b2mc.c 14 Dec 2015 01:14:10 -0000 1.25 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 73,89 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 73,89 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:42
|
Update of /cvsroot/sp-tk/SPTK/src/bin/acorr In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/acorr Modified Files: _acorr.c acorr.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: acorr.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/acorr/acorr.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** acorr.c 11 Dec 2014 08:30:28 -0000 1.28 --- acorr.c 14 Dec 2015 01:14:10 -0000 1.29 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 66,81 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 66,81 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: _acorr.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/acorr/_acorr.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** _acorr.c 11 Dec 2014 08:30:28 -0000 1.16 --- _acorr.c 14 Dec 2015 01:14:09 -0000 1.17 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 61,67 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 61,67 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:28
|
Update of /cvsroot/sp-tk/SPTK/src/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/lib Modified Files: agexp.c cholesky.c fileio.c fillz.c getfp.c getmem.c gexp.c glog.c invert.c matrix.c movem.c mseq.c theq.c toeplitz.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: fileio.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/fileio.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** fileio.c 11 Dec 2014 08:30:53 -0000 1.20 --- fileio.c 14 Dec 2015 01:14:25 -0000 1.21 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 60,68 **** #if defined(WIN32) ! # include <fcntl.h> ! # include <io.h> ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 60,68 ---- #if defined(WIN32) ! #include <fcntl.h> ! #include <io.h> ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: theq.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/theq.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** theq.c 30 Dec 2014 06:29:49 -0000 1.21 --- theq.c 14 Dec 2015 01:14:25 -0000 1.22 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: gexp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/gexp.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** gexp.c 11 Dec 2014 08:30:53 -0000 1.12 --- gexp.c 14 Dec 2015 01:14:25 -0000 1.13 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: toeplitz.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/toeplitz.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** toeplitz.c 11 Dec 2014 08:30:53 -0000 1.14 --- toeplitz.c 14 Dec 2015 01:14:25 -0000 1.15 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 65,71 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 65,71 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: fillz.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/fillz.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** fillz.c 11 Dec 2014 08:30:53 -0000 1.13 --- fillz.c 14 Dec 2015 01:14:25 -0000 1.14 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: agexp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/agexp.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** agexp.c 11 Dec 2014 08:30:52 -0000 1.12 --- agexp.c 14 Dec 2015 01:14:25 -0000 1.13 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: getfp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/getfp.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** getfp.c 11 Dec 2014 08:30:53 -0000 1.14 --- getfp.c 14 Dec 2015 01:14:25 -0000 1.15 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: movem.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/movem.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** movem.c 11 Dec 2014 08:30:53 -0000 1.13 --- movem.c 14 Dec 2015 01:14:25 -0000 1.14 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: glog.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/glog.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** glog.c 11 Dec 2014 08:30:53 -0000 1.13 --- glog.c 14 Dec 2015 01:14:25 -0000 1.14 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: getmem.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/getmem.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** getmem.c 11 Dec 2014 08:30:53 -0000 1.18 --- getmem.c 14 Dec 2015 01:14:25 -0000 1.19 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ Index: invert.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/invert.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** invert.c 11 Dec 2014 08:30:53 -0000 1.4 --- invert.c 14 Dec 2015 01:14:25 -0000 1.5 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 63,69 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 63,69 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: cholesky.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/cholesky.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** cholesky.c 11 Dec 2014 08:30:53 -0000 1.14 --- cholesky.c 14 Dec 2015 01:14:25 -0000 1.15 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 67,73 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 67,73 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: matrix.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/matrix.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** matrix.c 11 Dec 2014 08:30:53 -0000 1.16 --- matrix.c 14 Dec 2015 01:14:25 -0000 1.17 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 77,83 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 77,83 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: mseq.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/lib/mseq.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mseq.c 11 Dec 2014 08:30:53 -0000 1.12 --- mseq.c 14 Dec 2015 01:14:25 -0000 1.13 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:27
|
Update of /cvsroot/sp-tk/SPTK/src/bin/wavjoin In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/wavjoin Modified Files: _wavjoin.c wavjoin.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: _wavjoin.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/wavjoin/_wavjoin.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _wavjoin.c 11 Dec 2014 08:30:51 -0000 1.2 --- _wavjoin.c 14 Dec 2015 01:14:24 -0000 1.3 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 61,67 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 61,67 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif Index: wavjoin.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/wavjoin/wavjoin.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wavjoin.c 11 Dec 2014 08:30:52 -0000 1.2 --- wavjoin.c 14 Dec 2015 01:14:24 -0000 1.3 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 69,84 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 69,84 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Keiichiro O. <ur...@us...> - 2015-12-14 01:14:26
|
Update of /cvsroot/sp-tk/SPTK/src/bin/vopr In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv20991/src/bin/vopr Modified Files: vopr.c Log Message: update comments to 3.5 and format them by using indent -kr -nut -i 3 -l 30 Index: vopr.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/vopr/vopr.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** vopr.c 11 Dec 2014 08:30:51 -0000 1.28 --- vopr.c 14 Dec 2015 01:14:24 -0000 1.29 *************** *** 9,13 **** /* Science and Engineering */ /* */ ! /* 1996-2014 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ --- 9,13 ---- /* Science and Engineering */ /* */ ! /* 1996-2015 Nagoya Institute of Technology */ /* Department of Computer Science */ /* */ *************** *** 85,94 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 85,94 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 98,104 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 98,104 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif |
From: Takenori Y. <tak...@us...> - 2015-11-25 11:35:28
|
Update of /cvsroot/sp-tk/SPTK4/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11176 Modified Files: fast_fourier_transform.cc fft.cc freqt.cc frequency_transform.cc frequency_transform.h sptk_utils.cc sptk_utils.h Log Message: modify input and output Index: frequency_transform.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/frequency_transform.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** frequency_transform.cc 17 Nov 2015 10:15:38 -0000 1.3 --- frequency_transform.cc 25 Nov 2015 11:35:26 -0000 1.4 *************** *** 71,75 **** double* d(&buffer->d_[0]); double* g(&buffer->g_[0]); ! const double* input(&minimum_phase_sequence[0]); double* output(&((*warped_sequence)[0])); const int num_input_order(minimum_phase_sequence.size() - 1); --- 71,75 ---- double* d(&buffer->d_[0]); double* g(&buffer->g_[0]); ! const double* input(&(minimum_phase_sequence[0])); double* output(&((*warped_sequence)[0])); const int num_input_order(minimum_phase_sequence.size() - 1); *************** *** 79,83 **** // fill zero ! std::memset(g, 0, sizeof(*g) * (num_output_length)); // transform --- 79,83 ---- // fill zero ! std::memset(g, 0, sizeof(*g) * num_output_length); // transform Index: freqt.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/freqt.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** freqt.cc 17 Nov 2015 10:15:37 -0000 1.1 --- freqt.cc 25 Nov 2015 11:35:26 -0000 1.2 *************** *** 72,80 **** std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; ! std::cout << " minimum phase sequence " << sptk::kIOFormatString << " [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; ! std::cout << " warped sequence " << sptk::kIOFormatString << std::endl; std::cout << std::endl; ! std::cout << " SPTK: version " << sptk::kSPTKVersion << std::endl; std::cout << std::endl; } --- 72,80 ---- std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; ! std::cout << " minimum phase sequence (double) [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; ! std::cout << " warped sequence (double)" << std::endl; std::cout << std::endl; ! std::cout << " SPTK: version " << sptk::kVersion << std::endl; std::cout << std::endl; } *************** *** 171,187 **** sptk::FrequencyTransform frequency_transform; sptk::FrequencyTransform::Buffer buffer; ! frequency_transform.SetNumOutputOrder(output_order); frequency_transform.SetAlpha(alpha); const int input_length(input_order + 1); const int output_length(output_order + 1); - std::vector<double> minimum_phase_sequence(input_length); std::vector<double> warped_sequence(output_length); - std::vector<float> float_sequence; while (true) { ! if (!sptk::ReadStream(input_length, &input_stream, ! &minimum_phase_sequence, &float_sequence)) break; --- 171,191 ---- sptk::FrequencyTransform frequency_transform; sptk::FrequencyTransform::Buffer buffer; ! if (!frequency_transform.SetNumOutputOrder(output_order)) { ! std::ostringstream error_message; ! error_message ! << "The order of warped sequence must be positive integer or 0"; ! sptk::PrintErrorMessage("freqt", error_message); ! return 1; ! } frequency_transform.SetAlpha(alpha); const int input_length(input_order + 1); const int output_length(output_order + 1); std::vector<double> minimum_phase_sequence(input_length); std::vector<double> warped_sequence(output_length); while (true) { ! if (!sptk::ReadStream(false, input_length, ! &minimum_phase_sequence, &input_stream)) break; *************** *** 194,200 **** } ! if (!sptk::WriteStream(output_length, &std::cout, ! &warped_sequence, &float_sequence)) ! break; } --- 198,207 ---- } ! if (!sptk::WriteStream(output_length, warped_sequence, &std::cout)) { ! std::ostringstream error_message; ! error_message << "Failed to write output sequence"; ! sptk::PrintErrorMessage("freqt", error_message); ! return 1; ! } } Index: sptk_utils.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/sptk_utils.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sptk_utils.cc 17 Nov 2015 10:15:38 -0000 1.2 --- sptk_utils.cc 25 Nov 2015 11:35:26 -0000 1.3 *************** *** 51,112 **** namespace sptk { ! const bool kDoubleFormat(false); ! const char* kSPTKVersion("4.0"); ! const char* kIOFormatString(kDoubleFormat ? "(double)" : "(float) "); ! ! bool ReadStream(const int& size, std::istream* input_stream, ! std::vector<double>* double_sequence, ! std::vector<float>* float_sequence) { if (1 > size || ! NULL == input_stream || ! NULL == double_sequence || ! NULL == float_sequence) return false; ! if (static_cast<std::size_t>(size) > double_sequence->size()) ! double_sequence->resize(size); ! if (!kDoubleFormat && ! static_cast<std::size_t>(size) > float_sequence->size()) ! float_sequence->resize(size); ! if (kDoubleFormat) { ! input_stream->read(reinterpret_cast<char*>(&((*double_sequence)[0])), ! sizeof((*double_sequence)[0]) * size); ! } else { ! input_stream->read(reinterpret_cast<char*>(&((*float_sequence)[0])), ! sizeof((*float_sequence)[0]) * size); ! std::copy(float_sequence->begin(), float_sequence->begin() + size, ! double_sequence->begin()); } ! return !input_stream->eof(); } ! bool WriteStream(const int& size, std::ostream* output_stream, ! std::vector<double>* double_sequence, ! std::vector<float>* float_sequence) { if (1 > size || ! NULL == output_stream || ! NULL == double_sequence || ! NULL == float_sequence) return false; ! if (static_cast<std::size_t>(size) > double_sequence->size()) ! double_sequence->resize(size); ! if (!kDoubleFormat && ! static_cast<std::size_t>(size) > float_sequence->size()) ! float_sequence->resize(size); ! if (kDoubleFormat) { ! output_stream->write(reinterpret_cast<char*>(&((*double_sequence)[0])), ! sizeof((*double_sequence)[0]) * size); ! } else { ! std::copy(double_sequence->begin(), double_sequence->begin() + size, ! float_sequence->begin()); ! output_stream->write(reinterpret_cast<char*>(&((*float_sequence)[0])), ! sizeof((*float_sequence)[0]) * size); ! } ! return true; } --- 51,99 ---- namespace sptk { ! bool ReadStream(const bool& zero_padding, const int& size, ! std::vector<double>* sequence_to_read, ! std::istream* input_stream) { if (1 > size || ! NULL == sequence_to_read || ! NULL == input_stream) return false; ! if (input_stream->eof()) ! return false; ! if (static_cast<std::size_t>(size) > sequence_to_read->size()) ! sequence_to_read->resize(size); ! ! const int num_bytes(sizeof((*sequence_to_read)[0]) * size); ! input_stream->read(reinterpret_cast<char*>(&((*sequence_to_read)[0])), ! num_bytes); ! ! const int gcount(input_stream->gcount()); ! if (num_bytes == gcount) { ! return !input_stream->fail(); ! } else if (zero_padding && 0 < gcount) { ! std::fill(sequence_to_read->end() - ! (num_bytes - gcount) / sizeof((*sequence_to_read)[0]), ! sequence_to_read->end(), 0.0); ! return !input_stream->bad(); } ! return false; } ! bool WriteStream(const int& size, ! const std::vector<double>& sequence_to_write, ! std::ostream* output_stream) { if (1 > size || ! NULL == output_stream) return false; ! if (static_cast<std::size_t>(size) > sequence_to_write.size()) ! return false; ! output_stream->write(reinterpret_cast<const char*>(&(sequence_to_write[0])), ! sizeof(sequence_to_write[0]) * size); ! return !output_stream->fail(); } Index: fft.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/fft.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fft.cc 17 Nov 2015 10:15:37 -0000 1.2 --- fft.cc 25 Nov 2015 11:35:26 -0000 1.3 *************** *** 84,92 **** std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; ! std::cout << " data sequence " << sptk::kIOFormatString << " [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; ! std::cout << " FFT sequence " << sptk::kIOFormatString << std::endl; std::cout << std::endl; ! std::cout << " SPTK: version " << sptk::kSPTKVersion << std::endl; std::cout << std::endl; } --- 84,92 ---- std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; ! std::cout << " data sequence (double) [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; ! std::cout << " FFT sequence (double)" << std::endl; std::cout << std::endl; ! std::cout << " SPTK: version " << sptk::kVersion << std::endl; std::cout << std::endl; } *************** *** 201,217 **** const int length(order + 1); - std::vector<double> input_x(length); std::vector<double> input_y(length); std::vector<double> output_x(fft_size); std::vector<double> output_y(fft_size); - std::vector<float> float_x; - std::vector<float> float_y; while (!input_stream.eof()) { // get input ! if (!sptk::ReadStream(length, &input_stream, &input_x, &float_x)) break; ! if (!sptk::ReadStream(length, &input_stream, &input_y, &float_y)) break; --- 201,214 ---- const int length(order + 1); std::vector<double> input_x(length); std::vector<double> input_y(length); std::vector<double> output_x(fft_size); std::vector<double> output_y(fft_size); while (!input_stream.eof()) { // get input ! if (!sptk::ReadStream(true, length, &input_x, &input_stream)) break; ! if (!sptk::ReadStream(true, length, &input_y, &input_stream)) break; *************** *** 229,243 **** } else if (kOutputPower == output_format) { for (int i(0); i < fft_size; ++i) ! output_x[i] = output_x[i] * output_x[i] + output_y[i] * output_y[i]; } if (kOutputImaginaryPart != output_format && ! !sptk::WriteStream(fft_size, &std::cout, &output_x, &float_x)) ! break; if ((kOutputRealAndImaginaryParts == output_format || kOutputImaginaryPart == output_format) && ! !sptk::WriteStream(fft_size, &std::cout, &output_y, &float_y)) ! break; } --- 226,249 ---- } else if (kOutputPower == output_format) { for (int i(0); i < fft_size; ++i) ! output_x[i] = output_x[i] * output_x[i] + ! output_y[i] * output_y[i]; } if (kOutputImaginaryPart != output_format && ! !sptk::WriteStream(fft_size, output_x, &std::cout)) { ! std::ostringstream error_message; ! error_message << "Failed to write output sequence"; ! sptk::PrintErrorMessage("fft", error_message); ! return 1; ! } if ((kOutputRealAndImaginaryParts == output_format || kOutputImaginaryPart == output_format) && ! !sptk::WriteStream(fft_size, output_y, &std::cout)) { ! std::ostringstream error_message; ! error_message << "Failed to write output sequence"; ! sptk::PrintErrorMessage("fft", error_message); ! return 1; ! } } Index: frequency_transform.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/frequency_transform.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** frequency_transform.h 17 Nov 2015 10:15:38 -0000 1.3 --- frequency_transform.h 25 Nov 2015 11:35:26 -0000 1.4 *************** *** 46,50 **** #define SPTK_SRC_FREQUENCY_TRANSFORM_H_ - #include <stdexcept> #include <vector> --- 46,49 ---- *************** *** 73,83 **** virtual ~FrequencyTransform() {} ! // num_output_order must be bigger than zero ! void SetNumOutputOrder(int num_output_order) { if (num_output_order < 0) { ! // todo: following line should be modified by using LOG(FATAL) or etc. ! throw std::out_of_range("input is negative."); } num_output_order_ = num_output_order; } --- 72,82 ---- virtual ~FrequencyTransform() {} ! // num_output_order must be not negative ! bool SetNumOutputOrder(int num_output_order) { if (num_output_order < 0) { ! return false; } num_output_order_ = num_output_order; + return true; } Index: fast_fourier_transform.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/fast_fourier_transform.cc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fast_fourier_transform.cc 17 Nov 2015 10:15:37 -0000 1.3 --- fast_fourier_transform.cc 25 Nov 2015 11:35:26 -0000 1.4 *************** *** 121,126 **** double* cosp(const_cast<double*>(&(sine_table_[0])) + num_dimension_ / 4); for (int i(0); i < lmx; ++i) { ! double* xpi(&x[i]); ! double* ypi(&y[i]); for (int li(lix); li <= num_dimension_; li += lix) { const double t1(*(xpi) - *(xpi + lmx)); --- 121,126 ---- double* cosp(const_cast<double*>(&(sine_table_[0])) + num_dimension_ / 4); for (int i(0); i < lmx; ++i) { ! double* xpi(&(x[i])); ! double* ypi(&(y[i])); for (int li(lix); li <= num_dimension_; li += lix) { const double t1(*(xpi) - *(xpi + lmx)); *************** *** 161,166 **** int lmxj(lmx - j); if (lmxj < 0) { ! const double t1 = *(xp); ! const double t2 = *(yp); *(xp) = *(xp + lmxj); *(yp) = *(yp + lmxj); --- 161,166 ---- int lmxj(lmx - j); if (lmxj < 0) { ! const double t1(*(xp)); ! const double t2(*(yp)); *(xp) = *(xp + lmxj); *(yp) = *(yp + lmxj); Index: sptk_utils.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/sptk_utils.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sptk_utils.h 17 Nov 2015 10:15:38 -0000 1.2 --- sptk_utils.h 25 Nov 2015 11:35:26 -0000 1.3 *************** *** 53,66 **** namespace sptk { ! extern const bool kDoubleFormat; ! extern const char* kSPTKVersion; ! extern const char* kIOFormatString; ! bool ReadStream(const int& size, std::istream* input_stream, ! std::vector<double>* double_sequence, ! std::vector<float>* float_sequence); ! bool WriteStream(const int& size, std::ostream* output_stream, ! std::vector<double>* double_sequence, ! std::vector<float>* float_sequence); bool ConvertStringToInteger(const std::string& input, int* output); bool ConvertStringToDouble(const std::string& input, double* output); --- 53,64 ---- namespace sptk { ! static const char* const kVersion("4.0"); ! bool ReadStream(const bool& zero_padding, const int& size, ! std::vector<double>* sequence_to_read, ! std::istream* input_stream); ! bool WriteStream(const int& size, ! const std::vector<double>& sequence_to_write, ! std::ostream* output_stream); bool ConvertStringToInteger(const std::string& input, int* output); bool ConvertStringToDouble(const std::string& input, double* output); |
From: Takenori Y. <tak...@us...> - 2015-11-17 10:15:40
|
Update of /cvsroot/sp-tk/SPTK4/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11405 Modified Files: Makefile fast_fourier_transform.cc fast_fourier_transform.h fft.cc frequency_transform.cc frequency_transform.h sptk_utils.cc sptk_utils.h Added Files: freqt.cc Log Message: add freqt and modify copyright Index: fast_fourier_transform.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/fast_fourier_transform.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fast_fourier_transform.h 16 Sep 2015 11:43:34 -0000 1.2 --- fast_fourier_transform.h 17 Nov 2015 10:15:37 -0000 1.3 *************** *** 1,3 **** ! // Copyright 2015 Nagoya Institute of Technology #ifndef SPTK_SRC_FAST_FOURIER_TRANSFORM_H_ --- 1,45 ---- ! // ----------------------------------------------------------------- // ! // The Speech Signal Processing Toolkit (SPTK) // ! // developed by SPTK Working Group // ! // http://sp-tk.sourceforge.net/ // ! // ----------------------------------------------------------------- // ! // // ! // Copyright (c) 1984-2007 Tokyo Institute of Technology // ! // Interdisciplinary Graduate School of // ! // Science and Engineering // ! // // ! // 1996-2015 Nagoya Institute of Technology // ! // Department of Computer Science // ! // // ! // All rights reserved. // ! // // ! // Redistribution and use in source and binary forms, with or // ! // without modification, are permitted provided that the following // ! // conditions are met: // ! // // ! // - Redistributions of source code must retain the above copyright // ! // notice, this list of conditions and the following disclaimer. // ! // - Redistributions in binary form must reproduce the above // ! // copyright notice, this list of conditions and the following // ! // disclaimer in the documentation and/or other materials provided // ! // with the distribution. // ! // - Neither the name of the SPTK working group nor the names of its // ! // contributors may be used to endorse or promote products derived // ! // from this software without specific prior written permission. // ! // // ! // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // ! // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // ! // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // ! // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // ! // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // ! // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // ! // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // ! // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // ! // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ! // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // ! // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // ! // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ! // POSSIBILITY OF SUCH DAMAGE. // ! // ----------------------------------------------------------------- // #ifndef SPTK_SRC_FAST_FOURIER_TRANSFORM_H_ Index: frequency_transform.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/frequency_transform.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** frequency_transform.cc 29 Oct 2015 12:08:23 -0000 1.2 --- frequency_transform.cc 17 Nov 2015 10:15:38 -0000 1.3 *************** *** 1,3 **** ! // Copyright 2015 Nagoya Institute of Technology #include "frequency_transform.h" --- 1,45 ---- ! // ----------------------------------------------------------------- // ! // The Speech Signal Processing Toolkit (SPTK) // ! // developed by SPTK Working Group // ! // http://sp-tk.sourceforge.net/ // ! // ----------------------------------------------------------------- // ! // // ! // Copyright (c) 1984-2007 Tokyo Institute of Technology // ! // Interdisciplinary Graduate School of // ! // Science and Engineering // ! // // ! // 1996-2015 Nagoya Institute of Technology // ! // Department of Computer Science // ! // // ! // All rights reserved. // ! // // ! // Redistribution and use in source and binary forms, with or // ! // without modification, are permitted provided that the following // ! // conditions are met: // ! // // ! // - Redistributions of source code must retain the above copyright // ! // notice, this list of conditions and the following disclaimer. // ! // - Redistributions in binary form must reproduce the above // ! // copyright notice, this list of conditions and the following // ! // disclaimer in the documentation and/or other materials provided // ! // with the distribution. // ! // - Neither the name of the SPTK working group nor the names of its // ! // contributors may be used to endorse or promote products derived // ! // from this software without specific prior written permission. // ! // // ! // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // ! // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // ! // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // ! // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // ! // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // ! // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // ! // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // ! // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // ! // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ! // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // ! // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // ! // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ! // POSSIBILITY OF SUCH DAMAGE. // ! // ----------------------------------------------------------------- // #include "frequency_transform.h" *************** *** 18,27 **** // prepare memories ! if (static_cast<size_t>(num_output_order_ + 1) != buffer->d_.size()) ! buffer->d_.resize(num_output_order_ + 1); ! if (static_cast<size_t>(num_output_order_ + 1) != buffer->g_.size()) ! buffer->g_.resize(num_output_order_ + 1); ! if (static_cast<size_t>(num_output_order_ + 1) != warped_sequence->size()) ! warped_sequence->resize(num_output_order_ + 1); // get values --- 60,70 ---- // prepare memories ! const int num_output_length(num_output_order_ + 1); ! if (static_cast<std::size_t>(num_output_length) != buffer->d_.size()) ! buffer->d_.resize(num_output_length); ! if (static_cast<std::size_t>(num_output_length) != buffer->g_.size()) ! buffer->g_.resize(num_output_length); ! if (static_cast<std::size_t>(num_output_length) != warped_sequence->size()) ! warped_sequence->resize(num_output_length); // get values *************** *** 36,40 **** // fill zero ! std::memset(g, 0, sizeof(*g) * (num_output_order_ + 1)); // transform --- 79,83 ---- // fill zero ! std::memset(g, 0, sizeof(*g) * (num_output_length)); // transform --- NEW FILE: freqt.cc --- // ----------------------------------------------------------------- // // The Speech Signal Processing Toolkit (SPTK) // // developed by SPTK Working Group // // http://sp-tk.sourceforge.net/ // // ----------------------------------------------------------------- // // // // Copyright (c) 1984-2007 Tokyo Institute of Technology // // Interdisciplinary Graduate School of // // Science and Engineering // // // // 1996-2015 Nagoya Institute of Technology // // Department of Computer Science // // // // All rights reserved. // // // // Redistribution and use in source and binary forms, with or // // without modification, are permitted provided that the following // // conditions are met: // // // // - Redistributions of source code must retain the above copyright // // notice, this list of conditions and the following disclaimer. // // - Redistributions in binary form must reproduce the above // // copyright notice, this list of conditions and the following // // disclaimer in the documentation and/or other materials provided // // with the distribution. // // - Neither the name of the SPTK working group nor the names of its // // contributors may be used to endorse or promote products derived // // from this software without specific prior written permission. // // // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // // POSSIBILITY OF SUCH DAMAGE. // // ----------------------------------------------------------------- // #include <unistd.h> #include <fstream> #include <iostream> #include <sstream> #include <vector> #include "frequency_transform.h" #include "sptk_utils.h" namespace { const int kDefaultInputOrder(25); const int kDefaultOutputOrder(25); const double kDefaultInputAlpha(0.0); const double kDefaultOutputAlpha(0.35); void PrintUsage() { std::cout << std::endl; std::cout << " freqt - frequency transform" << std::endl; std::cout << std::endl; std::cout << " usage:" << std::endl; std::cout << " freqt [ options ] [ infile ] > stdout" << std::endl; std::cout << " options:" << std::endl; std::cout << " -m m : order of minimum phase sequence [" << kDefaultInputOrder << "]" << std::endl; // NOLINT std::cout << " -M M : order of warped sequence [" << kDefaultOutputOrder << "]" << std::endl; // NOLINT std::cout << " -a a : all-pass constant of input sequence [" << kDefaultInputAlpha << "]" << std::endl; // NOLINT std::cout << " -A A : all-pass constant of output sequence [" << kDefaultOutputAlpha << "]" << std::endl; // NOLINT std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; std::cout << " minimum phase sequence " << sptk::kIOFormatString << " [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; std::cout << " warped sequence " << sptk::kIOFormatString << std::endl; std::cout << std::endl; std::cout << " SPTK: version " << sptk::kSPTKVersion << std::endl; std::cout << std::endl; } } // namespace int main(int argc, char* argv[]) { int input_order(kDefaultInputOrder); int output_order(kDefaultOutputOrder); double input_alpha(kDefaultInputAlpha); double output_alpha(kDefaultOutputAlpha); while (true) { const char option_char(getopt(argc, argv, "m:M:a:A:h")); if (-1 == option_char) break; switch (option_char) { case 'm': { if (!sptk::ConvertStringToInteger(optarg, &input_order) || 0 > input_order) { std::ostringstream error_message; error_message << "The argument for the -m option must be positive integer or 0"; sptk::PrintErrorMessage("freqt", error_message); return 1; } break; } case 'M': { if (!sptk::ConvertStringToInteger(optarg, &output_order) || 0 > output_order) { std::ostringstream error_message; error_message << "The argument for the -M option must be positive integer or 0"; sptk::PrintErrorMessage("freqt", error_message); return 1; } break; } case 'a': { if (!sptk::ConvertStringToDouble(optarg, &input_alpha)) { std::ostringstream error_message; error_message << "The argument for the -a option must be numeric"; sptk::PrintErrorMessage("freqt", error_message); return 1; } break; } case 'A': { if (!sptk::ConvertStringToDouble(optarg, &output_alpha)) { std::ostringstream error_message; error_message << "The argument for the -A option must be numeric"; sptk::PrintErrorMessage("freqt", error_message); return 1; } break; } case 'h': { PrintUsage(); return 0; } default: { PrintUsage(); return 1; } } } // check alpha const double prod_alphas(input_alpha * output_alpha); if (1.0 == prod_alphas) { std::ostringstream error_message; error_message << "The product of all-pass constants must not be 1"; sptk::PrintErrorMessage("freqt", error_message); return 1; } const double alpha((output_alpha - input_alpha) / (1.0 - prod_alphas)); // get input file const char* input_file((optind < argc) ? argv[argc - 1] : NULL); // open stream std::ifstream ifs; ifs.open(input_file, std::ios::in | std::ios::binary); if (ifs.fail() && NULL != input_file) { std::ostringstream error_message; error_message << "Cannot open file " << input_file; sptk::PrintErrorMessage("freqt", error_message); return 1; } std::istream& input_stream(ifs.fail() ? std::cin : ifs); // prepare for frequency transform sptk::FrequencyTransform frequency_transform; sptk::FrequencyTransform::Buffer buffer; frequency_transform.SetNumOutputOrder(output_order); frequency_transform.SetAlpha(alpha); const int input_length(input_order + 1); const int output_length(output_order + 1); std::vector<double> minimum_phase_sequence(input_length); std::vector<double> warped_sequence(output_length); std::vector<float> float_sequence; while (true) { if (!sptk::ReadStream(input_length, &input_stream, &minimum_phase_sequence, &float_sequence)) break; if (!frequency_transform.Run(minimum_phase_sequence, &warped_sequence, &buffer)) { std::ostringstream error_message; error_message << "Failed to run the frequency transform"; sptk::PrintErrorMessage("freqt", error_message); return 1; } if (!sptk::WriteStream(output_length, &std::cout, &warped_sequence, &float_sequence)) break; } return 0; } Index: sptk_utils.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/sptk_utils.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sptk_utils.cc 29 Oct 2015 12:08:23 -0000 1.1 --- sptk_utils.cc 17 Nov 2015 10:15:38 -0000 1.2 *************** *** 1,14 **** ! // Copyright 2015 Nagoya Institute of Technology #include "sptk_utils.h" #include <cerrno> #include <cstdlib> - #include <iostream> - #include <sstream> - #include <string> namespace sptk { bool ConvertStringToInteger(const std::string& input, int* output) { if (NULL == output) --- 1,114 ---- ! // ----------------------------------------------------------------- // ! // The Speech Signal Processing Toolkit (SPTK) // ! // developed by SPTK Working Group // ! // http://sp-tk.sourceforge.net/ // ! // ----------------------------------------------------------------- // ! // // ! // Copyright (c) 1984-2007 Tokyo Institute of Technology // ! // Interdisciplinary Graduate School of // ! // Science and Engineering // ! // // ! // 1996-2015 Nagoya Institute of Technology // ! // Department of Computer Science // ! // // ! // All rights reserved. // ! // // ! // Redistribution and use in source and binary forms, with or // ! // without modification, are permitted provided that the following // ! // conditions are met: // ! // // ! // - Redistributions of source code must retain the above copyright // ! // notice, this list of conditions and the following disclaimer. // ! // - Redistributions in binary form must reproduce the above // ! // copyright notice, this list of conditions and the following // ! // disclaimer in the documentation and/or other materials provided // ! // with the distribution. // ! // - Neither the name of the SPTK working group nor the names of its // ! // contributors may be used to endorse or promote products derived // ! // from this software without specific prior written permission. // ! // // ! // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // ! // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // ! // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // ! // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // ! // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // ! // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // ! // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // ! // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // ! // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ! // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // ! // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // ! // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ! // POSSIBILITY OF SUCH DAMAGE. // ! // ----------------------------------------------------------------- // #include "sptk_utils.h" + #include <algorithm> #include <cerrno> #include <cstdlib> namespace sptk { + const bool kDoubleFormat(false); + const char* kSPTKVersion("4.0"); + const char* kIOFormatString(kDoubleFormat ? "(double)" : "(float) "); + + bool ReadStream(const int& size, std::istream* input_stream, + std::vector<double>* double_sequence, + std::vector<float>* float_sequence) { + if (1 > size || + NULL == input_stream || + NULL == double_sequence || + NULL == float_sequence) + return false; + + if (static_cast<std::size_t>(size) > double_sequence->size()) + double_sequence->resize(size); + if (!kDoubleFormat && + static_cast<std::size_t>(size) > float_sequence->size()) + float_sequence->resize(size); + + if (kDoubleFormat) { + input_stream->read(reinterpret_cast<char*>(&((*double_sequence)[0])), + sizeof((*double_sequence)[0]) * size); + } else { + input_stream->read(reinterpret_cast<char*>(&((*float_sequence)[0])), + sizeof((*float_sequence)[0]) * size); + std::copy(float_sequence->begin(), float_sequence->begin() + size, + double_sequence->begin()); + } + + return !input_stream->eof(); + } + + bool WriteStream(const int& size, std::ostream* output_stream, + std::vector<double>* double_sequence, + std::vector<float>* float_sequence) { + if (1 > size || + NULL == output_stream || + NULL == double_sequence || + NULL == float_sequence) + return false; + + if (static_cast<std::size_t>(size) > double_sequence->size()) + double_sequence->resize(size); + if (!kDoubleFormat && + static_cast<std::size_t>(size) > float_sequence->size()) + float_sequence->resize(size); + + if (kDoubleFormat) { + output_stream->write(reinterpret_cast<char*>(&((*double_sequence)[0])), + sizeof((*double_sequence)[0]) * size); + } else { + std::copy(double_sequence->begin(), double_sequence->begin() + size, + float_sequence->begin()); + output_stream->write(reinterpret_cast<char*>(&((*float_sequence)[0])), + sizeof((*float_sequence)[0]) * size); + } + + return true; + } + bool ConvertStringToInteger(const std::string& input, int* output) { if (NULL == output) *************** *** 16,25 **** char* end; ! int integer(static_cast<int>(std::strtol(input.c_str(), &end, 10))); ! if (0 == input.compare(end) || '\0' != *end || ERANGE == errno) { return false; ! } ! *output = integer; return true; } --- 116,139 ---- char* end; ! int converted_value(static_cast<int>(std::strtol(input.c_str(), &end, 10))); ! if (0 == input.compare(end) || '\0' != *end || ERANGE == errno) return false; ! ! *output = converted_value; ! return true; ! } ! ! bool ConvertStringToDouble(const std::string& input, double* output) { ! if (NULL == output) ! return false; ! ! char* end; ! double converted_value(std::strtod(input.c_str(), &end)); ! ! if (0 == input.compare(end) || '\0' != *end || ERANGE == errno) ! return false; ! ! *output = converted_value; return true; } Index: fft.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/fft.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fft.cc 29 Oct 2015 12:08:23 -0000 1.1 --- fft.cc 17 Nov 2015 10:15:37 -0000 1.2 *************** *** 1,3 **** ! // Copyright 2015 Nagoya Institute of Technology #include <unistd.h> --- 1,45 ---- ! // ----------------------------------------------------------------- // ! // The Speech Signal Processing Toolkit (SPTK) // ! // developed by SPTK Working Group // ! // http://sp-tk.sourceforge.net/ // ! // ----------------------------------------------------------------- // ! // // ! // Copyright (c) 1984-2007 Tokyo Institute of Technology // ! // Interdisciplinary Graduate School of // ! // Science and Engineering // ! // // ! // 1996-2015 Nagoya Institute of Technology // ! // Department of Computer Science // ! // // ! // All rights reserved. // ! // // ! // Redistribution and use in source and binary forms, with or // ! // without modification, are permitted provided that the following // ! // conditions are met: // ! // // ! // - Redistributions of source code must retain the above copyright // ! // notice, this list of conditions and the following disclaimer. // ! // - Redistributions in binary form must reproduce the above // ! // copyright notice, this list of conditions and the following // ! // disclaimer in the documentation and/or other materials provided // ! // with the distribution. // ! // - Neither the name of the SPTK working group nor the names of its // ! // contributors may be used to endorse or promote products derived // ! // from this software without specific prior written permission. // ! // // ! // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // ! // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // ! // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // ! // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // ! // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // ! // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // ! // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // ! // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // ! // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ! // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // ! // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // ! // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ! // POSSIBILITY OF SUCH DAMAGE. // ! // ----------------------------------------------------------------- // #include <unistd.h> *************** *** 7,10 **** --- 49,53 ---- #include <iostream> #include <sstream> + #include <vector> #include "fast_fourier_transform.h" *************** *** 22,26 **** }; ! const int kFFTSize(256); void PrintUsage() { --- 65,69 ---- }; ! const int kDefaultFFTSize(256); void PrintUsage() { *************** *** 31,37 **** std::cout << " fft [ options ] [ infile ] > stdout" << std::endl; std::cout << " options:" << std::endl; ! std::cout << " -l l : FFT size [" << kFFTSize << "]" << std::endl; // NOLINT std::cout << " -m m : order of sequence [l-1]" << std::endl; // NOLINT ! std::cout << " -o : output format [0]" << std::endl; // NOLINT std::cout << " 0 (real and imaginary parts)" << std::endl; std::cout << " 1 (real part)" << std::endl; --- 74,80 ---- std::cout << " fft [ options ] [ infile ] > stdout" << std::endl; std::cout << " options:" << std::endl; ! std::cout << " -l l : FFT size [" << kDefaultFFTSize << "]" << std::endl; // NOLINT std::cout << " -m m : order of sequence [l-1]" << std::endl; // NOLINT ! std::cout << " -o : output format [0]" << std::endl; // NOLINT std::cout << " 0 (real and imaginary parts)" << std::endl; std::cout << " 1 (real part)" << std::endl; *************** *** 41,52 **** std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; ! std::cout << " data sequence (double) [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; ! std::cout << " FFT sequence (double)" << std::endl; ! #ifdef PACKAGE_VERSION std::cout << std::endl; ! std::cout << " SPTK: version " << PACKAGE_VERSION << std::endl; ! std::cout << " CVS Info: " << std::endl; ! #endif std::cout << std::endl; } --- 84,92 ---- std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; ! std::cout << " data sequence " << sptk::kIOFormatString << " [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; ! std::cout << " FFT sequence " << sptk::kIOFormatString << std::endl; std::cout << std::endl; ! std::cout << " SPTK: version " << sptk::kSPTKVersion << std::endl; std::cout << std::endl; } *************** *** 55,59 **** int main(int argc, char* argv[]) { ! int fft_size(kFFTSize); int order(0); bool order_is_specified(false); --- 95,99 ---- int main(int argc, char* argv[]) { ! int fft_size(kDefaultFFTSize); int order(0); bool order_is_specified(false); *************** *** 61,65 **** while (true) { ! char option_char(getopt(argc, argv, "l:m:o:h")); if (-1 == option_char) break; --- 101,105 ---- while (true) { ! const char option_char(getopt(argc, argv, "l:m:o:h")); if (-1 == option_char) break; *************** *** 81,85 **** return 1; } - ++order; order_is_specified = true; break; --- 121,124 ---- *************** *** 103,106 **** --- 142,146 ---- return 1; } + output_format = static_cast<OutputFormats>(output_format_integer); break; *************** *** 121,125 **** if (!fft.SetNumDimension(fft_size)) { std::ostringstream error_message; ! error_message << "The FFT size must be an power of 2 and greater than 4"; sptk::PrintErrorMessage("fft", error_message); return 1; --- 161,165 ---- if (!fft.SetNumDimension(fft_size)) { std::ostringstream error_message; ! error_message << "The FFT size must be an power of 2 and greater than 2"; sptk::PrintErrorMessage("fft", error_message); return 1; *************** *** 128,146 **** // check order if (order_is_specified) { ! if (fft_size < order) { std::ostringstream error_message; ! error_message << "The order of sequence " << order - 1 << " should less than the FFT size " << fft_size; sptk::PrintErrorMessage("fft", error_message); return 1; ! } else if (0 >= order) { std::ostringstream error_message; ! error_message << "The order of sequence " << order - 1 ! << " should more than 0"; sptk::PrintErrorMessage("fft", error_message); return 1; } } else { ! order = fft_size; } --- 168,187 ---- // check order if (order_is_specified) { ! if (fft_size <= order) { std::ostringstream error_message; ! error_message << "The order of sequence " << order << " should less than the FFT size " << fft_size; sptk::PrintErrorMessage("fft", error_message); return 1; ! } ! if (0 > order) { std::ostringstream error_message; ! error_message << "The order of sequence " << order ! << " should at least 0"; sptk::PrintErrorMessage("fft", error_message); return 1; } } else { ! order = fft_size - 1; } *************** *** 159,177 **** std::istream& input_stream(ifs.fail() ? std::cin : ifs); ! std::vector<double> input_x(fft_size); ! std::vector<double> input_y(fft_size); std::vector<double> output_x(fft_size); std::vector<double> output_y(fft_size); while (!input_stream.eof()) { // get input ! std::fill(input_x.begin(), input_x.end(), 0.0); ! std::fill(input_y.begin(), input_y.end(), 0.0); ! input_stream.read(reinterpret_cast<char*>(&input_x[0]), ! sizeof(&input_x[0]) * order); ! if (input_stream.gcount() == 0) break; ! input_stream.read(reinterpret_cast<char*>(&input_y[0]), ! sizeof(&input_y[0]) * order); ! if (input_stream.gcount() == 0) break; if (!fft.Run(input_x, input_y, &output_x, &output_y)) { --- 200,218 ---- std::istream& input_stream(ifs.fail() ? std::cin : ifs); ! const int length(order + 1); ! ! std::vector<double> input_x(length); ! std::vector<double> input_y(length); std::vector<double> output_x(fft_size); std::vector<double> output_y(fft_size); + std::vector<float> float_x; + std::vector<float> float_y; while (!input_stream.eof()) { // get input ! if (!sptk::ReadStream(length, &input_stream, &input_x, &float_x)) ! break; ! if (!sptk::ReadStream(length, &input_stream, &input_y, &float_y)) ! break; if (!fft.Run(input_x, input_y, &output_x, &output_y)) { *************** *** 191,201 **** } ! if (kOutputImaginaryPart != output_format) ! std::cout.write(reinterpret_cast<char*>(&output_x[0]), ! sizeof(&output_x[0]) * output_x.size()); ! if (kOutputRealAndImaginaryParts == output_format || ! kOutputImaginaryPart == output_format) ! std::cout.write(reinterpret_cast<char*>(&output_y[0]), ! sizeof(&output_y[0]) * output_y.size()); } --- 232,243 ---- } ! if (kOutputImaginaryPart != output_format && ! !sptk::WriteStream(fft_size, &std::cout, &output_x, &float_x)) ! break; ! ! if ((kOutputRealAndImaginaryParts == output_format || ! kOutputImaginaryPart == output_format) && ! !sptk::WriteStream(fft_size, &std::cout, &output_y, &float_y)) ! break; } Index: Makefile =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 29 Oct 2015 12:08:23 -0000 1.3 --- Makefile 17 Nov 2015 10:15:37 -0000 1.4 *************** *** 1,3 **** ! # Copyright 2015 Nagoya Institute of Technology TARGET = libsptk.a --- 1,45 ---- ! # ----------------------------------------------------------------- # ! # The Speech Signal Processing Toolkit (SPTK) # ! # developed by SPTK Working Group # ! # http://sp-tk.sourceforge.net/ # ! # ----------------------------------------------------------------- # ! # # ! # Copyright (c) 1984-2007 Tokyo Institute of Technology # ! # Interdisciplinary Graduate School of # ! # Science and Engineering # ! # # ! # 1996-2015 Nagoya Institute of Technology # ! # Department of Computer Science # ! # # ! # All rights reserved. # ! # # ! # Redistribution and use in source and binary forms, with or # ! # without modification, are permitted provided that the following # ! # conditions are met: # ! # # ! # - Redistributions of source code must retain the above copyright # ! # notice, this list of conditions and the following disclaimer. # ! # - Redistributions in binary form must reproduce the above # ! # copyright notice, this list of conditions and the following # ! # disclaimer in the documentation and/or other materials provided # ! # with the distribution. # ! # - Neither the name of the SPTK working group nor the names of its # ! # contributors may be used to endorse or promote products derived # ! # from this software without specific prior written permission. # ! # # ! # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # ! # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # ! # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # ! # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # ! # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS # ! # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, # ! # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED # ! # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # ! # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON # ! # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # ! # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # ! # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ! # POSSIBILITY OF SUCH DAMAGE. # ! # ----------------------------------------------------------------- # TARGET = libsptk.a Index: frequency_transform.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/frequency_transform.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** frequency_transform.h 29 Oct 2015 12:08:23 -0000 1.2 --- frequency_transform.h 17 Nov 2015 10:15:38 -0000 1.3 *************** *** 1,3 **** ! // Copyright 2015 Nagoya Institute of Technology #ifndef SPTK_SRC_FREQUENCY_TRANSFORM_H_ --- 1,45 ---- ! // ----------------------------------------------------------------- // ! // The Speech Signal Processing Toolkit (SPTK) // ! // developed by SPTK Working Group // ! // http://sp-tk.sourceforge.net/ // ! // ----------------------------------------------------------------- // ! // // ! // Copyright (c) 1984-2007 Tokyo Institute of Technology // ! // Interdisciplinary Graduate School of // ! // Science and Engineering // ! // // ! // 1996-2015 Nagoya Institute of Technology // ! // Department of Computer Science // ! // // ! // All rights reserved. // ! // // ! // Redistribution and use in source and binary forms, with or // ! // without modification, are permitted provided that the following // ! // conditions are met: // ! // // ! // - Redistributions of source code must retain the above copyright // ! // notice, this list of conditions and the following disclaimer. // ! // - Redistributions in binary form must reproduce the above // ! // copyright notice, this list of conditions and the following // ! // disclaimer in the documentation and/or other materials provided // ! // with the distribution. // ! // - Neither the name of the SPTK working group nor the names of its // ! // contributors may be used to endorse or promote products derived // ! // from this software without specific prior written permission. // ! // // ! // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // ! // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // ! // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // ! // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // ! // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // ! // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // ! // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // ! // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // ! // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ! // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // ! // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // ! // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ! // POSSIBILITY OF SUCH DAMAGE. // ! // ----------------------------------------------------------------- // #ifndef SPTK_SRC_FREQUENCY_TRANSFORM_H_ Index: fast_fourier_transform.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/fast_fourier_transform.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** fast_fourier_transform.cc 29 Oct 2015 12:08:23 -0000 1.2 --- fast_fourier_transform.cc 17 Nov 2015 10:15:37 -0000 1.3 *************** *** 1,3 **** ! // Copyright 2015 Nagoya Institute of Technology #include "fast_fourier_transform.h" --- 1,45 ---- ! // ----------------------------------------------------------------- // ! // The Speech Signal Processing Toolkit (SPTK) // ! // developed by SPTK Working Group // ! // http://sp-tk.sourceforge.net/ // ! // ----------------------------------------------------------------- // ! // // ! // Copyright (c) 1984-2007 Tokyo Institute of Technology // ! // Interdisciplinary Graduate School of // ! // Science and Engineering // ! // // ! // 1996-2015 Nagoya Institute of Technology // ! // Department of Computer Science // ! // // ! // All rights reserved. // ! // // ! // Redistribution and use in source and binary forms, with or // ! // without modification, are permitted provided that the following // ! // conditions are met: // ! // // ! // - Redistributions of source code must retain the above copyright // ! // notice, this list of conditions and the following disclaimer. // ! // - Redistributions in binary form must reproduce the above // ! // copyright notice, this list of conditions and the following // ! // disclaimer in the documentation and/or other materials provided // ! // with the distribution. // ! // - Neither the name of the SPTK working group nor the names of its // ! // contributors may be used to endorse or promote products derived // ! // from this software without specific prior written permission. // ! // // ! // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // ! // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // ! // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // ! // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // ! // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // ! // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // ! // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // ! // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // ! // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ! // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // ! // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // ! // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ! // POSSIBILITY OF SUCH DAMAGE. // ! // ----------------------------------------------------------------- // #include "fast_fourier_transform.h" *************** *** 10,14 **** bool FastFourierTransform::SetNumDimension(int num_dimension) { ! if (num_dimension <= 4 || num_dimension & (num_dimension - 1)) return false; --- 52,56 ---- bool FastFourierTransform::SetNumDimension(int num_dimension) { ! if (num_dimension < 4 || num_dimension & (num_dimension - 1)) return false; *************** *** 34,44 **** std::vector<double>* real_part_output, std::vector<double>* imaginary_part_output) const { ! // check sine table (num_dimension_ is implicitly checked) ! if (sine_table_.empty()) ! return false; ! ! // check inputs ! if (static_cast<std::size_t>(num_dimension_) != real_part_input.size() || ! static_cast<std::size_t>(num_dimension_) != imaginary_part_input.size() || NULL == real_part_output || NULL == imaginary_part_output) --- 76,81 ---- std::vector<double>* real_part_output, std::vector<double>* imaginary_part_output) const { ! // check sine table and input ! if (sine_table_.empty() || NULL == real_part_output || NULL == imaginary_part_output) *************** *** 51,61 **** imaginary_part_output->resize(num_dimension_); ! // get values std::copy(real_part_input.begin(), real_part_input.end(), real_part_output->begin()); std::copy(imaginary_part_input.begin(), imaginary_part_input.end(), imaginary_part_output->begin()); double* x(&((*real_part_output)[0])); double* y(&((*imaginary_part_output)[0])); --- 88,109 ---- imaginary_part_output->resize(num_dimension_); ! if (real_part_input.size() > real_part_output->size() || ! imaginary_part_input.size() > imaginary_part_output->size()) ! return false; ! ! // get values and fill zero std::copy(real_part_input.begin(), real_part_input.end(), real_part_output->begin()); + std::fill(real_part_output->begin() + real_part_input.size(), + real_part_output->end(), + 0.0); std::copy(imaginary_part_input.begin(), imaginary_part_input.end(), imaginary_part_output->begin()); + std::fill(imaginary_part_output->begin() + imaginary_part_input.size(), + imaginary_part_output->end(), + 0.0); + double* x(&((*real_part_output)[0])); double* y(&((*imaginary_part_output)[0])); Index: sptk_utils.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/sptk_utils.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sptk_utils.h 29 Oct 2015 12:08:23 -0000 1.1 --- sptk_utils.h 17 Nov 2015 10:15:38 -0000 1.2 *************** *** 1,13 **** ! // Copyright 2015 Nagoya Institute of Technology ! ! #include <sstream> ! #include <string> #ifndef SPTK_SRC_SPTK_UTILS_H_ #define SPTK_SRC_SPTK_UTILS_H_ namespace sptk { bool ConvertStringToInteger(const std::string& input, int* output); bool IsInRange(const int& value, const int& min, const int& max); void PrintErrorMessage(const std::string& program_name, --- 1,68 ---- ! // ----------------------------------------------------------------- // ! // The Speech Signal Processing Toolkit (SPTK) // ! // developed by SPTK Working Group // ! // http://sp-tk.sourceforge.net/ // ! // ----------------------------------------------------------------- // ! // // ! // Copyright (c) 1984-2007 Tokyo Institute of Technology // ! // Interdisciplinary Graduate School of // ! // Science and Engineering // ! // // ! // 1996-2015 Nagoya Institute of Technology // ! // Department of Computer Science // ! // // ! // All rights reserved. // ! // // ! // Redistribution and use in source and binary forms, with or // ! // without modification, are permitted provided that the following // ! // conditions are met: // ! // // ! // - Redistributions of source code must retain the above copyright // ! // notice, this list of conditions and the following disclaimer. // ! // - Redistributions in binary form must reproduce the above // ! // copyright notice, this list of conditions and the following // ! // disclaimer in the documentation and/or other materials provided // ! // with the distribution. // ! // - Neither the name of the SPTK working group nor the names of its // ! // contributors may be used to endorse or promote products derived // ! // from this software without specific prior written permission. // ! // // ! // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND // ! // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, // ! // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // ! // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // ! // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS // ! // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, // ! // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED // ! // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // ! // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ! // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, // ! // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY // ! // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // ! // POSSIBILITY OF SUCH DAMAGE. // ! // ----------------------------------------------------------------- // #ifndef SPTK_SRC_SPTK_UTILS_H_ #define SPTK_SRC_SPTK_UTILS_H_ + #include <iostream> + #include <sstream> + #include <string> + #include <vector> + namespace sptk { + extern const bool kDoubleFormat; + extern const char* kSPTKVersion; + extern const char* kIOFormatString; + + bool ReadStream(const int& size, std::istream* input_stream, + std::vector<double>* double_sequence, + std::vector<float>* float_sequence); + bool WriteStream(const int& size, std::ostream* output_stream, + std::vector<double>* double_sequence, + std::vector<float>* float_sequence); bool ConvertStringToInteger(const std::string& input, int* output); + bool ConvertStringToDouble(const std::string& input, double* output); bool IsInRange(const int& value, const int& min, const int& max); void PrintErrorMessage(const std::string& program_name, |
From: Shikano M. <sh...@us...> - 2015-11-08 08:34:03
|
Update of /cvsroot/sp-tk/SPTK/doc/ref_e In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19984 Modified Files: gmmp.tex Log Message: Addition of masking command Index: gmmp.tex =================================================================== RCS file: /cvsroot/sp-tk/SPTK/doc/ref_e/gmmp.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gmmp.tex 8 Nov 2015 08:31:48 -0000 1.10 --- gmmp.tex 8 Nov 2015 08:34:01 -0000 1.11 *************** *** 1,3 **** ! 0% ----------------------------------------------------------------- % % The Speech Signal Processing Toolkit (SPTK) % % developed by SPTK Working Group % --- 1,3 ---- ! % ----------------------------------------------------------------- % % The Speech Signal Processing Toolkit (SPTK) % % developed by SPTK Working Group % |
From: Shikano M. <sh...@us...> - 2015-11-08 08:31:51
|
Update of /cvsroot/sp-tk/SPTK/doc/ref_e In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19864 Modified Files: gmmp.tex Log Message: Addition of masking command Index: gmmp.tex =================================================================== RCS file: /cvsroot/sp-tk/SPTK/doc/ref_e/gmmp.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** gmmp.tex 12 Dec 2014 03:02:00 -0000 1.9 --- gmmp.tex 8 Nov 2015 08:31:48 -0000 1.10 *************** *** 1,3 **** ! % ----------------------------------------------------------------- % % The Speech Signal Processing Toolkit (SPTK) % % developed by SPTK Working Group % --- 1,3 ---- ! 0% ----------------------------------------------------------------- % % The Speech Signal Processing Toolkit (SPTK) % % developed by SPTK Working Group % *************** *** 46,50 **** \begin{synopsis} ! \item [gmmp] [ --l $L$ ] [ --m $M$ ] [ --a ] {\em gmmfile} [ {\em infile} ] \end{synopsis} --- 46,51 ---- \begin{synopsis} ! \item [gmmp] [ --l $L$ ] [ --m $M$ ] [ --a ] [ --f ] [ --B $B1,B2,...$ ! ] [ --c1 ] [ --c2 ] {\em gmmfile} [ {\em infile} ] \end{synopsis} *************** *** 99,102 **** --- 100,108 ---- \argm{f}{}{full covariance}{FALSE} \argm{a}{}{print average log-probability}{FALSE} + \desc[1ex]{(level 2)} + \argm{B}{B1~B2~$\ldots$~Bn}{block size in covariance matrix,\\ + where $(B1+B2+\ldots+Bn)=L$}{N/A} + \argm{c1}{}{inter-block correlation}{N/A} + \argm{c2}{}{full covariance in each block}{N/A} \end{options} |
From: Shikano M. <sh...@us...> - 2015-11-08 08:29:15
|
Update of /cvsroot/sp-tk/SPTK/src/include In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19733 Modified Files: SPTK.h Log Message: Addition of maskCov_GMM Index: SPTK.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/include/SPTK.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** SPTK.h 11 Dec 2014 08:30:52 -0000 1.60 --- SPTK.h 8 Nov 2015 08:29:13 -0000 1.61 *************** *** 301,304 **** --- 301,306 ---- const int n, const int ceplift, const Boolean dftmode, const Boolean usehamming); + void maskCov_GMM(GMM * gmm, const int *dim_list, const int cov_dim, + const Boolean block_full, const Boolean block_corr); void frqtr(double *c1, int m1, double *c2, int m2, const double a); void mgc2mgc(double *c1, const int m1, const double a1, const double g1, |
From: Shikano M. <sh...@us...> - 2015-11-08 08:22:37
|
Update of /cvsroot/sp-tk/SPTK/src/bin/gmm In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19468 Modified Files: gmm.c gmmp.c _gmm.c Log Message: Addition of masking command Index: _gmm.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/gmm/_gmm.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** _gmm.c 11 Dec 2014 08:30:36 -0000 1.22 --- _gmm.c 8 Nov 2015 08:22:35 -0000 1.23 *************** *** 56,62 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 56,62 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif *************** *** 226,229 **** --- 226,299 ---- } + void maskCov_GMM(GMM * gmm, const int *dim_list, const int cov_dim, + const Boolean block_full, const Boolean block_corr) + { + + int row, col, i, k, l, m, *offset; + + offset = (int *) malloc(sizeof(int) * cov_dim + 1); + + offset[0] = 0; + for (i = 1; i < cov_dim + 1; i++) { + offset[i] = offset[i - 1] + dim_list[i - 1]; + } + + for (m = 0; m < gmm->nmix; m++) { + if (block_full == FA && block_corr == FA) { /* without -c1 and -c2 */ + for (k = 0; k < gmm->dim; k++) { + for (l = 0; l < gmm->dim; l++) { + if (k != l) { + gmm->gauss[m].cov[k][l] = 0.0; + } + } + } + } else if (block_full == FA && block_corr == TR) { /* with -c1 */ + for (row = 0; row < cov_dim; row++) { + for (col = 0; col < cov_dim; col++) { + for (k = offset[row]; k < offset[row] + dim_list[row]; k++) { + for (l = offset[col]; l < offset[col] + dim_list[col]; l++) { + if (dim_list[row] != dim_list[col]) { + gmm->gauss[m].cov[k][l] = 0.0; + } else { + if (offset[row + 1] - k != offset[col + 1] - l) { + gmm->gauss[m].cov[k][l] = 0.0; + } + } + } + } + } + } + } else if (block_full == TR && block_corr == FA) { /* with -c2 */ + for (row = 0; row < cov_dim; row++) { + for (col = 0; col < cov_dim; col++) { + if (row != col) { + for (k = offset[row]; k < offset[row] + dim_list[row]; k++) { + for (l = offset[col]; l < offset[col] + dim_list[col]; l++) { + gmm->gauss[m].cov[k][l] = 0.0; + } + } + } + } + } + } else { /* with -c1 and -c2 */ + for (row = 0; row < cov_dim; row++) { + for (col = 0; col < cov_dim; col++) { + if (dim_list[row] != dim_list[col]) { + for (k = offset[row]; k < offset[row] + dim_list[row]; k++) { + for (l = offset[col]; l < offset[col] + dim_list[col]; l++) { + gmm->gauss[m].cov[k][l] = 0.0; + } + } + } + } + } + } + } + + free(offset); + + } + + double log_wgd(const GMM * gmm, const int m, const int L, const double *dat) { Index: gmmp.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/gmm/gmmp.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** gmmp.c 11 Dec 2014 08:30:36 -0000 1.18 --- gmmp.c 8 Nov 2015 08:22:35 -0000 1.19 *************** *** 52,60 **** * gmmp [options] gmmfile [infile] > stdout * * options: * ! * -l l : length of vector [26] * ! * -m m : number of Gaussian components [16] * ! * -a : output average log-probability [FALSE] * * infile: * ! * input vector sequence [stdin] * * stdout: * * sequence of frame log-probabilities * --- 52,66 ---- * gmmp [options] gmmfile [infile] > stdout * * options: * ! * -l l : length of vector [26] * ! * -m m : number of Gaussian components [16] * ! * -f : full covariance [FALSE] * ! * -a : output average log-probability [FALSE] * ! * (level 2) * ! * -B B1 ... Bb : block size in covariance matrix [FALSE] * ! * where (B1 + B2 + ... + Bb) = l * ! * -c1 : inter-block correlation [FALSE] * ! * -c2 : full covariance in each block [FALSE] * * infile: * ! * input vector sequence [stdin] * * stdout: * * sequence of frame log-probabilities * *************** *** 70,79 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 76,85 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 81,87 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 87,93 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif *************** *** 107,122 **** fprintf(stderr, " options:\n"); ! fprintf(stderr, " -l l : dimensionality of vectors [%d]\n", DEF_L); ! fprintf(stderr, " -m m : number of Gaussian components [%d]\n", DEF_M); ! fprintf(stderr, " -f : full covariance [%s]\n", BOOL[FULL]); ! fprintf(stderr, " -a : output average log-probability [%s]\n", BOOL[DEF_A]); fprintf(stderr, " -h : print this message\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, ! " input data sequence (float) [stdin]\n"); fprintf(stderr, " gmmfile:\n"); fprintf(stderr, " GMM parameters (float)\n"); --- 113,140 ---- fprintf(stderr, " options:\n"); ! fprintf(stderr, ! " -l l : dimensionality of vectors [%d]\n", DEF_L); ! fprintf(stderr, ! " -m m : number of Gaussian components [%d]\n", DEF_M); ! fprintf(stderr, ! " -f : full covariance [%s]\n", BOOL[FULL]); ! fprintf(stderr, ! " -a : output average log-probability [%s]\n", BOOL[DEF_A]); fprintf(stderr, " -h : print this message\n"); + fprintf(stderr, " (level 2)\n"); + fprintf(stderr, + " -B B1 B2 ... Bb : block size in covariance matrix, [FALSE]\n"); + fprintf(stderr, " where (B1 + B2 + ... + Bb) = l\n"); + fprintf(stderr, + " -c1 : inter-block correlation [FALSE]\n"); + fprintf(stderr, + " -c2 : full covariance in each block [FALSE]\n"); fprintf(stderr, " infile:\n"); fprintf(stderr, ! " input data sequence (float) [stdin]\n"); fprintf(stderr, " gmmfile:\n"); fprintf(stderr, " GMM parameters (float)\n"); *************** *** 124,127 **** --- 142,151 ---- fprintf(stderr, " log-probabilities or average log-probability (float)\n"); + fprintf(stderr, " notice:\n"); + fprintf(stderr, + " -B option specifies the size of each blocks in covariance matrix.\n"); + fprintf(stderr, " -c1 and -c2 option must be used with -B option.\n"); + fprintf(stderr, + " Without -c1 and -c2 option, a diagonal covariance can be obtained.\n"); #ifdef PACKAGE_VERSION fprintf(stderr, "\n"); *************** *** 140,143 **** --- 164,169 ---- int M = DEF_M, L = DEF_L, T; Boolean aflag = DEF_A, full = FULL; + int cov_dim = 0, dim_list[1024], i, j; + Boolean block_full = FA, block_corr = FA, multiple_dim = FA; if ((cmnd = strrchr(argv[0], '/')) == NULL) *************** *** 167,170 **** --- 193,217 ---- aflag = TR; break; + /* level 2 */ + case 'B': + multiple_dim = TR; + dim_list[0] = atoi(*++argv); + i = 1; + argc--; + while ((**(argv + 1) != '\0') && isdigit(**(argv + 1))) { + dim_list[i++] = atoi(*++argv); + if (--argc <= 1) { + break; + } + } + cov_dim = i; + break; + case 'c': + if (strncmp("1", *(argv) + 2, 1) == 0) { + block_corr = TR - block_corr; + } else if (strncmp("2", *(argv) + 2, 1) == 0) { + block_full = TR - block_full; + } + break; default: fprintf(stderr, "%s: Illegal option \"%s\".\n", cmnd, *argv); *************** *** 176,179 **** --- 223,247 ---- fp = getfp(*argv, "rb"); + if (multiple_dim == TR) { + for (i = 0, j = 0; i < cov_dim; i++) { + j += dim_list[i]; + } + if (j != L) { + fprintf(stderr, + "%s: block size must be coincided with dimention of vector\n", + cmnd); + usage(1); + } + full = TR; + } else { + if (block_corr == TR || block_full == TR) { + if (full != TR) { + fprintf(stderr, + "%s: -c1 and -c2 option must be specified with -B option!\n", + cmnd); + usage(1); + } + } + } /* Read GMM parameters */ *************** *** 185,193 **** alloc_GMM(&gmm, M, L, full); load_GMM(&gmm, fgmm); - prepareCovInv_GMM(&gmm); - prepareGconst_GMM(&gmm); fclose(fgmm); /* Calculate and output log-probability */ T = 0; --- 253,275 ---- alloc_GMM(&gmm, M, L, full); load_GMM(&gmm, fgmm); fclose(fgmm); + if (gmm.full != TR && full == TR) { + fprintf(stderr, + "%s: GMM is diagonal covariance, so -f or -B option is inappropriate!\n", + cmnd); + usage(1); + } + + if (full == TR && multiple_dim == TR) { + maskCov_GMM(&gmm, dim_list, cov_dim, block_full, block_corr); + } + + if (gmm.full == TR) { + prepareCovInv_GMM(&gmm); + prepareGconst_GMM(&gmm); + } + /* Calculate and output log-probability */ T = 0; Index: gmm.c =================================================================== RCS file: /cvsroot/sp-tk/SPTK/src/bin/gmm/gmm.c,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** gmm.c 11 Dec 2014 08:30:36 -0000 1.25 --- gmm.c 8 Nov 2015 08:22:35 -0000 1.26 *************** *** 88,97 **** #ifdef HAVE_STRING_H ! # include <string.h> #else ! # include <strings.h> ! # ifndef HAVE_STRRCHR ! # define strrchr rindex ! # endif #endif --- 88,97 ---- #ifdef HAVE_STRING_H ! #include <string.h> #else ! #include <strings.h> ! #ifndef HAVE_STRRCHR ! #define strrchr rindex ! #endif #endif *************** *** 100,106 **** #if defined(WIN32) ! # include "SPTK.h" #else ! # include <SPTK.h> #endif --- 100,106 ---- #if defined(WIN32) ! #include "SPTK.h" #else ! #include <SPTK.h> #endif *************** *** 526,565 **** /* masking */ if (multiple_dim == TR) { ! for (m = 0; m < M; m++) { ! offset_row = 0; ! for (row = 0; row < cov_dim; row++) { /* row */ ! offset_col = 0; ! for (col = 0; col <= row; col++) { /* column */ ! for (k = offset_row; k < offset_row + dim_list[row]; k++) { ! for (l = offset_col; l < offset_col + dim_list[col]; ! l++) { ! if (dim_list[row] != dim_list[col]) { ! gmm.gauss[m].cov[k][l] = 0.0; ! } else { ! if (block_full == FA && block_corr == FA) { ! if (row != col) { ! gmm.gauss[m].cov[k][l] = 0.0; ! } else { ! if (k - offset_row != l - offset_col) { ! gmm.gauss[m].cov[k][l] = 0.0; ! } ! } ! } else if (block_full == FA && block_corr == TR) { ! if (k - offset_row != l - offset_col) { ! gmm.gauss[m].cov[k][l] = 0.0; ! } ! } else if (block_full == TR && block_corr == FA) { ! if (row != col) { ! gmm.gauss[m].cov[k][l] = 0.0; ! } ! } ! } ! } ! } ! offset_col += dim_list[col]; ! } ! offset_row += dim_list[row]; ! } ! } } } --- 526,530 ---- /* masking */ if (multiple_dim == TR) { ! maskCov_GMM(&gmm, dim_list, cov_dim, block_full, block_corr); } } |
From: Takenori Y. <tak...@us...> - 2015-10-29 12:08:25
|
Update of /cvsroot/sp-tk/SPTK4/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv24433 Modified Files: Makefile fast_fourier_transform.cc frequency_transform.cc frequency_transform.h Added Files: fft.cc sptk_utils.cc sptk_utils.h Log Message: add fft command Index: fast_fourier_transform.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/fast_fourier_transform.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fast_fourier_transform.cc 16 Sep 2015 11:43:34 -0000 1.1 --- fast_fourier_transform.cc 29 Oct 2015 12:08:23 -0000 1.2 *************** *** 1,13 **** // Copyright 2015 Nagoya Institute of Technology ! #include <math.h> ! #include <string.h> ! #include "./fast_fourier_transform.h" namespace sptk { bool FastFourierTransform::SetNumDimension(int num_dimension) { - // todo: following lines should generate an error message. if (num_dimension <= 4 || num_dimension & (num_dimension - 1)) return false; --- 1,13 ---- // Copyright 2015 Nagoya Institute of Technology ! #include "fast_fourier_transform.h" ! #include <algorithm> ! #include <cmath> ! #include <cstddef> namespace sptk { bool FastFourierTransform::SetNumDimension(int num_dimension) { if (num_dimension <= 4 || num_dimension & (num_dimension - 1)) return false; *************** *** 16,23 **** const double argument(M_PI / num_dimension * 2); ! if (static_cast<size_t>(table_size) != sine_table_.size()) { sine_table_.resize(table_size); for (int i(0); i < table_size; ++i) { ! sine_table_[i] = sin(argument * i); } sine_table_[num_dimension / 2] = 0.0; --- 16,23 ---- const double argument(M_PI / num_dimension * 2); ! if (static_cast<std::size_t>(table_size) != sine_table_.size()) { sine_table_.resize(table_size); for (int i(0); i < table_size; ++i) { ! sine_table_[i] = std::sin(argument * i); } sine_table_[num_dimension / 2] = 0.0; *************** *** 30,37 **** bool FastFourierTransform::Run( ! const std::vector<double>& real_part_input, ! const std::vector<double>& imaginary_part_input, ! std::vector<double>* real_part_output, ! std::vector<double>* imaginary_part_output) const { // check sine table (num_dimension_ is implicitly checked) if (sine_table_.empty()) --- 30,37 ---- bool FastFourierTransform::Run( ! const std::vector<double>& real_part_input, ! const std::vector<double>& imaginary_part_input, ! std::vector<double>* real_part_output, ! std::vector<double>* imaginary_part_output) const { // check sine table (num_dimension_ is implicitly checked) if (sine_table_.empty()) *************** *** 39,44 **** // check inputs ! if (static_cast<size_t>(num_dimension_) != real_part_input.size() || ! static_cast<size_t>(num_dimension_) != imaginary_part_input.size() || NULL == real_part_output || NULL == imaginary_part_output) --- 39,44 ---- // check inputs ! if (static_cast<std::size_t>(num_dimension_) != real_part_input.size() || ! static_cast<std::size_t>(num_dimension_) != imaginary_part_input.size() || NULL == real_part_output || NULL == imaginary_part_output) *************** *** 46,52 **** // prepare memories ! if (static_cast<size_t>(num_dimension_) != real_part_output->size()) real_part_output->resize(num_dimension_); ! if (static_cast<size_t>(num_dimension_) != imaginary_part_output->size()) imaginary_part_output->resize(num_dimension_); --- 46,52 ---- // prepare memories ! if (static_cast<std::size_t>(num_dimension_) != real_part_output->size()) real_part_output->resize(num_dimension_); ! if (static_cast<std::size_t>(num_dimension_) != imaginary_part_output->size()) imaginary_part_output->resize(num_dimension_); *************** *** 58,63 **** imaginary_part_input.end(), imaginary_part_output->begin()); ! double *x(&((*real_part_output)[0])); ! double *y(&((*imaginary_part_output)[0])); // set values --- 58,63 ---- imaginary_part_input.end(), imaginary_part_output->begin()); ! double* x(&((*real_part_output)[0])); ! double* y(&((*imaginary_part_output)[0])); // set values *************** *** 70,78 **** while (lmx > 1) { ! double *sinp(const_cast<double *>(&(sine_table_[0]))); ! double *cosp(const_cast<double *>(&(sine_table_[0])) + num_dimension_ / 4); for (int i(0); i < lmx; ++i) { ! double *xpi(&x[i]); ! double *ypi(&y[i]); for (int li(lix); li <= num_dimension_; li += lix) { const double t1(*(xpi) - *(xpi + lmx)); --- 70,78 ---- while (lmx > 1) { ! double* sinp(const_cast<double*>(&(sine_table_[0]))); ! double* cosp(const_cast<double*>(&(sine_table_[0])) + num_dimension_ / 4); for (int i(0); i < lmx; ++i) { ! double* xpi(&x[i]); ! double* ypi(&y[i]); for (int li(lix); li <= num_dimension_; li += lix) { const double t1(*(xpi) - *(xpi + lmx)); *************** *** 93,98 **** } ! double *xp(x); ! double *yp(y); for (int li(half_num_dimension); li--; xp += 2, yp += 2) { --- 93,98 ---- } ! double* xp(x); ! double* yp(y); for (int li(half_num_dimension); li--; xp += 2, yp += 2) { --- NEW FILE: sptk_utils.cc --- // Copyright 2015 Nagoya Institute of Technology #include "sptk_utils.h" #include <cerrno> #include <cstdlib> #include <iostream> #include <sstream> #include <string> namespace sptk { bool ConvertStringToInteger(const std::string& input, int* output) { if (NULL == output) return false; char* end; int integer(static_cast<int>(std::strtol(input.c_str(), &end, 10))); if (0 == input.compare(end) || '\0' != *end || ERANGE == errno) { return false; } *output = integer; return true; } bool IsInRange(const int& value, const int& min, const int& max) { return (min > value || max < value) ? false : true; } void PrintErrorMessage(const std::string& program_name, const std::ostringstream& message) { std::cerr << program_name << " : " << message.str() << "!" << std::endl; } } // namespace sptk --- NEW FILE: fft.cc --- // Copyright 2015 Nagoya Institute of Technology #include <unistd.h> #include <cmath> #include <cstdlib> #include <fstream> #include <iostream> #include <sstream> #include "fast_fourier_transform.h" #include "sptk_utils.h" namespace { enum OutputFormats { kOutputRealAndImaginaryParts = 0, kOutputRealPart, kOutputImaginaryPart, kOutputAmplitude, kOutputPower, kNumOutputFormats }; const int kFFTSize(256); void PrintUsage() { std::cout << std::endl; std::cout << " fft - FFT for complex sequence" << std::endl; std::cout << std::endl; std::cout << " usage:" << std::endl; std::cout << " fft [ options ] [ infile ] > stdout" << std::endl; std::cout << " options:" << std::endl; std::cout << " -l l : FFT size [" << kFFTSize << "]" << std::endl; // NOLINT std::cout << " -m m : order of sequence [l-1]" << std::endl; // NOLINT std::cout << " -o : output format [0]" << std::endl; // NOLINT std::cout << " 0 (real and imaginary parts)" << std::endl; std::cout << " 1 (real part)" << std::endl; std::cout << " 2 (imaginary part)" << std::endl; std::cout << " 3 (amplitude)" << std::endl; std::cout << " 4 (power)" << std::endl; std::cout << " -h : print this message" << std::endl; std::cout << " infile:" << std::endl; std::cout << " data sequence (double) [stdin]" << std::endl; // NOLINT std::cout << " stdout:" << std::endl; std::cout << " FFT sequence (double)" << std::endl; #ifdef PACKAGE_VERSION std::cout << std::endl; std::cout << " SPTK: version " << PACKAGE_VERSION << std::endl; std::cout << " CVS Info: " << std::endl; #endif std::cout << std::endl; } } // namespace int main(int argc, char* argv[]) { int fft_size(kFFTSize); int order(0); bool order_is_specified(false); OutputFormats output_format(kOutputRealAndImaginaryParts); while (true) { char option_char(getopt(argc, argv, "l:m:o:h")); if (-1 == option_char) break; switch (option_char) { case 'l': { if (!sptk::ConvertStringToInteger(optarg, &fft_size)) { std::ostringstream error_message; error_message << "The argument for the -l option must be an integer"; sptk::PrintErrorMessage("fft", error_message); return 1; } break; } case 'm': { if (!sptk::ConvertStringToInteger(optarg, &order)) { std::ostringstream error_message; error_message << "The argument for the -m option must be an integer"; sptk::PrintErrorMessage("fft", error_message); return 1; } ++order; order_is_specified = true; break; } case 'o': { int output_format_integer; if (!sptk::ConvertStringToInteger(optarg, &output_format_integer)) { std::ostringstream error_message; error_message << "The argument for the -o option must be an integer"; sptk::PrintErrorMessage("fft", error_message); return 1; } const int min(0); const int max(static_cast<int>(kNumOutputFormats) - 1); if (!sptk::IsInRange(output_format_integer, min, max)) { std::ostringstream error_message; error_message << "The argument for the -o option must be in range" << " (" << min << " .. " << max << ")"; sptk::PrintErrorMessage("fft", error_message); return 1; } output_format = static_cast<OutputFormats>(output_format_integer); break; } case 'h': { PrintUsage(); return 0; } default: { PrintUsage(); return 1; } } } // check FFT size sptk::FastFourierTransform fft; if (!fft.SetNumDimension(fft_size)) { std::ostringstream error_message; error_message << "The FFT size must be an power of 2 and greater than 4"; sptk::PrintErrorMessage("fft", error_message); return 1; } // check order if (order_is_specified) { if (fft_size < order) { std::ostringstream error_message; error_message << "The order of sequence " << order - 1 << " should less than the FFT size " << fft_size; sptk::PrintErrorMessage("fft", error_message); return 1; } else if (0 >= order) { std::ostringstream error_message; error_message << "The order of sequence " << order - 1 << " should more than 0"; sptk::PrintErrorMessage("fft", error_message); return 1; } } else { order = fft_size; } // get input file const char* input_file((optind < argc) ? argv[argc - 1] : NULL); // open stream std::ifstream ifs; ifs.open(input_file, std::ios::in | std::ios::binary); if (ifs.fail() && NULL != input_file) { std::ostringstream error_message; error_message << "Cannot open file " << input_file; sptk::PrintErrorMessage("fft", error_message); return 1; } std::istream& input_stream(ifs.fail() ? std::cin : ifs); std::vector<double> input_x(fft_size); std::vector<double> input_y(fft_size); std::vector<double> output_x(fft_size); std::vector<double> output_y(fft_size); while (!input_stream.eof()) { // get input std::fill(input_x.begin(), input_x.end(), 0.0); std::fill(input_y.begin(), input_y.end(), 0.0); input_stream.read(reinterpret_cast<char*>(&input_x[0]), sizeof(&input_x[0]) * order); if (input_stream.gcount() == 0) break; input_stream.read(reinterpret_cast<char*>(&input_y[0]), sizeof(&input_y[0]) * order); if (input_stream.gcount() == 0) break; if (!fft.Run(input_x, input_y, &output_x, &output_y)) { std::ostringstream error_message; error_message << "Failed to run the fast Fourier transform"; sptk::PrintErrorMessage("fft", error_message); return 1; } if (kOutputAmplitude == output_format) { for (int i(0); i < fft_size; ++i) output_x[i] = std::sqrt(output_x[i] * output_x[i] + output_y[i] * output_y[i]); } else if (kOutputPower == output_format) { for (int i(0); i < fft_size; ++i) output_x[i] = output_x[i] * output_x[i] + output_y[i] * output_y[i]; } if (kOutputImaginaryPart != output_format) std::cout.write(reinterpret_cast<char*>(&output_x[0]), sizeof(&output_x[0]) * output_x.size()); if (kOutputRealAndImaginaryParts == output_format || kOutputImaginaryPart == output_format) std::cout.write(reinterpret_cast<char*>(&output_y[0]), sizeof(&output_y[0]) * output_y.size()); } return 0; } Index: Makefile =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 16 Sep 2015 11:43:34 -0000 1.2 --- Makefile 29 Oct 2015 12:08:23 -0000 1.3 *************** *** 1,9 **** TARGET = libsptk.a SOURCES = fast_fourier_transform.cc \ - fast_fourier_transform.h \ frequency_transform.cc \ ! frequency_transform.h \ OBJECTS = $(SOURCES:.cc=.o) --- 1,9 ---- + # Copyright 2015 Nagoya Institute of Technology TARGET = libsptk.a SOURCES = fast_fourier_transform.cc \ frequency_transform.cc \ ! sptk_utils.cc OBJECTS = $(SOURCES:.cc=.o) *************** *** 22,25 **** --- 22,28 ---- $(CXX) $(CXXFLAGS) $(INCLUDE) -o $(<:.cc=.o) -c $< + print: + echo $(<:.cc=.o) + clean: rm -f $(OBJECTS) $(TARGET) Index: frequency_transform.h =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/frequency_transform.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** frequency_transform.h 7 Aug 2015 05:09:24 -0000 1.1 --- frequency_transform.h 29 Oct 2015 12:08:23 -0000 1.2 *************** *** 4,9 **** #define SPTK_SRC_FREQUENCY_TRANSFORM_H_ - #include <vector> #include <stdexcept> namespace sptk { --- 4,9 ---- #define SPTK_SRC_FREQUENCY_TRANSFORM_H_ #include <stdexcept> + #include <vector> namespace sptk { *************** *** 61,67 **** private: ! // todo: following 2 lines should be modified by using ! // DISALLOW_COPY_AND_ASSIGN or etc. ! FrequencyTransform(const FrequencyTransform&); FrequencyTransform& operator=(const FrequencyTransform&); --- 61,68 ---- private: ! // ! explicit FrequencyTransform(const FrequencyTransform&); ! ! // FrequencyTransform& operator=(const FrequencyTransform&); Index: frequency_transform.cc =================================================================== RCS file: /cvsroot/sp-tk/SPTK4/src/frequency_transform.cc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** frequency_transform.cc 7 Aug 2015 05:09:24 -0000 1.1 --- frequency_transform.cc 29 Oct 2015 12:08:23 -0000 1.2 *************** *** 1,14 **** // Copyright 2015 Nagoya Institute of Technology ! #include <string.h> // memset ! #include "./frequency_transform.h" namespace sptk { bool FrequencyTransform::Run( ! const std::vector<double>& minimum_phase_sequence, ! std::vector<double>* warped_sequence, ! FrequencyTransform::Buffer* buffer) const { // check inputs if (minimum_phase_sequence.empty() || --- 1,14 ---- // Copyright 2015 Nagoya Institute of Technology ! #include "frequency_transform.h" ! #include <cstring> namespace sptk { bool FrequencyTransform::Run( ! const std::vector<double>& minimum_phase_sequence, ! std::vector<double>* warped_sequence, ! FrequencyTransform::Buffer* buffer) const { // check inputs if (minimum_phase_sequence.empty() || *************** *** 26,40 **** // get values ! double *d(&buffer->d_[0]); ! double *g(&buffer->g_[0]); ! const double *input(&minimum_phase_sequence[0]); ! double *output(&((*warped_sequence)[0])); const int num_input_order(minimum_phase_sequence.size() - 1); // set value ! const double beta(1.0 - (alpha_ * alpha_)); // fill zero ! memset(g, 0, sizeof(*g) * (num_output_order_ + 1)); // transform --- 26,40 ---- // get values ! double* d(&buffer->d_[0]); ! double* g(&buffer->g_[0]); ! const double* input(&minimum_phase_sequence[0]); ! double* output(&((*warped_sequence)[0])); const int num_input_order(minimum_phase_sequence.size() - 1); // set value ! const double beta(1.0 - alpha_ * alpha_); // fill zero ! std::memset(g, 0, sizeof(*g) * (num_output_order_ + 1)); // transform --- NEW FILE: sptk_utils.h --- // Copyright 2015 Nagoya Institute of Technology #include <sstream> #include <string> #ifndef SPTK_SRC_SPTK_UTILS_H_ #define SPTK_SRC_SPTK_UTILS_H_ namespace sptk { bool ConvertStringToInteger(const std::string& input, int* output); bool IsInRange(const int& value, const int& min, const int& max); void PrintErrorMessage(const std::string& program_name, const std::ostringstream& message); } // namespace sptk #endif // SPTK_SRC_SPTK_UTILS_H_ |