Open shenghuang147 opened 4 months ago
This seems to be coming from 22b3cdb36ff663ee3aae97b1635fd6b8837a11ec
Thanks for the precise report. AIUI we do want to keep the space requirement for the .
case, otherwise we'd spuriously split sentences in e.g. numbers.
I'd say we want to add to module_get_message_part
a dividers_nospace
parameter whose processing does not require a subsequent space. And then the corresponding configuration options in the few modules that are using it, and a useful default value.
Note that module_get_message_part
currently only processes in ascii, not utf-8, that's a separate concern that should be also easy to fix thanks to g_utf8_get_char
and g_utf8_next_char
Thank you for your work, and I'm not sure if I should raise a question in this issue GenericMaxChunkLength
seems to judge the length in bytes rather than characters, and I think it would be more appropriate to use characters.
Also I found that with GenericMaxChunkLength
enabled, when reading non-ascii text aloud, in some cases the last character of the text that should be read is lost.
I'll try to trigger this later and submit the logs
GenericMaxChunkLength seems to judge the length in bytes rather than characters, and I think it would be more appropriate to use characters
I don't think it's worth changing it: it's a very rough guess anyway.
in some cases the last character of the text that should be read is lost
Which version did you test with? Note that I fixed #806 recently
Which version did you test with? Note that I fixed #806 recently
I am very sorry, I have confirmed that this issue is not related to speechd, this problem comes from Okular.
Summary
The delimiter is not processed correctly when there is no space after the delimiter, as observed when using the spd-sya -w "hello,this,is,a,test" command.
Steps to Reproduce
spd-sya -w "hello,this,is,a,test
Expected Behavior
The message should be split correctly at each delimiter, regardless of whether there is whitespace around the delimiter. For the input "hello,this,is,a,test", each fragment ("hello", "this", "is", "a", "test") should be returned in order.
Actual Behavior
The function does not segment the message correctly when there are no spaces around the delimiters. It behaves as if the delimiters are not present and returns the entire message as a single segment.
Importance of Fix
In many languages, it is not common to add spaces after punctuation marks, including commas. Addressing this issue is critical to ensure proper functioning across different language conventions and text formatting styles.
Log
epos-generic.log