Hi Koshore,
Kishore Prahallad wrote:
Is there a documents or link, which mentions the format in which the
model parameters are stored in "sample.pdf".
Unfortunately, there is no document describing file formats of "*.pdf"
files.
So I'd like to explain them in this mail.
All of pdf files are saved in Big Endian.
File formats of these pdf files are as follows:
mcp file:
# header
4byte integer, dim. of feature vector for spectrum part (ex. 75)
4byte integer, #leaf nodes in 1st state
4byte integer, #leaf nodes in 2nd state
...
4byte integer, #leaf nodes in 5th state
# probability distributions (Gaussian)
4byte float, 1st dim. of mean vector at first leaf node
...
4byte float, 75th dim. of mean vector at first leaf node
4byte float, 1st diag. element of covariance matrix at first leaf node
...
4byte float, 75th diag. element of covariance matrix at first leaf node
.....
4byte float, 1st dim. of mean vector at last leaf node
...
4byte float, 75th dim. of mean vector at last leaf node
4byte float, 1st diag. element of covariance matrix at last leaf node
...
4byte float, 75th diag. element of covariance matrix at last leaf node
lf0 file:
# header
4byte integer, dim. of feature vector for f0 part (ex. 3)
4byte integer, #leaf nodes in 1st state
4byte integer, #leaf nodes in 2nd state
...
4byte integer, #leaf nodes in 5th state
# probability distributions (Multi-space prob. distribution)
4byte float, 1st dim. of mean vector at 1st leaf node
...
4byte float, 3rd dim. of mean vector at 1st leaf node
4byte float, 1st diag. element of covariance matrix at first leaf node
...
4byte float, 3rd diag. element of covariance matrix at first leaf node
4byte float, voiced weight at first leaf node
4byte float, unvoiced weight at first leaf node
.....
4byte float, 1st dim. of mean vector at last leaf node
...
4byte float, 3rd dim. of mean vector at last leaf node
4byte float, 1st diag. element of covariance matrix at last leaf node
...
4byte float, 3rd diag. element of covariance matrix at last leaf node
4byte float, voiced weight at last leaf node
4byte float, unvoiced weight at last leaf node
# dur
4byte integer, #states in each HMM (ex. 5)
4byte integer, #leaf nodes
4byte float, 1st dim. of mean vector at first leaf node
...
4byte float, 5th dim. of mean vector at first leaf node
4byte float, 1st diag. element of covariance matrix at first leaf node
...
4byte float, 5th diag. element of covariance matrix at first leaf node
.....
4byte float, 1st dim. of mean vector at last leaf node
...
4byte float, 5th dim. of mean vector at last leaf node
4byte float, 1st diag. element of covariance matrix at last leaf node
...
4byte float, 5th diag. element of covariance matrix at last leaf node
If you have SPTK, you can check inside of these files using swab(byte
swap) & dmp.
Please try
swab +f mcp.pdf | dmp +i | less (to review header parts)
swab +f mcp.pdf | dmp +f | less (to review distributions)
Regards,
Heiga Zen (Byung Ha Chun)