Bug 479110 - Text-to-speech is not working
Summary: Text-to-speech is not working
Status: RESOLVED DOWNSTREAM
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 24.01.85
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-12-28 05:21 UTC by Doug
Modified: 2024-01-15 09:25 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug 2023-12-28 05:21:34 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Open a document in Okular
2. Highlight text
3. right click and select "Speak Text" from context menu

OBSERVED RESULT
Nothing happens

EXPECTED RESULT
Selected text should be read

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: KDE Neon Unstable
(available in About System)
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION
Tried all three backends (speechd, mock, flite) with no results
Comment 1 Sune Vuorela 2024-01-02 11:02:45 UTC
Thank you for your report. Unfortunately, I cannot reproduce.

I just - like in my kf5 setup - drew a square and clicked 'Speak text' from context menu, and in both cases I got the same 'machine voice' speaking the exact same words. (Note; I have only tested with speech dispatcher, and just a single pdf document)

I think this might be a setup issue in your end; either by yourself or by your distribution.

Do you have the package speech-dispatcher installed ?
Comment 2 Doug 2024-01-04 18:40:42 UTC
(In reply to Sune Vuorela from comment #1)
> Thank you for your report. Unfortunately, I cannot reproduce.
> 
> I just - like in my kf5 setup - drew a square and clicked 'Speak text' from
> context menu, and in both cases I got the same 'machine voice' speaking the
> exact same words. (Note; I have only tested with speech dispatcher, and just
> a single pdf document)
> 
> I think this might be a setup issue in your end; either by yourself or by
> your distribution.
> 
> Do you have the package speech-dispatcher install

It was not, but I installed it and the issue has not changed.  I ran Okular from a terminal, and this is the output I get when I select text and try to do anything with it (i.e. speak, but also copy):

The cached device pixel ratio value was stale on window expose.  Please file a QTBUG which explains how to reproduce.

Dont' know if that has anything to do with the issue I am having.
Comment 3 Carlos De Maine 2024-01-06 03:34:49 UTC
> The cached device pixel ratio value was stale on window expose.  Please file
> a QTBUG which explains how to reproduce.
> 
> Dont' know if that has anything to do with the issue I am having.

no that should not have any relevance on your problem.  i can confirm that after i installed speech-dispatcher and restarted okular that text-to-speech began to work.  i will add speech-dispatcher as a runtime dep of qt6-speech in neon's packaging.

can you retry and see is it works now, preferably after a reboot?
Comment 4 Doug 2024-01-06 05:49:04 UTC
(In reply to Carlos De Maine from comment #3)
> > The cached device pixel ratio value was stale on window expose.  Please file
> > a QTBUG which explains how to reproduce.
> > 
> > Dont' know if that has anything to do with the issue I am having.
> 
> no that should not have any relevance on your problem.  i can confirm that
> after i installed speech-dispatcher and restarted okular that text-to-speech
> began to work.  i will add speech-dispatcher as a runtime dep of qt6-speech
> in neon's packaging.
> 
> can you retry and see is it works now, preferably after a reboot?

OK, thank you,  it seems to be working now with speechd, but flite and mock do not work.  Are they supposed to work out of the box?  If not, maybe there should be a message or something to let people know that there is extra configuration needed to use those modules.
Comment 5 Sune Vuorela 2024-01-15 09:25:01 UTC
(In reply to Doug from comment #4)
> (In reply to Carlos De Maine from comment #3)
> > > The cached device pixel ratio value was stale on window expose.  Please file
> > > a QTBUG which explains how to reproduce.
> > > 
> > > Dont' know if that has anything to do with the issue I am having.
> > 
> > no that should not have any relevance on your problem.  i can confirm that
> > after i installed speech-dispatcher and restarted okular that text-to-speech
> > began to work.  i will add speech-dispatcher as a runtime dep of qt6-speech
> > in neon's packaging.
> > 
> > can you retry and see is it works now, preferably after a reboot?
> 
> OK, thank you,  it seems to be working now with speechd, but flite and mock
> do not work.  Are they supposed to work out of the box?  If not, maybe there
> should be a message or something to let people know that there is extra
> configuration needed to use those modules.

I don't think mock should be installed. It isn't an actual working backend.

Flite also requires some extra modules, but last I tried it it wasn't very good.

I don't think QSpeech (the abstraction layer used) communicates non-working backends, so there is not much Okular can do about it.

I think I will mark this as closed.