You are on page 1of 6

5/20/2017 TextandClozeDeletionConfigurationAwesomeTTSforAnki

AwesomeTTSforAnki
EasilyaddtexttospeechtoyourAnkicards

TextandClozeDeletionConfiguration

Textconfigurationtab

TheTexttaballowsuserstocontrolhowAwesomeTTStransformsincomingtextbeforeitis
senttoaTTSservicetobespoken.

https://ankiatts.appspot.com/config/text 1/6
5/20/2017 TextandClozeDeletionConfigurationAwesomeTTSforAnki

Anumberofsimpletransformationscanbeenabledthatcoversomecommonusecases.
Advanceduserscanalsodefineacustomlistoftextsubstitutionstoperformonincoming
text.

Collectively,theseoptionscanbehelpfulforuserswhokeepsnippetsoftextwithintheirnote
fieldsthattheywantvisuallyonscreenbuteitherdonotwantplayedbackorwantplayed
backinanotherform,particularlywithshareddecksthatmightnothavehadAwesomeTTSin
mind.Userswhoarebuildingupdecksfromscratchmaychoosetokeepnonaudible
snippetsofinformationinseparatenotefieldsfromtheactualspokenlanguagewordsasan
alternativetousingthesefeatures.

HandlingTemplateText
TheseoptionsareusedwheneverAwesomeTTSparsescontentthatcamefromatemplate
(e.g.onthefly<tts>tags).TheseoptionsareappliedafterAnkihasalreadydoneany
neededtemplatesubstitutionsorclozedeletions(i.e.afterthevaluesfromyournotefields
havealreadybeeninjectedintoyourtemplateandafteranyclozedeletionpatternshave
beenturnedintowhatyouseeonscreenwhilestudying).

HandlingTextfromaNoteField
TheseoptionsareusedwheneverAwesomeTTSparsescontentthatcamefromanotefield
(e.g.whenmassgeneratingaudiofilesinthebrowsereditor,orforprepopulatingtheinput
textfieldfromthenotesactivefieldwhenaddingaudiofilesinthenoteeditor).

SimpleOptions
ClozeDeletionHandling

ClozedeletionscanbeusedwithinAnkiforchoppingoutabitoftextinsideofalargernote
thatthestudiermustrecall.FormoreaboutclozedeletionorhowAnkiimplementsitwithin
cards,seetheclozedeletiontopicinthemanual.Theclozeoptionswillletyoucontrolhow
AwesomeTTShandlesthese.

Hello Hello
ifyournotefieldhad
{{c1::world}}! {{c1::world::place}}!

thenonacardfront,Ankiwouldrender Hello[...]! Hello[place]!

https://ankiatts.appspot.com/config/text 2/6
5/20/2017 TextandClozeDeletionConfigurationAwesomeTTSforAnki

thenwithreadhoweverAnkidisplayedit/ Hello...! Helloplace!


readasAnkiwoulddisplayonacard
front,
AwesomeTTSwouldread
orwithreadw/hintwrappedinellipses/
replacew/hintwrappedinellipses, Hello...! Hello...place...!
AwesomeTTSwouldread
orwithreplacew/deletedtext(notes
only), Helloworld! Helloworld!
AwesomeTTSwouldread
orwithreadasanellipsis,ignoringhint/
replacew/ellipsis,ignoringboth, Hello...! Hello...!
AwesomeTTSwouldread
orwithremoveentirely,
Hello! Hello!
AwesomeTTSwouldread

Inaddition,ifyouareusingclozewithontheflyplayback,andyouonlywanttherevealed
texttobespokenontheanswerside(e.g.youhavea<tts>tagaroundthesamefieldon
bothsidesofyourtemplate),youcandosobycheckingForclozeanswers,readrevealed
textonly.

{{hint}}Fields

IfAwesomeTTSencounterstheoutputofa{{hint}}withinoneofyour<tts>templatetags,
youcaninstructAwesomeTTStoomititfromthespokenplaybackbycheckingIgnore
{{hint}}fields.Pleasenotethatthisoptiondoesnotaffectthe"hints"thatareassociatedwith
clozedeletions,butratherspecificallytheuseofthe{{hint}}tag.

CountingAdjacentCharacters

Ifyouusesomecharacterinyournotestodenoteablanktobefilledin,andyouwant
AwesomeTTStotellyouhowmanycharactersthatblankwas,youcanactivatethisfeature.

Forexample,ifyournotesaidThegrassisalways_______ontheother____,andyou
enteredanunderscoreintocountadjacentcharacterswithwrapinellipseschecked,
AwesomeTTSwillreadThegrassisalways...7...ontheother...4...asthe
phrase.

https://ankiatts.appspot.com/config/text 3/6
5/20/2017 TextandClozeDeletionConfigurationAwesomeTTSforAnki

AdvancedHandling

Userconfiguredadvancedsubstitutionlist

Ifyouhavespecificstringsoftextfromyourinputthatyouwanttotransformorremove,you
candosointheAdvancedpanel.

Theregexcheckboxwillallowyoutouseregularexpressionpatternstoperformadvanced
matchingandreplacement.Forexample,manyuserswillfindtheuseof\b(matchaword
boundary)helpfulinformulatingmatchpatterns.Additionally,usersmayusesubstitution
placeholders(e.g.\2)inthereplacementtext.Moreinformationaboutregularexpressions
canbefoundonWikipedia.

Theunicodecheckboxwillenablesomeinternationalfunctionalityforthematcher,suchas
beingabletousemetaclassestomatchnonASCIIalphabeticalcharacters.

Ifyouwanttoremovethematchedtextratherthansubstituteit,youcanleavethesecond
textinputblank.

AwesomeTTSwillruntheserulesintheorderthatyouspecifyafterallthesimpleruleshave
alreadyrun,andwillnormalizewhitespaceandellipsesbeforeeachruleisrun.

OtherNotes
UsuallybutnotalwaysTTSserviceswillinterpretanellipsisasapauseinspeech,
sowrappingclozedeletionsandothersimilarelementscansometimesbeusedtooffset
suchitemsfromtheirsurroundingcontext.Yourmileagewillvarydependingon
sentencestructure,serviceused,andoptionsselected.
AwesomeTTSwillalwaysremove[sound]tagsandHTMLfromeitherkindofinput
source.
Regularbracketedandbracedtextistreatedseparatelyfromanyclozehandlingand
thetwooptionscanbeusedtogetherwithoutconflicting,eventhoughthecloze
https://ankiatts.appspot.com/config/text 4/6
5/20/2017 TextandClozeDeletionConfigurationAwesomeTTSforAnki

functionalityusesthesesymbols.
Whenhandlingtextfromtheclipboard(e.g.forprepopulatingtheinputtextfieldwhen
addingaudiofilesinthenoteeditor),someoptionsfrombothsectionswillbeapplied.
Fortextentereddirectlybytheuser,onlyminimalnormalizationwillbedone(e.g.
removingexcesswhitespace,periods).
Overlappingsymbolsininputtextmayproduceunexpectedresultswhenusingthe
optionstostriptextenclosedbyparantheses,brackets,and/orbraces.Forexample,
Helloworld!(English{somewhat)informal}wouldyieldHelloworld!informal}once
theparenthesesareremoved.
Userswithmultiplerulesconfiguredmightbeinterestedinhowtheyinteractwitheach
other.Therulesarelistedonscreenroughlyintheorderthattheyareapplied,but
specifically,AwesomeTTSwilltransforminputtextusingthefollowingrulesinthe
followingorder:
1.handlingofanyclozefunctionality,asdirectedbytheuser
2.removalofanyhintfieldactivationlinks,always(ontheflyonly)
3.removalofanyhintfieldcontent,ifenabledbytheuser(ontheflyonly)
4.transformationofnewlinesintoellipses,ifenabledbytheuser
5.removalofanyHTMLtags,always
6.removalofany[sound]tags,always
7.removalofanyAwesomeTTSderivedpaths(e.g.fromusingthebarepathoption
fromthebrowsergenerator),always
8.removalofanytextwithinparentheses,ifenabledbytheuser
9.removalofanytextwithinbrackets,ifenabledbytheuser
10.removalofanytextwithincurlybraces,ifenabledbytheuser
11.removalofanyspecificallytargetedcharacters,asdirectedbytheuser
12.countingofanyspecificallytargetedcharacters,asdirectedbytheuser
13.substitutionofanyspecificallytargetedcharacterswithellipses,asdirectedby
theuser
14.listofcustomadvancedsubstitution(orremoval)rules,asdirectedbyandinthe
ordergivenbytheuser
15.collapseofanyexcessellipses(e.g.fromprecedingoptions),always
16.collapseofanycontiguouswhitespacetoasinglespace,always
17.removalofleadingortrailingwhitespace,always

Needhelp?VisittheAnkiAddOnSupportForum.

AwesomeTTSisfreeandopensourcesoftware.
TheaddoncodethatrunswithinAnkiisreleasedundertheGNUGPLv3,andfirstpartywebcodeis

https://ankiatts.appspot.com/config/text 5/6
5/20/2017 TextandClozeDeletionConfigurationAwesomeTTSforAnki

releasedundertheGNUAGPLv3.
Formoreortoobtainsourcecode,visittheAwesomeTTSGitHuborganization.

https://ankiatts.appspot.com/config/text 6/6