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

Android tts rate doesn't calculated properly #10

Closed
maslianok opened this issue Jan 27, 2017 · 3 comments
Closed

Android tts rate doesn't calculated properly #10

maslianok opened this issue Jan 27, 2017 · 3 comments

Comments

@maslianok
Copy link
Contributor

The speed of tts is very important for us.
That's why we made some investigation on this. And here are our results:
unnamed

As you can see, the max rate for Android is ~5. The max rate that we can currently set with help of this library is 3. It's almost twice less...

Moreover, the max rate may differ between different voices.

That's why I would ask you to remove this smart transformation from iOS to Android rate.
Or, maybe, it would be better to add the third parameter to the setDefaultRate method. Something like dontTransform or whatever...

maslianok added a commit to maslianok/react-native-tts that referenced this issue Jan 27, 2017
@ak1394
Copy link
Owner

ak1394 commented Jan 27, 2017

I would like to provide unified API for setting the rate on Android and iOS. It's easy to pass the unmodified value, but then applications which use the api will have to check which platform they run on.

Is your app available on both Android and iOS? If so, what approach do you use for setting the rate values?

I will provide the way to bypass translation, if we can't figure out way to make translation work for you.

@maslianok
Copy link
Contributor Author

maslianok commented Jan 27, 2017

RN has Platform module that solves our problem.

TTS engines are very different on iOS and Android, so we just have no choice. We have different formulas to calculate rate and we need an ability to set this rate without any transformations. These formulas take care of selected language/voice/platform/etc. And there is no simple linear dependency between these values.

Could you maybe add an additional argument to the setDefaultRate method? And just skip this transformation when the parameter equals to true.

@ak1394
Copy link
Owner

ak1394 commented Jan 28, 2017

In v.1.1.0 added optional parameter to setDefaultRate() to turn off transformation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants