Skip to content

Commit

Permalink
Fixed Escola Primária and É (closes #18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Maçãs authored and Ricardo Maçãs committed Apr 11, 2024
1 parent 5a2ad55 commit 2382ea7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/makeTTS.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ module.exports = (p, modes = {}) => {
thisString = thisString.replace(regex, "Escola ");
regex = /(?<=Escola\s)Prep(\s|$)/giu;
thisString = thisString.replace(regex, "Preparatória ");
regex = /(?<=Escola\s)Prim(\s|$)/giu;
thisString = thisString.replace(regex, "Primária ");
regex = /(?<=Escola\s)Cond(\s|$)/giu;
thisString = thisString.replace(regex, "Condução ");
regex = /\bPSP\b/giu;
Expand Down Expand Up @@ -833,6 +835,8 @@ module.exports = (p, modes = {}) => {
/* Celsius correction */
regex = /\s[A](\s|$)/giu;
thisString = thisString.replace(regex, " Á ");
regex = /\s[E](\s|$)/giu;
thisString = thisString.replace(regex, " É ");
regex = /(?<=[\d])\s*[C](\s|$)/giu;
thisString = thisString.replace(regex, " Cê ");
regex = /(^|\(|\s)[C](\s|$)/giu;
Expand Down

0 comments on commit 2382ea7

Please sign in to comment.