[Userscript] Memrise Audio Provider

userscript

(Cooljingle) #1

Readme: https://github.com/cooljingle/memrise-audio-provider/blob/master/README.md
Old forum link: http://web.archive.org/web/20160506154544/http://www.memrise.com/thread/1745286/


Again an "Whoops. Could not load the session. Sorry. " message (Hindi Devanagari)
No audio for "Learn Advanced French • No Typing"
[Feedback] Advanced Japanese Vocabulary course no longer displays phonetic kana readings in reviews
(Anphex) #2

Hello! Lately, I have the issue that my Memrise reviews come to a halt when Audio Provider is enabled. After it plays the audio it doesn’t let me proceed to the next review item and freezes. I am using google tts with Chrome and Tampermonkey.

Edit: Additionally I noticed another weird thing: When starting a review session and the audio provider speaks the displayed word, the word played by clicking the speaker symbol is apparently the next item within the session and not the current/needed one.

Edit2: When having Audio Provider activited, it seems to “hide” my example sentence column. Even when clicking more it doesn’t appear anymore. When turning AP off, it’s there again.


(Cooljingle) #3

I wasn’t able to reproduce your issues but I’ve just changed a bit of the logic which fixed tts but was causing some other weird side effects.

Feel free to try out the latest (0.0.25) and see if things improve!


(Michael Be1234) #4

I am having an issue with the audio dropping after a few prompts. When this happens, the Audio Provider link on the top left disappears. Much thanks for the script, I am also using some of your other scripts and they are all excellent!


(Cooljingle) #5

Glad you like the scripts!
The problem you’ve experienced arises because google tts calls eventually get blocked by google to prevent abuse of their system.

I’ve improved the script by caching and preloading audio behind the scenes so that only one call will get made per unique word; this will help things a lot and you should hopefully get to complete your sessions without the audio cutting out anymore. Latest is v.0.1.0 :raised_hands:


(Michael Be1234) #6

Very slick :smiley: it works perfectly! the best memrise scripts out there :slight_smile: Thanks a lot for the fix!


(Just a regular user) #7

you are genius @cooljingle

I had finally a possibility to use PC and try out this script… awsome


(Baite) #8

Thank you for writing, and then providing both this Audio Provider script and a manual on Github.

There are three audio providers. Is there any way that the user can choose which audio provider is getting used? It would give an opportunity for the user to listen to an alternative audio if the first one is not clear for a particular word.

And, would I be able to modify the script, so it actually will download audio, for example to the download folder?

Sorry I have so many questions!

How does the script choose between the three anyway? First try Speech Synthesis API, if that doesn’t work, the Google TTS API and if that fails Voice RSS?


(Cooljingle) #9

How does the script choose between the three anyway? First try Speech Synthesis API, if that doesn’t work, the Google TTS API and if that fails Voice RSS?

Yep!

Is there any way that the user can choose which audio provider is getting used?

Not right now. Speech Synthesis sounds have the most support in chrome where it’s pretty much identical to google tts, albeit without the call limit. Voice RRS sounds aren’t as clear to me as google tts; also it supports less languages, has its own call limit and requires people to get their own api key to get working. So the source priorities are quite logical to me.

And, would I be able to modify the script, so it actually will download audio, for example to the download folder?

I don’t think that’s possible to automate in just a userscript. You could possibly insert a link to the audio which you could then click to download, but I think it’s probably smarter to run a bulk audio generation program (which has been done).

As an aside, I fixed support for Spanish - latest is 0.1.1


(Baite) #10

Thanks for the sharing.[quote=“cooljingle, post:9, topic:10133”]
So the source priorities are quite logical to me.
[/quote]They are.


(Yuhbn) #11

best script, period. Thank you for spending your value time contributing this awesome script to the community.


(Languagelearner112121221) #12

i just found your code and installed it, but it doesn;t work. Do you have any tips on how to get it to work. I installed tampermonkey. opens the js file in notepad and copied it in tampermonkey.


(Cooljingle) #13

You can try directly installing through the installation link: https://github.com/cooljingle/memrise-audio-provider/raw/master/Memrise_Audio_Provider.user.js


(Casper Duo) #14

The speech quality in Esperanto is very bad. Any way to improve it?


(Cooljingle) #15

For esperanto it would use google text to speech to create the audio - i don’t know of a better alternative but if people know of one I can add it.

I’ve heard that Forvo do higher quality audio but their api isn’t free - $1 a month for 500 requests per day.


(Huntress) #16

Hello, @cooljingle! A big fan of your scripts is here to report that recent memrise update has broken your script. I’m very very sad.


(Cooljingle) #17

I’m sad too :cry:


(Cooljingle) #18

It’s fixed! Latest version 0.1.3

If you have saved choices for the audio column (option on the left) then those will have been wiped out and will need to be reapplied.


(Huntress) #19

Thank you for reacting so fast. But now this script freezes the review session when I make a mistake. Normal review word screen doesn’t show and the only way to continue is to exit the review session completely and start again. With script disabled everything is fine.
Thank you so much for supporting this awesome script.


(Cooljingle) #20

There was an issue affecting just Firefox - hopefully it’s fixed now (0.1.4)