Use it here: ottokafka.github.io/ankiChinesePronuciation
Using Javascript to add voice to Anki.
The Examples below are for Mac OS.
Use to increase learning efficiency for Chinese
This script is used for adding Chinese pronunciation to a Anki cards.
How does it work
Example: nǐ or hǎo
the program will search the word then replacing the special tone mark "nǐ" with a normal character like "ni".
Make sure it worked by opening a text editor and paste the result.
Example: [sound:ni3.mp3] or [sound:hao3.mp3]
If you have see this it's ready to paste into an Anki card to be played.
Mac OS Example: /Users/mymac/Library/Application Support/Anki2/bob/collection.media/
The pinyin sounds can be found in the pinyin directory Note: you must copy the files not the folder because Anki can only read the files and won't see the folder.