Hagsten / Talkify

Javascript Text to speech library
216 stars 32 forks source link

Reading floating point numbers #59

Closed sheethal-santhosh closed 2 years ago

sheethal-santhosh commented 2 years ago

Hello, I have noticed an issue with talkify while reading floating point numbers. The digits after the decimal is auto appended multiple times after the existing numbers.

For e.g, while reading 1.23 kilograms, it will become 1.232323 kilograms. However, it is reading the 1.23 kilograms correctly. @Hagsten Could you please suggest any solutions for this? Thanks

http://jsfiddle.net/2a5j3e19/4/

Screen Shot 2021-12-13 at 9 51 02 am
sheethal-santhosh commented 2 years ago

@Hagsten Furthermore, I noticed reading email addresses also has this problem. For e.g, while reading msanders@frsts.net.au will append au at the end.

Screen Shot 2021-12-15 at 4 03 53 pm
sheethal-santhosh commented 2 years ago

@Hagsten do we have any updates on this?

Hagsten commented 2 years ago

@sheethal-santhosh sorry for the late response. It is due to the naive way we are identifying sentences, which uses among others "." character. Let me investigate and see if I can make is more intelligent.

I might also add that the problem only occurs when one is missing a character that ends a sentence (., ?, !, etc). It would work if you would have "1.23 kilograms." But I think we should be able to handle your scenario as well.

sheethal-santhosh commented 2 years ago

@Hagsten Thanks for replying. Unfortunately not every time such words or text occurs at the end of the sentence. We would greatly appreciate if you could look into it and let us know if there is any immediate fix to this as our customers are highlighting this issue to us.

Hagsten commented 2 years ago

@sheethal-santhosh if you could do some testing on https://github.com/Hagsten/Talkify/tree/hotfix/wordHighlightOnDecimalNumbers/dist I would appreciate it. I'm confident in that it works, so confident that its being tested at our main site (talkify.net) as well.

sheethal-santhosh commented 2 years ago

@Hagsten Yes, that works! Thanks a lot for your help.