01-04-2021, 05:24 PM | #1 |
Member
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.
|
01-05-2021, 12:17 AM | #2 |
creator of calibre
Posts: 44,572
Karma: 24495948
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
|
Advert | |
|
01-05-2021, 05:12 AM | #3 |
Member
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
|
|
01-05-2021, 06:51 AM | #4 |
creator of calibre
Posts: 44,572
Karma: 24495948
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. |
01-05-2021, 07:05 AM | #5 | |
Member
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
|
Quote:
Can you make it toggle between Play and Pause? |
|
Advert | |
|
01-05-2021, 07:16 AM | #6 |
creator of calibre
Posts: 44,572
Karma: 24495948
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.
|
01-05-2021, 07:28 AM | #7 |
Member
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
|
My Bose QC35 generates MediaPlayPause but as far as I can tell Calibre hears "Media Play". I'm on Windows 10.
|
01-05-2021, 08:05 AM | #8 |
creator of calibre
Posts: 44,572
Karma: 24495948
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.
|
01-05-2021, 08:29 AM | #9 |
Member
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"?
|
01-05-2021, 08:50 AM | #10 |
creator of calibre
Posts: 44,572
Karma: 24495948
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.
|
01-05-2021, 08:55 AM | #11 |
Member
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?
|
01-05-2021, 01:49 PM | #12 |
Wizard
Posts: 1,090
Karma: 1221485
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. =) |
01-05-2021, 05:07 PM | #13 | |
Member
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
|
Quote:
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 05:11 PM. |
|
01-05-2021, 11:13 PM | #14 | |
creator of calibre
Posts: 44,572
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
|
|
01-08-2021, 04:40 AM | #15 | |
Member
Posts: 15
Karma: 10
Join Date: Jun 2011
Device: none
|
Quote:
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. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Viewer Plugin] Text to Speech | chye | Plugins | 19 | 10-24-2020 05:09 AM |
Text to Speech of Calibre PDF on a Kindle | petey64 | Calibre | 1 | 11-19-2019 12:22 PM |
Calibre ebook-viewer support for NVDA / text-to-speech & assistive software | jobsagoodun | Calibre | 4 | 04-08-2016 10:48 PM |
Pause/Play button for audio player in background | leo315 | enTourage Archive | 0 | 09-12-2010 11:26 PM |
Calibre Reader - text to speech on Mac? | wurliuchi | Calibre | 2 | 05-30-2010 03:18 PM |