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

[hts-users:01683] Re: ReadString: String too long


I met this problem when I used too long questions. For example,
"Question_One_s2_ {(*-aa+*,*-bb+*,*-cc+*,*-dd+*,*-ee+*,*-ff+*,*-gg+*,*-hh+*,*-ii+*,*-jj+*,*-kk+*,*-ll+*,*-mm+*,*-nn+*,*-oo+*,*-pp+*,*-qq+*,*-rr+*,*-ss+*,*-tt+*,*-uu+*,*-vv+*,*-ww+*,*-xx+*,*-yy+*,*-zz+*).state[2].stream[1]}"
this sort of questions can cause the "String too long" problem when HHEd.exe loads decision trees into memory in order to add unseen context-dependent phones.

I modified HHEd.c and HShell.h a little bit and thus this problem was avoided. From my personal point of view, it is likely to be an out-of-bounds exception of an array index happening to HHEd.exe.

(1) In the function "Tree *LoadTree(char *name, Source *src)" of HHEd.c
The statement
"char buf[MAXSTRLEN], bname[64], index[64], mname[MAXSTRLEN], *p;",
should be changed into
"char buf[MAXSTRLEN], bname[640], index[640], mname[MAXSTRLEN], *p;".
Or you may use a larger number.

(2) In the definition "#define MAXSTRLEN 256    /* max length of a string */" of HShell.h
I used 2560 instead of 256, due to the length of those questions.

Having modified the two statements, HHEd.exe worked well.

My experiment were carried out under the HTS 2.0 final version. Thanks.

--
Hui LIANG (the official spelling on my passport)
http://www.idiap.ch/contact.php?nMemberId=352


--- On Sat, 6/9/08, bereket kasaye <bereket_k@xxxxxxxxx> wrote:

> From: bereket kasaye <bereket_k@xxxxxxxxx>
> Subject: [hts-users:01661] ReadString: String too long
> To: hts-users@xxxxxxxxxxxxxxx
> Date: Saturday, 6 September, 2008, 3:48 PM
> Hi, 
> 
> I run the HTS-demo successfully. And then by changing the
> utterance file and raw data, it also works fine. But after I
> changed the question set for the language I using (Amharic
> language), it generates the following error    
> 
>  Creating HMMset using trees to add unseen triphones
>   ERROR [+5013]  ReadString: String too long
>  FATAL ERROR - Terminating program
> /usr/local/HTS-2.0.1/bin/HHEd
> 
> what could be the possible solution for this?
> 
> Thank you!





Follow-Ups
[hts-users:01684] Re: ReadString: String too long, Heiga ZEN (Byung Ha CHUN)
References
[hts-users:01661] ReadString: String too long, bereket kasaye