-
Notifications
You must be signed in to change notification settings - Fork 82
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
[Bug] More than one voice reproduced at a time #554
Comments
Hi! I know you can pick up a specific engine provider when instantiating the |
@qnga Thanks for the reply!
I'm not sure I understood, can you clarify?
Thank you for the reference! In those links, it's said that the engine should be passed in the constructor, which is what I did, I only pass the Google engine.
I also tried removing one of the engines like this, but it also didn't work, it causes no effect,
What's also awkward is that the TTS only displays the correct voices in When I debug it, I can see that there are always 2 engines active, no matter what I do. |
A navigator instance presumably uses only one TTS engine, determined at construction-time. If two different engines are used, there can be several explanations:
Where does the |
It feels more and more that it's this because it doesn't happen to all devices, only Samsung ones, which in my experience tend to present bugs more than the other manufacturers.
It may be what the device I tested is doing
When I create the TextToSpeech engine, I can access the With Readium 2.3.0 this wasn't happening, but when changing to 3.0.0-beta and refactoring the code with the new updates it started happening |
I see. |
Describe the bug
When I try to reproduce a text in TTS on some Samsung devices, there is an additional voice that's reproduced along with another voice that I added. It seems that it's the default TTS voice from the device and not the one I selected to be executed.
When the text is being read by the TTS, I can see that one of the voices being played is the right one, but
Voice[Name: pt-BR-default, locale: por_BRA_default, quality: 300, latency: 300, requiresNetwork: false, features: []]
(my device is in Portuguese) is also executed at the same time, and it shouldn't be.At the same time, if I want the TTS to read a book in English, the voice that's executed is the default device voice (
Voice[Name: pt-BR-default, locale: por_BRA_default, quality: 300, latency: 300, requiresNetwork: false, features: []]
) and not the one I'm setting to the engine.What's weird is that it's not happening on all devices. This is happening in my Samsung Galaxy S20 Fe Android 13. I tested it in a Samsung A5 Android 8 (physical device), Xiaomi Pocophone F1 Android 10 (physical device), Pixel 2 Android 10 (emulator) and it works properly.
This started happening when upgrading
org.readium.kotlin-toolkit
from 2.3.0 to 3.0.0-beta.1.These are the Readium dependencies in the project:
At this point, it seems that it's something specific to Samsung devices, and I have not found any way so far to fix it, please let me know any information that could help in fixing this.
How to reproduce?
To reproduce the duplicated voices
Readium version
3.0.0-beta.1
Android API version
13
Additional context
I verified in the code and whenever pass a voice to the engine, it's always the correct voice. I tried somehow seeing if I could find a place in the code where I could remove the unwanted voice, or even setting the voice as the correct one, but it always shows the unwanted voice as well. This happens when I want to set a voice to a book that's not in English for example.
Also, I can see that there are 2 engines (
this.engines
) related to the TextToSpeech class, one is the Samsung one (incorrect) and the other is the Google one (correct), see screenshot. I imagine that this is related to this problem, but I couldn't find how to remove the Samsung one.The text was updated successfully, but these errors were encountered: