Hotkeys and Text-to-Speech

When I go back to view a difficult card, which I have just answered correctly, I like to replay the audio multiple times and speak along because it helps me remember the words (currently I'm tapping left arrow to get back to the card and then right arrow followed by the left arrow to do this--which isn't ideal because it forces me to refocus on the text which has just reappeared and, rarely, causes me to accidentally tap right arrow on my new card).

For sentences that I find particularly difficult I also copy the sentence to google translate and have the sentence spoken there as well. I am inclined to do this because google translate will slow down the text-to-speech audio on the second replay which is helpful when I'm trying to speak along with the sentence.
Ideally, I wouldn't need to use google translate for this purpose, so what I propose is that when you go back to the card that there be a hotkey (perhaps the down arrow) that replays the audio and another (perhaps shift-down arrow) that replays the audio at a slower speed.
These features would mean that I wouldn't need to switch tabs and that I would be able to Lingvist using only the keyboard (this makes me irrationally happy)!

@Damien-Frew could you clarify what platform do you use? Both Web and Android apps have the speaker shaped button, that allows you to repeat the whole sentence and clicking/taping on the word plays that word, so you don't really need to go back and forth with the card. Though, slow paced pronunciation is indeed something that may be helpful and worth considering, for instance Duolingo has this feature.

To clarify, I mean that when using the web platform the only way to repeat the audio, without using a mouse, is to "flicker" the card with the left and right arrows. Given how much lingvist seems to appreciate keyboard users (thank you!!) I thought you might like to know about this use case!

last edited by Damien Frew

@Damien-Frew thanks for the clarification. I see your point now. Lingvist is known to be kinda slow in implementing requests, but you can have that functionality in no time by using this Greasemonkey script:

// ==UserScript==
// @name        play audio keyboard shortcut
// @namespace
// @include*
// @version     1
// @grant       none
// ==/UserScript==

document.addEventListener('keydown', (e) => {
  if(e.keyCode !== 40 || document.querySelector('.context-audio-button.hidden')){
  document.querySelector('.play-audio').dispatchEvent(new MouseEvent('click', {'bubbles': true}))

It is based on the code by @c.partiot from this topic. Arrow down should trigger sentence repeat on answered cards. No pace control so far. Please test, and tell what you think.

This works well, I did have to add some semi-colons to stop the user-script add-on from complaining though.
I completely understand about the delay with official implementation of user requests, thanks for this solution!

Just for the sake of curiosity, I wonder the complains were from Greasemonky or you are using another compatible solution? Semicolons are optional though desirable in JavaScript for the most cases. But, I've got no "complains" during the testing.

I'm using an equivalent called Tampermonkey (can you get Greasemonkey on Chrome?), the script will still work without the semicolons but Tampermonkey's parser will tell you that it is "broken" when you paste it in as a new script. I added the extra information here in case somebody else finds this thread and worries about the errors.

JavaScript really does give us undue freedom sometimes... haha

Looks like your connection to Hotkeys and Text-to-Speech was lost, please wait while we try to reconnect.