[Subject Prev][Subject Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hts-users:00704] Re: hts_engine: Phoneme Symbols


Hi,

On 2007/05/31, at 10:33, Heiga ZEN (Byung Ha CHUN) wrote:

At HTS_Process() in hts_engine.cpp

  /* parse label file */
  while (!feof(labfp)) {
     HTS_GetToken (labfp,buf);
     if (!isalnum(buf[0])) break;
     if (isdigit(buf[0]))

The above isalnum(buf[0]) checks whether the first character in each line is alphabet or digit.
isalnum('@')==0 -> hts_engine stops.
By commenting out this statement, you can use hts_engine with '@' and '@@' phonemes.

I think we may use the isgraph function instead of the isalnum function.
i.e.
 if (!isalnum(buf[0])) break;
    ^^^^^^^^^^^^^^^^^^
 if (!isgraph(buf[0])) break;

Regards,

Junichi
CSTR

References
[hts-users:00694] hts_engine: Phoneme Symbols, Nipon Chinathimatmongkhon
[hts-users:00695] Re: hts_engine: Phoneme Symbols, Heiga ZEN (Byung Ha CHUN)
[hts-users:00702] Re: hts_engine: Phoneme Symbols, Maria João Barros
[hts-users:00703] Re: hts_engine: Phoneme Symbols, Heiga ZEN (Byung Ha CHUN)