foobnix / LibreraReader

Book Reader for Android
http://librera.mobi
Other
3.01k stars 309 forks source link

TTS is broken #888

Closed Crissium closed 2 years ago

Crissium commented 2 years ago

I'm on Android 12. TTS works perfectly on my older Android 6 device.

Version: 8.5.45-fdroid

Details: in the 'TTS Settings' tab, 'Voice' only shows the trashy TTS engine bundled with my system, even though I have already installed Google TTS and made it default. So I disabled the system TTS package with adb. But now 'Voice' only displays --- ---. When I tap the 'play' icon, I am asked to install the Google Speech Service app, which I've installed.

sak96 commented 2 years ago

Hey i am also facing the same issue. Both in fdriod and pro version.

sak96 commented 2 years ago

no obvious change which might have caused the issue which could be inferred from the diff.

Crissium commented 2 years ago

no obvious change which might have caused the issue which could be inferred from the diff.

Actually I have tried downgrading to 8.5.37 and the problem still persists

MI3Guy commented 2 years ago

I downgraded to 8.5.37 and it works again.

sak96 commented 2 years ago

no obvious change which might have caused the issue which could be inferred from the diff.

Actually I have tried downgrading to 8.5.37 and the problem still persists

when i tried to downgrade it did not allow me. i had to uninstall only then i could install 8.5.37 and the problem was gone.

Crissium commented 2 years ago

Yeah, thank you. I uninstalled 8.5.45 and reinstalled 8.5.37 and TTS now works again.

sak96 commented 2 years ago

hi @foobnix is it possible for releasing a beta with this permission added ? I am having issue setting up gradle.

I have tested even the latest 8.6.15 build as well it also has issue with tts.

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

I am getting following error.

> Could not get unknown property 'RELEASE_STORE_FILE' for SigningConfig$AgpDecorated_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=null, keyPassword=null, storeType=pkcs12, v1SigningEnabled=true, v2SigningEnabled=true, enableV1Signing=null, enableV2Signing=null, enableV3Signing=null, enableV4Signing=null} of type com.android.build.gradle.internal.dsl.SigningConfig$AgpDecorated.

Update i did not read readme going through it

foobnix commented 2 years ago

@sak96 do you think QUERY_ALL_PACKAGES permission fix the TTS on your device?

foobnix commented 2 years ago

fix will be soon

sak96 commented 2 years ago

i have build a release adding this and created a pr with same.

The change is adding back permission in mainifest

<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

can any one else validate if this is working for you ?

sak96 commented 2 years ago

@sak96 do you think QUERY_ALL_PACKAGES permission fix the TTS on your device?

yeah i did finally manage to get the package build. This fix does show the rhvoice tts engine.

i think i did not recognize that ndk was required. so stupid of me to not realize mupdf was getting linked via ndk.

sak96 commented 2 years ago

going through commit ddfa3a6800bfa77c9a417dea4d0b856cf610c55c, looks like you want to use queries ? Update may be something like this or this

will validate and let you know.

sak96 commented 2 years ago

Use queries instead of uses-permission this also fixes the issue.

Upload the release.

Update: The release with queries in andorid-manifest is updated in the same release.

foobnix commented 2 years ago

Google play do not recommend to use QUERY_ALL_PACKAGES, please check beta.librera.mobi with fix

sak96 commented 2 years ago

Google play do not recommend to use QUERY_ALL_PACKAGES, please check beta.librera.mobi with fix

Agreed. And hence i have added this in the pr. #893 This is as per android documentation link

        <intent>
          <action android:name="android.intent.action.TTS_SERVICE" />
        </intent>
    </queries>
sak96 commented 2 years ago

Google play do not recommend to use QUERY_ALL_PACKAGES, please check beta.librera.mobi with fix

this works.