How to add Google Translate to ANKI
Hi there,
I would like to add GOOGLE TRANSLATE (speech / pronounciation only) to my Spanish ANKI deck.
What is the proper way to do this?
I know it is "somehow" TTS but can't seem to get it working properly.
I am on ANKI 2.19.
Thanks.
Werner
Comments are closed, but you can start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by kelciour on 28 Jun, 2020 02:27 PM
Either install the AwesomeTTS add-on or gTTS add-on - https://ankiweb.net/shared/info/391644525
But since you're on Anki 2.1.19, the only option is AwesomeTTS, either with on-the-fly playback or from the card browser.
2 Posted by Werner Krag on 28 Jun, 2020 03:11 PM
Thank you for your answer.
I appreciate it.
I installed awesome TTS.
I have my Spanish on the backside of all cards (front side is German (my
native tongue).
Selected "backside" on the appearing menu for TTS.
BUT: the pronounciation is awful. It does not sound like Spanish at all.
It sounds like German.
Is there a better solution?
Thanks.
Werner
On 28.06.2020 16:27, kelciour wrote:
3 Posted by Werner Krag on 28 Jun, 2020 03:25 PM
I got to work now. I needed to select the SPANISH pronoounciation.
It is working with good pronounciation now.
BUT: Some cards DO play the sound, some not.
Do I need to add awsome TTS to every single card or can I have that as a
general rule for all cards (backside)?
Thanks.
Werner
On 28.06.2020 17:11, Werner Krag wrote:
4 Posted by kelciour on 28 Jun, 2020 03:49 PM
If you used the add-on from the card browser to batch generate the audio files and there were no errors, maybe the field that contains the audio wasn't added to the card template.
[sound:...]
tag.{{Field Name}}
or using Add Field button.5 Posted by Werner Krag on 30 Jun, 2020 08:18 AM
It is working now, BUT:
every time a card is produced, it is adding the text of the backside of
the card again.
In other words:
Every time I review a card, the sound is played (good) but the text of
the card is somehow added again.
Therefore a card after reviewing it several times, looks like this:
Hola, que tal?
Hola, que tal?
Hola, que tal?
and so forth.
On 28.06.2020 17:49, kelciour wrote:
6 Posted by kelciour on 30 Jun, 2020 09:11 AM
Can you show the card template window?
If the same text appeared only a few times, it'd be easy to solve by removing extra {{Field}} from the card template, i.e. something similar to https://anki.tenderapp.com/kb/problems/extra-characters-appearing-o..., but I guess this case is different since the text is being dinamically added on every review.
Maybe there's another add-on that is buggy but I'm not aware of any add-ons that can produce such results.
Long story short, it might be easier to solve if I could see the card template.
7 Posted by Werner Krag on 05 Jul, 2020 01:26 PM
Thank you for your help.
Sorry, I am late to answer but I was out of town.
Well, I still can't get it to do what I want.
The front side is no problem, I am just giving the German sentence.
The back side is more complicated:
I have the Spanish translation, BUT also sometimes remarks to help me
remember the word(s) or a sentence.
This could be a mnemonic, a little story or just another word to help me
remember.
Therefore would I would like to do is something like this:
-----------------------------------------------
Front: Heute ist das Wetter gut
Back: Hoy, hace buen tiempo.
Remarks: "Tiempo" = Wetter oder Zeit
------------------------------------------------
The last line will give me some additional hints for learning.
Sometimes this will be just one line, sometimes 2 or more lines (if it
is a story)
Naturally, I ONLY want the pronunciation of the first line of the
backside: "Hoy hace buen tiempo".
Can this be done?
Thanks.
Werner
On 30.06.2020 11:11, kelciour wrote:
8 Posted by kelciour on 05 Jul, 2020 04:48 PM
Yes, this can be done.
It's not clear from the message, maybe the field already exists, but in addition to the Front and Back field create a new field called "Remarks".
Update the card template and add
{{Remarks}}
to the Back Template.Use the card browser to browse through all your notes and manually cut remarks from the Back field and paste them in the Remarks field.
This way the Back field and pronunciation won't contain remarks, but remarks will be still visible on the card template.
I've attached two pictures for the first two steps.
It might be possible to split the Back field automatically by the first line, but it's complicated. Without looking at the notes and the underlying HTML, I can only provide a general solution, that might work for some notes or not work at all. It'll be in the next message.
9 Posted by kelciour on 05 Jul, 2020 05:59 PM
To try to split the Back field automatically
Try the script in a new Anki profile at first.
1.1. File - Export to export your entire collection
https://docs.ankiweb.net/#/files?id=backups
1.2. File - Switch Profile - create a new profile and import your exported collection.
Press
Ctrl + Shift + J
or (Cmd + Shift + J
on Mac) to open the Debug Console.https://docs.ankiweb.net/#/misc?id=debug-console
Copy-paste the whole text file from the link in the Debug Console.
https://gist.githubusercontent.com/kelciour/e3cd14d3dbca122482249c8...
Open the card browser and search for notes that you want to be processed by the script, for example, by clicking on a deck.
Copy the search string from the card browser, go back to the Debug Console and paste it in BROWSER_SEARCH_QUERY instead of
deck:Default
.Press
Ctrl+Enter
orCmd+Enter
to run the script.The script will create 2 new fields, one for the copy of the Back field and one for the new field with the remarks, then will try to split the Back field. After it's finished working, maybe in a few seconds, go back to the card browser and check a few notes. If it's okay, rerun the script in your main Anki profile.
10 Posted by Werner Krag on 05 Jul, 2020 09:17 PM
Thanks a lot!
i will try this now.
Werner
On 05.07.2020 18:48, kelciour wrote: