Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 01-04-2021, 04:24 PM   #1
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
Pause/play text-to-speech in Calibre viewer with Bluetooth

Are there any keyboard shortcuts for the text-to-speech function other than space for pausing/playing? It would be great to be able to pause/play with the buttons/touch panels on Bluetooth headphones/headsets.
mrkalle is offline   Reply With Quote
Old 01-04-2021, 11:17 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,963
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What key does that generate? You can check by assigning it to some other action in the keyboards shirtcut section of the viewer preferences
kovidgoyal is offline   Reply With Quote
Advert
Old 01-05-2021, 04:12 AM   #3
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
What key does that generate? You can check by assigning it to some other action in the keyboards shirtcut section of the viewer preferences
Media Play
mrkalle is offline   Reply With Quote
Old 01-05-2021, 05:51 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,963
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's already implemented, see https://github.com/kovidgoyal/calibr...aloud.pyj#L191

If its not working then it means that key event is not reaching.
kovidgoyal is offline   Reply With Quote
Old 01-05-2021, 06:05 AM   #5
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
That's already implemented, see https://github.com/kovidgoyal/calibr...aloud.pyj#L191

If its not working then it means that key event is not reaching.
Media Play is mapped to Play only.
Can you make it toggle between Play and Pause?
mrkalle is offline   Reply With Quote
Advert
Old 01-05-2021, 06:16 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,963
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is MediaPlayPause for that. If your bluetooth headset has a single button, that is what it should be generating.
kovidgoyal is offline   Reply With Quote
Old 01-05-2021, 06:28 AM   #7
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
There is MediaPlayPause for that. If your bluetooth headset has a single button, that is what it should be generating.
My Bose QC35 generates MediaPlayPause but as far as I can tell Calibre hears "Media Play". I'm on Windows 10.
Attached Thumbnails
Click image for larger version

Name:	Key_Generated_by_QC35_in grey.JPG
Views:	151
Size:	32.0 KB
ID:	184516  
mrkalle is offline   Reply With Quote
Old 01-05-2021, 07:05 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,963
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
sorry no clue, calibre doesnt interpret key events, that's done bg Qt WebEngine, calibre can only react to the actual events it receives.
kovidgoyal is offline   Reply With Quote
Old 01-05-2021, 07:29 AM   #9
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
How about making "Media Play" mean "Play/Pause" by default in Calibre rather than "Play"?
mrkalle is offline   Reply With Quote
Old 01-05-2021, 07:50 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,963
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That would break it for people that have separate play and pause keys. The proper fix has to be in Qt, not calibre.
kovidgoyal is offline   Reply With Quote
Old 01-05-2021, 07:55 AM   #11
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
Thanks, I just wonder how many have separate pause and play keys as opposed to those that don't. How about if the behavior could be up to the user via a setting?
mrkalle is offline   Reply With Quote
Old 01-05-2021, 12:49 PM   #12
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 942
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
My setup is this: Windows 10 Pro x64 machine, connected to Xiaomi AirDots via Bluetooth. This earphone has only one button on each piece.

1) Using the Viewer, the button can resume playback, but can't Pause.
2) Using the Content Server Viewer (on Microsoft Edge), it can Pause and Play.

I don't know what are the events being send. But I could test it, If someone point me how. =)
thiago.eec is offline   Reply With Quote
Old 01-05-2021, 04:07 PM   #13
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
Quote:
Originally Posted by thiago.eec View Post
My setup is this: Windows 10 Pro x64 machine, connected to Xiaomi AirDots via Bluetooth. This earphone has only one button on each piece.

1) Using the Viewer, the button can resume playback, but can't Pause.
2) Using the Content Server Viewer (on Microsoft Edge), it can Pause and Play.

I don't know what are the events being send. But I could test it, If someone point me how. =)
CharProbe available on softpedia can tell you what keycode is generated by your headset.
My guess is that no one on Windows can play/pause using a Bluetooth headset in the viewer, only play.

Last edited by mrkalle; 01-05-2021 at 04:11 PM.
mrkalle is offline   Reply With Quote
Old 01-05-2021, 10:13 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,963
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by thiago.eec View Post
My setup is this: Windows 10 Pro x64 machine, connected to Xiaomi AirDots via Bluetooth. This earphone has only one button on each piece.

1) Using the Viewer, the button can resume playback, but can't Pause.
2) Using the Content Server Viewer (on Microsoft Edge), it can Pause and Play.

I don't know what are the events being send. But I could test it, If someone point me how. =)
Yeah like I said, its a bug in Qt WebEngine, not the calibre viewer code. it needs to be fixed there.
kovidgoyal is offline   Reply With Quote
Old 01-08-2021, 03:40 AM   #15
mrkalle
Member
mrkalle began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Yeah like I said, its a bug in Qt WebEngine, not the calibre viewer code. it needs to be fixed there.
How about:
if ev.key is ' ' or ev.key is 'MediaPlayPause' or ev.key is 'PlayPause' or ev.key is 'Play':
self.toggle()
return

The reason I'm suggestion this is that few people have separate pause and play keys. Does anyone? Could someone who has a separate pause key for media (not the windows pause key or some other pause key) post here? Also, having the Play key toggle Play/Pause is not irrational.
mrkalle is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Viewer Plugin] Text to Speech chye Plugins 19 10-24-2020 04:09 AM
Text to Speech of Calibre PDF on a Kindle petey64 Calibre 1 11-19-2019 11:22 AM
Calibre ebook-viewer support for NVDA / text-to-speech & assistive software jobsagoodun Calibre 4 04-08-2016 09:48 PM
Pause/Play button for audio player in background leo315 enTourage Archive 0 09-12-2010 10:26 PM
Calibre Reader - text to speech on Mac? wurliuchi Calibre 2 05-30-2010 02:18 PM


All times are GMT -4. The time now is 12:45 PM.


MobileRead.com is a privately owned, operated and funded community.