batterseapower / pinyin-toolkit

A plugin for the Anki Spaced Repetition System (http://ichi2.net/anki/)
http://batterseapower.github.com/pinyin-toolkit/
39 stars 14 forks source link

Better Audio Files in Distribution #8

Open batterseapower opened 15 years ago

batterseapower commented 15 years ago

Best alternative we have at the moment is the Chinesepod files which can be downloaded freely here: http://chinesepod.com/resources/pronunciation

License prohibits distribution so we can't include them. Not clear whether we can auto-download them (perhaps...) But certainly can't work on them.

I have included a full account of how to automatically remove the gaps at start and end of files and speed them up. The resulting quality is very high and files are only around 10Mb in size.

Nick3C commented 15 years ago

I could also include instructions to create 5th tone files as well. If we speed them up more, soften and deaden them then this will work alright I think.

Nick3C commented 15 years ago

A note on the upgrade path for users with media in the form: "[sound:ni3.ogg][sound:hao3.ogg]" I think the best way to do this is to onfocuslost so that it check whether the media files listed in audio exist or not. It can then remove the tag for any media file that doesn't exist (and tag it 'Missing Media' or whatever tag Anki usually uses for this). This check must be done before dictionary-lookup etc (at least before the normal audio fill so that it can blank and populate in one onfocuslost)

What this means is that if a user deletes media in the .media directory then PyKt will pick this up when those cards are edited (or a deck-fill is carried out) and blank the field. The updater will then add in the media but only if the field is totally blank (so if it contains other user-generated media this is preserved)

This is actually a good thing to do in and of itself as it tidies up any problems with the media as we go along.

Nick3C commented 15 years ago

Also, I think that the Mandarin sound "me.mp3" is actually "me4.mp3".. I have renamed "le.mp3" too (otherwise it takes priority for my sentences [and my chinesepodmodified files are wayyyyyy better for phrase generation because of the speed).

By the way. Randomisation is still not working (although I quite like this fact in some ways because my preferred sound file is at the top of the list ) :)

batterseapower commented 15 years ago

Pretty sure that randomisation does work, but rememeber that it only applies to break ties where several packs are just as good as each other. If one pack has more necessary sounds than another then we always prefer it.

Nick3C commented 15 years ago

Ah right, I was just surprised I had never got my male speaker but checked and found a filename issue (extra "M" that needed removing). done now.

I am going to stop using the Chinese Sounds files. The quality isn't up to it compared to the other files around. I have 3 alternative sets that are primed for Anki now...

One of the three random ones is a man, sure I would notice the difference :)

batterseapower commented 15 years ago

Where did you get the other sound packs from? Wenlin?

Nick3C commented 15 years ago

yup, although I had to convert them in the same way as the chinesepod. If you don't do that step then they are not really good enough for sentence-text-to-speech (because they are too slow). Somewhere I have filed a bug-report for wanting to speed up audio (as I said i think the way forward is to estimate the length of the audio then start playing one file before the next has finished)

cburgmer commented 15 years ago

I don't know if I mentioned it, but Eclectus has a importer script for the SWAC index. You just run buildtables.py on the untared directory and it will create a sql table mapping pinyin (with numbers i think) to the relative audio path.

cburgmer commented 14 years ago

Guys, just wanted to inform you that Shtooka has a list of > 8000 words for some weeks now.