|
From: Jonathan D. <jo...@js...> - 2009-05-19 12:36:08
|
On 19 May, Reece Dunn <ms...@go...> wrote: > If I handle espeakEVENT_WORD, the espeak_EVENT.length contains the > length of the word being spoken, but espeakEVENT_SENTENCE returns 0. eSpeak generates a espeakEVENT_SENTENCE event for the next word after end-of-sentence (i.e. full-stop, question mark, exclamation mark, or paragraph). eSpeak reads and processes text a phrase at a time. So at that point it doesn't know how long the sentence will be (it's only read the phrase). You could look for the next full-stop, question mark, etc. > When using the phrase event in Cepstral, it returns the range between > the current speaking position and any commas, semi-colons, etc. E.g. > "Hello, how are you?" would be split into "Hello," and "how are you?" > phrases. eSpeak processes text in a similar way. It can be useful to highlight words as they are spoken, but I'm not sure about highlighting sentences or phrases. You could look for the end of a phrase by looking for the next comma, semi-colon, etc. and highlight the text up to that. eSpeak generates an espeakEVENT_END event at the end of a phrase, so at that point you can look for the end of the next phrase and highlight that. |