Re: ankidroid does not play my audio media [sound:{{text:Kana}} - {{text:Expression}}.mp3]

2,928 views
Skip to first unread message

Damien Elmes

unread,
Jan 11, 2013, 5:39:00 PM1/11/13
to anki-a...@googlegroups.com
http://ankisrs.net/docs/manual.html#_media_amp_latex_references

On Saturday, January 12, 2013 4:27:03 AM UTC+9, jim jones wrote:
Hi. I have anki 2 on my windows computer and all the audio files in the collections media folder and every card I have has an audio field with:

[sound:{{text:Kana}} - {{text:Expression}}.mp3]


This way it automatically reads the file name and plays the corresponding sound in the folder so I don't have to individually add ALL my sounds into each card. This works great on anki 2 desktop. But on Ankidroid, even wit hall the media in the collections folder on my android device the sounds will not play. I even press the little Play button on each card and no sound is played. Does anki droid have a problem reading an expression like I used above? I hope not.... Also I noticed on my anki 2 desktop I have the background as a dark brown and text as yellow but on ankidroid the text is yellow but the background changes to white....

Tim

unread,
Jan 11, 2013, 9:42:42 PM1/11/13
to anki-a...@googlegroups.com
Hi Jim,

As per Damien's link, this is not officially supported in Anki. Instead please use the find and replace feature in the Anki browser (with regular expressions) to add the full text filename to the audio field.

Also I noticed on my anki 2 desktop I have the background as a dark brown and text as yellow but on ankidroid the text is yellow but the background changes to white....
There is a bug for card rendering which will hopefully be fixed in the near future

Message has been deleted
Message has been deleted

jim jones

unread,
Jan 12, 2013, 12:08:02 PM1/12/13
to anki-a...@googlegroups.com
How can i create a find and replace formula that will look.at the expression field which has the kanji and also look at the kana field which has the kana and match that to the corresponding mp3 file i have in my media folder which are in the format kanji - kana.mp3 . It would then need to input that file name in each cards audio field. I hope this is possible becauae i cant image going through 10000 cards individually to change each cards audio field.

Tim

unread,
Jan 12, 2013, 1:20:24 PM1/12/13
to anki-a...@googlegroups.com
I don't think you can join fields together with find and replace, but if you can wait a few days I will try to hack together an Anki plugin that will accomplish what you want to do.

jim jones

unread,
Jan 12, 2013, 2:20:21 PM1/12/13
to anki-a...@googlegroups.com
Hi tim thanks for your help. I can def wait for you to.create that anki plugin . Just a mistake i made in my above post ....my sound files are actually named in this format kana - kanji.mp3


Thanks

Tim

unread,
Mar 20, 2013, 12:49:21 AM3/20/13
to anki-a...@googlegroups.com
For future reference, I finished the promised plugin months ago and privately sent it to the user.
I have chosen not to share it publicly because if used incorrectly it could break someone's collection.
Anyone interested in obtaining the plugin can contact me privately and I will be happy to send it to them.

Tim

unread,
Oct 30, 2013, 10:45:12 PM10/30/13
to anki-a...@googlegroups.com
Again for future reference, I've now added the code to github for others to use freely (with caution).

Gary

unread,
Feb 21, 2015, 10:36:24 PM2/21/15
to anki-a...@googlegroups.com
Hi Tim

Just loaded Anki and got a shared deck called HSK for Chinese Language.  I am having problem with sound on my Samsung Galaxy Note3.  The sound plays okay on the Mac desktop but not in AnkiDroid.  I have checked the format of the sound field and looks correct to me e,g, [sound:tmpf4_735.mp3] BUT this file name has been changed in media collection folder in the phone during the websync process to just a string of numbers and character.  I suspect that this may be part of the import process where the sound file has been converted to the samsung media player filename format. Is there a way to stop the filename being changed?

Houssam Salem

unread,
Feb 23, 2015, 4:42:54 PM2/23/15
to anki-a...@googlegroups.com, gary...@gmail.com
On which client did you do the import? If you do a media check, does it resolve the problem?

gary...@gmail.com

unread,
Feb 24, 2015, 1:57:05 AM2/24/15
to anki-a...@googlegroups.com, gary...@gmail.com
Hi Houssam

The audio worked initially when I only use AnkiDroid.  

Later, I installed Anki on my iMac and import was done on the iMac.  Then I sync this with Ankiweb via iMac.  Then when I sync the Samsung with AnkiWeb, the sound could not be played.  I looked in the default sound media player on phone and I can see all the sound media files in the player and it played okay on the media player.  When I looked in Container.media on the phone, the filenames have been changed and so Anki could not locate the file to play.  The filenames are only changed for .mp3 files and not the .wav files.  The .wav files are not affected.

Did a Check media and it return 7K files are not used by any cards (obviously as the filenames have been changed).

So how to bypass this problem of mp3 getting imported into the default sound player and in the process getting the filename changed?  I set up Anki on a Windows program and import the deck to Windows.  Then hook up the phone via USB to the Windows computer and transferred the files from Windows Container.media to the phone folder of the same name.  The process took a long time but the sound files works on the phone after that.
Reply all
Reply to author
Forward
0 new messages