Jump to content

Template:TTS

From Philosophical Research
Revision as of 02:25, 4 August 2025 by Reversedragon (talk | contribs) (lang goes on the outside and lang2 goes on the inside)
<onlyinclude>{{#if:{{{href|}}}|[{{{href}}} }}<{{{html|span}}} {{#if:{{{lang|}}}|lang="{{{lang}}}"|}} class="tts {{{class|}}}" {{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}}|{{{tts|}}}{{{2|}}}{{{title|}}}=title{{=}}""|{{{tts|}}}{{{title|}}}=title{{=}}"{{{2|}}}"|{{{2|}}}{{{title|}}}=title{{=}}"{{{tts|}}}"|title{{=}}"{{{title|}}}"}}><span class="visual" aria-hidden="true">{{{1}}}</span><span class="help"> (pronounced </span><i{{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}}|{{{lang2|}}}{{{lang|}}}=data-lang{{=}}""|{{{lang|}}}=data-lang{{=}}"{{{lang2}}}"|{{{lang2|}}}=data-lang{{=}}"{{{lang}}}"|#default=data-lang{{=}}""}} class="aural">{{#switch: {{{ParameterWhichShouldAlwaysBeEmpty|}}} | {{{tts|}}}{{{2|}}} = error: TTS pronunciation missing | {{{tts|}}} = {{{2|error: TTS pronunciation missing}}} | {{{2|}}} = {{{tts|error: TTS pronunciation missing}}} | #default = {{{2|error: TTS pronunciation missing}}} }}</i><span class="help">)</span></{{{html|span}}}>{{#if:{{{href|}}}|]}}</onlyinclude>

Demo

(pronounced <idata-lang="" class="aural">displayed string, plus this text put first to be more TTS-friendly)

(pronounced <idata-lang="" class="aural">displayed string in older style, plus this text only displayed to TTS)

oddly-pronounced word demo: (pronounced <idata-lang="en" class="aural">leet)

Description

This is a template for giving bits of text a TTS pronunciation.

Earlier, aria-label was mistakenly used for this, but it turns out that text substitution for speaking-machines is something that is not currently well-supported in HTML. (This can be a problem when it comes to the temptation to turn everything into "AI" — understanding that every piece of text written by humans is made of arbitrary signifiers, it is incredibly tempting to simply build a dynamic signifier-interpreting agent that actively learns all the exceptions to every rule instead of properly building a system where "dumb" programs or bits of data can easily pass along less-ambiguous messages to each other.)