Template talk:audio
region codes
editAre the region codes optional (i.e. -us- and -uk-?) --Connel MacKenzie 05:11, 9 May 2005 (UTC)
- I'd imagine it depends on what you've done with the file. If the pronunciations are significantly different, then it would be prudent to put -us- or -uk- in the name of the file when you upload it. That's a naming scheme matter though, really, the template just links to whatever the file is called. If you name it "flooglni.ogg", you have to link to that. --Wytukaze 13:22, 24 May 2005 (UTC)
- For a language like English with several regional standards I would make them mandatory (though for a language with only one standard, I would make it optional, and only put it in for dialect pronunciations). For example just about any word with a low back vowel or an r or a medial t in it is going to sound markedly different on either side of the pond, and even for words ostensibly phonemically identical will sound different. —Muke Tever 15:14, 30 May 2005 (UTC)
- Well, I was trying to use the region code to identify the speaker (the person being recorded.) Does this mean we will need multiple sound files for most words? I guess that is a Good Thing (tm). I think I too favor the region codes being mandatory for en: pronunciations. --Connel MacKenzie 18:08, 30 May 2005 (UTC)
Sound pronunciation
editAre there any articles with sound pronunciation for the word? Is it possible for myself to record and submit a word pronunciation? Thorpe 12:06, 7 August 2005 (UTC)
- Yes; any article on this list (of articles that reference Template:audio) has a pronunciation; given the poor state of the links table lately there's probably a lot more. (There are not too many yet though, as the enthusiasm for this is still new). It's possible for anyone to record and submit pronunciations of words, but don't upload them here: they belong on commons: so all the wiktionaries can use them. For details see Commons:Pronunciation files requests. —Muke Tever 20:33, 7 August 2005 (UTC)
A better version
editGet an admin to add this:
/* Class for links with loudspeaker icon next to them */ .audiolink a { background: url("http://upload.wikimedia.org/wikipedia/commons/f/f7/Loudspeaker.png") center left no-repeat !important; padding-left: 16px !important; padding-right: 0 !important; }
to the site's Mediawiki:Common.css,
then change this template from:
[[Image:Loudspeaker.png| ]] [[Media:{{{1}}} |{{{2}}}]] ...
to:
<span class="audiolink">[[:Media:{{{1}}}|{{{2}}}]]</span> ...
and you will have a nicer pronunciation link with a clickable speaker. See w:Template:audio. Omegatron 05:15, 25 February 2006 (UTC)
- I [updated the CSS] this a minute or two ago. I'd like to wait one day (for most people to inadvertently clear their cache) before updating this template. --Connel MacKenzie 16:02, 25 August 2006 (UTC)
- If you're going to use the 20px image, you need to set the padding larger, too. Try this:
.audiolink a { background: url("http://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Loudspeaker.svg/20px-Loudspeaker.svg.png") center left no-repeat !important; padding-left: 22px !important; padding-right: 0 !important; }
I've been bold with this regarding the suggestion in the Grease pit. --Connel MacKenzie T C 13:47, 7 June 2006 (UTC)
Player
editIf you use :Image: instead of :Media: a player appears. Just like this:
Are you interested in having this? --Steinninn 00:39, 21 September 2007 (UTC)
- Oh my god yes. Unless there is some persuasive techy reason not to. -- Visviva 01:39, 21 September 2007 (UTC)
- That button is enormous.
- The normal invocation of the Java run-time is too significant.
- The regular (native) player(s) should be used. People should have .ogg codecs; if they are on crippled PCs, they should download the correct player from the help link.
- If they still have problems, they can follow the [file] link, and use the same player on commons.
- The player (I think) uses the already overburdened (I/O starvation) toolserver. Streaming audio is cute and all, but...
- Streaming doesn't make sense for small-ish pronunciation files.
- FF locks up when you start playing one via Java.
- e.g.
Gesualdo-moro lasso al mio duolo 2:40: (file) - --Connel MacKenzie 07:39, 21 September 2007 (UTC)
- I also thought it was too big. But it can be modified, compare is:Snið:hljóðskrá and is:íslenska, best regards, --birdy (:> )=| 22:19, 2 October 2007 (UTC)
PAGENAME as default for two
editNoting per WT:TODO#audio files that some templates are missing the {{{2}}} parameter all together, why not have PAGENAME as the default? I actually thought it already was. Mglovesfun (talk) 18:36, 14 March 2010 (UTC)
- Sounds good. —Internoob (Disc•Cont) 00:48, 22 March 2010 (UTC)
Upper case
editI propose that we should use {{ucfirst:{{{2}}}}} instead of {{{2}}} in order to make it always capitalized. —Internoob (Disc•Cont) 00:48, 22 March 2010 (UTC)
Player options box
editThe player options box (found by clicking the play button and then "Options") is too narrow with content overflowing the box. This is easily seen by doing showing the box for both players found in Template_talk:audio#Player above. The first one looks right and the second one is too narrow. Not sure how to fix. --Bequw → τ 16:31, 2 May 2010 (UTC)
- In the source code for Template:audio there is a restriction to make the button 50px. If you take it out I believe that would fix the problem with the options box being too small. It automatically becomes 40px. If you notice on wikipedia's example the audio box is 200px and the options is 190px. So, I think alternatively you could find the code for the options and make it so that it is a set width, larger than 40px. Probably the best solution for now is to take out the 50px restriction. Yes, it will make the button wider and more "enormous," but who cares? If the options are to have a large button and readable text or a small button and overflowing text, doesn't it seem like the best solution is to have a large button? As soon as you click on it the audio box becomes just as large either way. --Redbmk → τ 21:19, 5 August 2010 (UTC)
- I wrote a sample template just to show what happens if you remove the 50px restriction. Could someone please point me to where to find Wiktionary classes? It might be possible to modify what happens to the "audiofile" class in order to make the options menu larger even if the image is set to a smaller size. I'd like to at least play around with some different options.
--Redbmk → τ 22:54, 5 August 2010 (UTC)Gesualdo-moro lasso al mio duolo 2:40 (file) - Wiktionary classes are found at Mediawiki:Common.css. I think the extra-large button would put too many people off. There should be another way. --Bequw → τ 04:55, 6 August 2010 (UTC)
Problem accessing the volume control
editWhen I hover the mouse pointer above the speaker symbol the vertical volume control bar appears, however, as I move the pointer up into that bar it disappears. I'm using Firefox and Windows. __meco 13:58, 4 October 2010 (UTC)
Double playback
editWhen using the audio playback on latest Firefox under latest Fedora 12 (Firefox 3.5.15/Fedora 12), the first invocation (press of the small play button) plays correctly, but the subsequent replays (with the full play/pause and progress bar) gives a short, doubled playback. This seems to have been a problem for a while (several months at least). Please let me know if I may assist in further tracking this down, or if there is another, more specific place to log a bug.
Briefly in haste,
That button is way too big
edit...and we've got this "button inside a button" effect going. Since the blue thing already looks like a button, can't we get rid of the visible part of the outside button through CSS, and put the thing back onto one line?
Current design | Proposed design | ||||||
|
CSS:
.audiofile{padding:0px}.audiofile button{cursor:pointer;border-width:0px;margin:0px;padding:0px;background-color:white;}
Template wikitext:
{{#if:{{{1<noinclude>|Example.ogg</noinclude>}}}|<table class="audiotable" style="vertical-align: top; display:inline-block; list-style:none;line-height: 1em;"><!-- --><tr><!-- --><td class="unicode audiolink">{{{2|<noinclude>{{{2}}}</noinclude>}}}</td><!-- --><td class="audiofile">[[Image:{{{1|Example.ogg}}}|22px|noicon]]</td><!-- --><td class="audiometa" style="font-size: 80%;">([[:Image:{{{1|Example.ogg}}}|file]])</td><!-- --></tr></table>}}<noinclude>{{documentation}}</noinclude>
--Yair rand 10:44, 13 July 2011 (UTC)
- Support. --Vahag 11:08, 13 July 2011 (UTC)
- Support, if this is the best way to accomplish the result and as a stopgap. DCDuring TALK 14:03, 13 July 2011 (UTC)
- Support. --Bequw → τ 02:34, 15 July 2011 (UTC)
- Support. --Daniel 02:37, 15 July 2011 (UTC)
- Done. --Yair rand 13:19, 17 July 2011 (UTC)
Microformats
editWe should probably implement hAudio microformats via the audio templates. Reference draft rfc: http://microformats.org/wiki/haudio This would also be helpful for the Wiktionary app's soundfile functions. - Amgine/ t·e 00:27, 16 April 2012 (UTC)
(file) link
editCan we get rid of the "(file)" link in this template? There's already a link to the file in the "More" menu ("About this file"), so it isn't really necessary. --Yair rand (talk) 00:44, 18 April 2012 (UTC)
- Anyone have an opinion on this? --Yair rand (talk) 20:45, 19 September 2012 (UTC)
- Since there appear to be no objections, I've made the change. --Yair rand (talk) 21:57, 15 October 2012 (UTC)
- There weren't any objections because no one has seen this message. The button "More" works only with JavaScript turned on. Without JS no one can even listen or download the file. Maro 19:24, 31 October 2012 (UTC)
- Okay, so how about we hide it only for users with JS?
.client-js .audiometa {display: none;}
--Yair rand (talk) 19:27, 31 October 2012 (UTC) - And for that matter, we should probably hide the button for users without JS:
.client-nojs .audiofile {display: none;}
--Yair rand (talk) 19:58, 31 October 2012 (UTC)- If it's possible, why not? Maro 16:20, 1 November 2012 (UTC)
- Done. --Yair rand (talk) 19:29, 1 November 2012 (UTC)
- If it's possible, why not? Maro 16:20, 1 November 2012 (UTC)
- Okay, so how about we hide it only for users with JS?
- There weren't any objections because no one has seen this message. The button "More" works only with JavaScript turned on. Without JS no one can even listen or download the file. Maro 19:24, 31 October 2012 (UTC)
- Since there appear to be no objections, I've made the change. --Yair rand (talk) 21:57, 15 October 2012 (UTC)
Categorisation
editCould an admin please add the following to this template, before the <noinclude>?
<includeonly>{{#if:{{{lang|}}}|[[{{catlangcode|{{{{{lang}}}}}|pronunciations}}]]|}} [[Category:Words with audio pronunciation|{{PAGENAME}}]]</includeonly>
- Amgine/ t·e 22:05, 24 April 2012 (UTC)
- Some problems with that:
{{catlangcode}}
would remove the prefix for English.- "pronunciation" is lowercase.
- The language code is being transcluded, which would result in the language name being fed to the catlangcode template. (Is that deliberate?)
- None of the categories for <prefix>:pronunciation exist.
- "Terms" is used instead of "Words" for category names, generally.
- What would be the point of this?
- --Yair rand (talk) 22:50, 24 April 2012 (UTC)
- (Discussing this in the Beer Parlour before implementation might be a good idea, by the way. --Yair rand (talk) 22:53, 24 April 2012 (UTC))
Slowness
editI don't know if this has been raised elsewhere, but usage of this template adds 2-3 seconds to the DOM load time. --Ivan Štambuk (talk) 08:09, 27 February 2013 (UTC)
Need Help
editNeed more file to play one by one , like {{audio|<name of sound file 1>, <name of sound file 2>, <name of sound file 3>...|<text to use as link to soundfile>}}, Need your help, please. Thank you. Ianbu (talk) 13:32, 13 August 2013 (UTC)
Categorization
editShould be ported to Lua, and autocategorize into Category:Terms with audio links by language according to the language code in the first two letters of the filename. --Ivan Štambuk (talk) 06:07, 13 December 2013 (UTC)
- I second this request. Probably a clean-up of entries using it will be required. Current 884 Russian entries in Category:Russian terms with audio links were done manually, mostly by me. It could be a time-saver. --Anatoli (обсудить/вклад) 06:15, 13 December 2013 (UTC)
Extension
editWhat extension is behind this audioplayer?--Juandev (talk) 11:01, 17 February 2014 (UTC)
The following discussion has been moved from Wiktionary:Requests for cleanup.
This discussion is no longer live and is left here as an archive. Please do not modify this conversation, but feel free to discuss its conclusions.
My, what an ugly, space-consuming image. The old version was way better than this monstrosity. Does anyone have any better ideas? DCDuring TALK 01:53, 12 March 2010 (UTC)
- It looks fine to me. It's a play button, what else would it look like? ---> Tooironic 21:11, 15 March 2010 (UTC)
- It could look like a button that actually fits on one line, rather than a massive multi-line mess. Oh, and did anyone notice that clicking "more" after the audio starts makes the whole thing look ridiculous since the button (and thus the player) is inside a cell? And the fact that the (file) link is unnecessary because one could easily go to the same page by clicking "more" and then clicking "about this file"? But the real problem is that it takes up two lines. --Yair rand 00:46, 18 March 2010 (UTC)
- The cell is opaque too, which causes some problems, and the thing itself somehow makes table cells extremely wide, and tall, and somewhat silly-looking. --Yair rand 22:49, 18 March 2010 (UTC)
- On my screen at least, it pushes everything onto two lines instead of the previous one. Mglovesfun (talk) 23:52, 20 March 2010 (UTC)
- I've got Firefox, and see the same as Gloves. Still think it's an improvement, tho--Rising Sun talk? contributions 01:51, 21 March 2010 (UTC)
- Resolved, IMO. DCDuring TALK 20:55, 2 March 2012 (UTC)
- I've got Firefox, and see the same as Gloves. Still think it's an improvement, tho--Rising Sun talk? contributions 01:51, 21 March 2010 (UTC)
- On my screen at least, it pushes everything onto two lines instead of the previous one. Mglovesfun (talk) 23:52, 20 March 2010 (UTC)
Wrong size of the control bar of k-player because of wrong calculation of clear-fix element before
editTable with class "audiotable" should have style "border-spacing: 0". DonRumata (talk) 13:18, 9 August 2014 (UTC)
Redundant space when the second argument is missing
editsee აჭარა. --Dixtosa (talk) 16:14, 9 May 2015 (UTC)
- For future reference I have fixed it. Dixtosa (talk) 16:55, 10 September 2017 (UTC)
Formatting issues
editDid something recently happen to this template? It used to be grey, but suddenly it's gone mostly black, which makes it difficult to see the duration of the recording and the "Menu" link. — SMUconlaw (talk) 17:54, 11 February 2016 (UTC)
Confusing example?
editWhile "Bhojpuri" is an excellent word and always enjoyable to say (or hear said), I have to wonder if it might be better to choose a sample word for the English-language audio template documentation that isn't the name of a language other than English. It just seems needlessly confusing to me, seeing "Bhojpuri" in there among documentation of template parameters and language codes. "Wait, if this is in English, then why does it say Bhojpuri?" I found myself briefly wondering, when first looking at the Usage example. -- FeRD NYC (talk) 12:31, 20 July 2016 (UTC)
- Agree. Done. Dixtosa (talk) 14:56, 30 July 2017 (UTC)
Problems with .wav files
edit@CodeCat, Dixtosa: I notice that the template doesn't seem to work properly with .wav files: see reinvent the wheel. Can this be fixed? — SGconlaw (talk) 16:19, 10 September 2017 (UTC)
The following discussion has been moved from Wiktionary:Requests for cleanup (permalink).
This discussion is no longer live and is left here as an archive. Please do not modify this conversation, but feel free to discuss its conclusions.
This template has a somewhat amateurish appearance, at least in FF with Monobook with my browser-option large text size. There is a line on the bottom of what appears and the menu button runs onto the white space. DCDuring TALK 15:12, 9 November 2012 (UTC)
The template doesn't work on anacrusi. It doesn't work on the documentation when displayed at Template:Audio, but works on Template:audio/doc. Hyacinth (talk) 09:18, 18 November 2012 (UTC)
- Reviving this dinosaur. Could this template also add to categories Category:Terms with audio links by language. That would mean that all audiolinks for each language would have language specified - a big cleanup task. --Anatoli (обсудить/вклад) 09:36, 25 April 2013 (UTC)
- Ápparnetly fixed --WF on Holiday (talk) 16:36, 15 September 2017 (UTC)
Fixing multiline-html-table linter error caused by this template
editThis template is the source of a lot of Special:LintErrors/multiline-html-table-in-list errors. This is caused by a newline break before </table> tag. Can someone with edit rights please fix the template? SSastry (WMF) (talk) 18:26, 25 January 2018 (UTC)
- This is a regression caused by https://en.wiktionary.org/w/index.php?title=Template%3Aaudio&type=revision&diff=48471346&oldid=48471325 SSastry (WMF) (talk) 18:40, 25 January 2018 (UTC)
- OK, I’ve made the change. Let me know if the problem is fixed. (I’ve never heard of that error before.) — SGconlaw (talk) 01:11, 26 January 2018 (UTC)
- Yup, looks like all is well again. These linter errors are being identified as part of the plan to replace Tidy on wikimedia wikis. SSastry (WMF) (talk) 15:24, 26 January 2018 (UTC)
- OK, I’ve made the change. Let me know if the problem is fixed. (I’ve never heard of that error before.) — SGconlaw (talk) 01:11, 26 January 2018 (UTC)
Who has designed and supports this?
editThe look of player's menu is absolutely awful, the commonly used contrast "grey or dark grey on black" is very hardly readable and there is no any alternative for people with some visual problems or disabilities. Has someone of developers tried to use the "Settings", where the elements of list are shown in dark grey on black and don't have any tooltips? Settings UI is not resizable, no link to external help for users, no info whether the settings are saved for current session only or for subsequent use etc...
And nobody is interesting in fixing the "echo effect" at start of second and next playing of the same file, the bug which has been noticed more than 10 years ago and still happens on the last Google Chrome. --2A00:1370:8115:53ED:786E:9AE4:4090:1993 08:17, 28 March 2021 (UTC)
- I have copied your comment over to "Wiktionary:Grease pit/2021/March#Who has designed and supports this?" as it is more likely to receive attention there. Please comment further at that page. — SGconlaw (talk) 17:31, 28 March 2021 (UTC)
Add colon if 3rd argument is present?
editSee for instance house#Pronunciation. All other pairs in the pronunciation sections are formatted like "<Key>: <Value>" so the audio stepping out of the line in that regard is irking me strangely. To answer any concerns about double colons, I can run a quick grep on the Wiktionary database dump. Fytcha (talk) 17:25, 31 October 2021 (UTC)
- Editors are manually adding the semicolon to the third argument. We should just add it within the template and make it consistent with the other pronunciation templates. Fytcha (talk) 13:30, 3 November 2021 (UTC)
- @Fytcha: I suggest raising this request at the Beer Parlour so that it can be determined if there is consensus for such a change. — SGconlaw (talk) 16:25, 3 November 2021 (UTC)
- @Sgconlaw: Thanks, will do! Fytcha (talk) 16:26, 3 November 2021 (UTC)
- @Fytcha: I suggest raising this request at the Beer Parlour so that it can be determined if there is consensus for such a change. — SGconlaw (talk) 16:25, 3 November 2021 (UTC)
Interwiki usage
editIs it possible to use this template in a non-English Wiktionary? I am trying add pronunciations to the Swati Wiktionary (ss.wiktionary.org). Fezzy1347 (talk) 12:35, 4 May 2022 (UTC)
- @Fezzy1347: you have to copy the template over to the Swati Wiktionary, and update it to suit your needs. — Sgconlaw (talk) 14:14, 4 May 2022 (UTC)
- @Sgconlaw, I did that a few hours ago and gave up when I realised that the template invokes another template (Template:catlangname), which in turn seemingly invokes other templates. Let me try copying the other templates for now. Fezzy1347 (talk) 14:46, 4 May 2022 (UTC)
Audio doesn't align
editThe audio doesn't align if placed with a blullet point before it. This can be fixed by changing this line from the template:
vertical-align: bottom;
to
vertical-align: middle;
Ysrael214 (talk) 08:05, 19 September 2022 (UTC)
- @Ysrael214: thanks. I've made the change. — Sgconlaw (talk) 20:39, 19 September 2022 (UTC)
Style for short audios
editM @Benwing2, is there a style with just an icon (like wikt:el:Template:audio with phonos) for very short audios of some seconds? eg. {{audio}}
for word pronunciations and {{listen}}
for longer durations (music, sounds, recitations of examples or texts)? Just an idea. Which I am sure has been discarded at some Discussion already... ‑‑Sarri.greek ♫ I 14:55, 4 June 2024 (UTC)