Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work on KaiOS #83

Closed
andre-dietrich opened this issue Nov 29, 2022 · 5 comments
Closed

Does not work on KaiOS #83

andre-dietrich opened this issue Nov 29, 2022 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@andre-dietrich
Copy link
Contributor

Hi, this is a really, really, really great project. We use it now in LiaScript to generate the default TTS output for courses. I tested it on KaiOS, which seems to have a TTS-support, with the standard API and good voices (the demo from MDN works fine). However, easy-speech does not support this OS/Browser.

Maybe it would be possible to add another unknown - system, next to android, safari, etc. that allows to access the API, when the browser supports TTS and also offers some voices?

I know, why supporting edge-case feature-phones? But, they have a larger market share in India than IPhone ...

https://www.kaiostech.com/developers/

It would be great to add this support to easy-speech ...

Kind regards ...

@jankapunkt
Copy link
Member

Hi @andre-dietrich could you please help me with debugging and use one of the KaiOS devices and go to the demo page using the KaiOS browser:

https://jankapunkt.github.io/easy-speech/

Then please copy the output from the tabs Init status and Debug log. A screenshot image is also fine. This should already help a lot to identitfy what's causing trouble.

@jankapunkt jankapunkt added help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest and removed hacktoberfest labels Dec 2, 2022
@andre-dietrich
Copy link
Contributor Author

Hi, sorry for the late response ... I tried it now on multiple ways. I used the simulator, with a newer version of KaiOS, where your lib works like charm. On my testing device however, I could not run it, after setting up the debug-environment, it seems that the script was not executed at all, event transpiling it with babel was not successful. I will go step by step through it, to figure out, what peace of JS might cause this behavior and write you an update ... thanks again, for this nice little lib ;-)

andre-dietrich added a commit to andre-dietrich/easy-speech that referenced this issue Jan 4, 2023
Two changes were necessary to run easy-speech on KaiOS:

1. An additional KaiOS check is added, based on the user navigator, this
   if it succeeds, it is treated as a isFirefox. The original test
   fails, since KaiOS (2.5) uses version 49, an older one. However, the
   TTS functionality is the same.
2. `globalThis` is not defined in KaiOS 2.5, which causes a
   ReferenceError and thus, the entire lib to fail. That is why an
   additional check was added.

However, the resulting output still needs to be transpiled with babel,
since the KaiOS browser does not support es6 syntax.
andre-dietrich added a commit to andre-dietrich/easy-speech that referenced this issue Jan 4, 2023
Two changes were necessary to run easy-speech on KaiOS:

1. An additional KaiOS check is added, based on the user navigator, this
   if it succeeds, it is treated as a isFirefox. The original test
   fails, since KaiOS (2.5) uses version 49, an older one. However, the
   TTS functionality is the same.
2. `globalThis` is not defined in KaiOS 2.5, which causes a
   ReferenceError and thus, the entire lib to fail. That is why an
   additional check was added.

However, the resulting output still needs to be transpiled with babel,
since the KaiOS browser does not support es6 syntax.
@andre-dietrich
Copy link
Contributor Author

It took some time, but now it runs on my Nokia with KaiOS 2.5, which uses an older version of Firefox (49). However, the docs folder will not run directly, it requires an additional transpilation to es5. Previously I tried to manually replace the spread operator ... and the question mark ?. But this did not work for async and await in docs/main.js. Maybe the demo site could be transpiled automatically to reach a wider set of browsers with TTS support.

andre-dietrich added a commit to andre-dietrich/easy-speech that referenced this issue Jan 4, 2023
Two changes were necessary to run easy-speech on KaiOS:

1. An additional KaiOS check is added, based on the user navigator, this
   if it succeeds, it is treated as a isFirefox. The original test
   fails, since KaiOS (2.5) uses version 49, an older one. However, the
   TTS functionality is the same.
2. `globalThis` is not defined in KaiOS 2.5, which causes a
   ReferenceError and thus, the entire lib to fail. That is why an
   additional check was added.

However, the resulting output still needs to be transpiled with babel,
since the KaiOS browser does not support es6 syntax.
andre-dietrich added a commit to andre-dietrich/easy-speech that referenced this issue Jan 4, 2023
Two changes were necessary to run easy-speech on KaiOS:

1. An additional KaiOS check is added, based on the user navigator, this
   if it succeeds, it is treated as a isFirefox. The original test
   fails, since KaiOS (2.5) uses version 49, an older one. However, the
   TTS functionality is the same.
2. `globalThis` is not defined in KaiOS 2.5, which causes a
   ReferenceError and thus, the entire lib to fail. That is why an
   additional check was added.

However, the resulting output still needs to be transpiled with babel,
since the KaiOS browser does not support es6 syntax.
@jankapunkt
Copy link
Member

Thank you!
I simply forgot to add this step when building the docs. Of course, we should be ES5 compliant. Let me check, if I can add this easily to the build step.

jankapunkt pushed a commit that referenced this issue Jan 11, 2023
Two changes were necessary to run easy-speech on KaiOS:

1. An additional KaiOS check is added, based on the user navigator, this
   if it succeeds, it is treated as a isFirefox. The original test
   fails, since KaiOS (2.5) uses version 49, an older one. However, the
   TTS functionality is the same.
2. `globalThis` is not defined in KaiOS 2.5, which causes a
   ReferenceError and thus, the entire lib to fail. That is why an
   additional check was added.

However, the resulting output still needs to be transpiled with babel,
since the KaiOS browser does not support es6 syntax.
@jankapunkt
Copy link
Member

Fixed in release 1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants