Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Arabic speech recognition returns incorrect string length #336

Open
tatiang opened this issue Jan 20, 2020 · 5 comments
Open

Arabic speech recognition returns incorrect string length #336

tatiang opened this issue Jan 20, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@tatiang
Copy link

tatiang commented Jan 20, 2020

Platform
Thunkable X

Issue/Request Origin
This issue is described in more detail in the forums post here and the one right below it.

Steps to Reproduce
When using speech recognition in ARABIC with partial result, the partial result value has a length one greater than what is displayed on the device.

For example, if I say "shukraan lakum" (Arabic for thank you), the device correctly decodes the speech into the Arabic script شكرا لكم but if I check the length of that decoded value, it is 9. If I check the length of the same script, شكرا لكم, in an app variable, the length is 8.

Furthermore, if I compare the two strings -- decoded from speech vs. app variable value -- character by character in a loop, it shows that the two characters in the same position in both strings are unequal even though visibly, they look identical.

Note that this does not seem to be a problem with French, for example. I changed the app variable to "Bonjour" and spoke the word "Bonjour" and the result was that the length of both strings was 7, as expected, and the character by character comparison was equal for every letter in both strings.

Actual Behavior
See above.

@tatiang
Copy link
Author

tatiang commented Jan 20, 2020

@tatiang
Copy link
Author

tatiang commented Jan 20, 2020

This Swift code I ran is also indicative of an incorrect count for Extended Grapheme Clusters:

Screen Shot 2020-01-20 at 10 09 44 AM

@mark-friedman
Copy link

Interesting problem, @tatiang.

@jane-d-alt jane-d-alt added the bug Something isn't working label May 14, 2021
@jane-d-alt
Copy link
Contributor

Hey @tatiang, just checking if this behavior is still present in the platform for you?

@tatiang
Copy link
Author

tatiang commented May 15, 2021

You know, I don't think I kept the demo project I shared a link to in the forum post mentioned above. Sorry! I don't speak Arabic nor do I develop apps that use it. I was just trying to help @davidsobhysabetb on the forums. You might check with him to see if the problem still exists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants