Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FixTtsPriority #1866

Merged
merged 2 commits into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Content.Server/SS220/TTS/TTSSystem.Sanitize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ private void OnTransformSpeech(TransformSpeechEvent args)
private string Sanitize(string text)
{
text = text.Trim();
text = Regex.Replace(text, @"(?<![a-zA-Zа-яёА-ЯЁ])[a-zA-Zа-яёА-ЯЁ]+?(?![a-zA-Zа-яёА-ЯЁ])", ReplaceMatchedWord, RegexOptions.Multiline | RegexOptions.IgnoreCase);
text = Regex.Replace(text, @"[^a-zA-Zа-яА-ЯёЁ0-9,\-+?!. ]", "");
text = Regex.Replace(text, @"[a-zA-Z]", ReplaceLat2Cyr, RegexOptions.Multiline | RegexOptions.IgnoreCase);
text = Regex.Replace(text, @"(?<![a-zA-Zа-яёА-ЯЁ])[a-zA-Zа-яёА-ЯЁ]+?(?![a-zA-Zа-яёА-ЯЁ])", ReplaceMatchedWord, RegexOptions.Multiline | RegexOptions.IgnoreCase);
text = Regex.Replace(text, @"(?<=[1-90])(\.|,)(?=[1-90])", " целых ");
text = Regex.Replace(text, @"\d+", ReplaceWord2Num);
text = text.Trim();
Expand Down Expand Up @@ -145,15 +145,15 @@ private string ReplaceWord2Num(Match word)
{"meine", "Майнэ"},
{"hier", "Хие"},
{"dumnkopf", "Думкопф"},
{"dummköpfe", "Думкёпфэ"},
{"dummkopfe", "Думкёпфэ"},
{"schmetterling", "Шмэттерлин"},
{"maschine", "Машинэ"},
{"maschinen", "Машинэн"},
{"achtung", "Ахтунг"},
{"musik", "Музык"},
{"kapitän", "Капитэин"},
{"döner", "Дёнэр"},
{"dankeschön", "Данке Шён"},
{"kapitan", "Капитэин"},
{"doner", "Дёнэр"},
{"dankeschon", "Данке Шён"},
{"gesundheit", "Гесундхайт"},
{"flammenwerfer", "Фламэнверфер"},
{"poltergeist", "Полтэргайст"},
Expand All @@ -172,18 +172,18 @@ private string ReplaceWord2Num(Match word)
{"krankenwagen", "Кранкн Вагн"},
{"auf", "Ау"},
{"wiedersehen", "Фидерзеин"},
{"tschüss", "Чус"},
{"tschuss", "Чус"},
{"tschau", "Чау"},
{"fantastisch", "Фантастиш"},
{"doppelgänger", "Доппэльгнгэа"},
{"doppelganger", "Доппэльгнгэа"},
{"verboten", "Вэрботн"},
{"schnell", "Шнэль"},
{"krankenhaus", "Кранкнхауз"},
{"kugelblitz", "Кьюгельблиц"},
{"ist", "Ыст"},
{"pulkzerstörer", "Пулькцерштёрер"},
{"pulkzerstörers", "Пулькцерштёрер"},
{"pulkzerstörere", "Пулькцерштёрер"},
{"pulkzerstorer", "Пулькцерштёрер"},
{"pulkzerstorers", "Пулькцерштёрер"},
{"pulkzerstorere", "Пулькцерштёрер"},
{"offizier", "Оффизые"},
{"offiziere", "Оффизыер"},
{"offiziers", "Оффизыерс"},
Expand Down
18 changes: 9 additions & 9 deletions Resources/Locale/en-US/accent/german.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ accent-german-words-5 = sausage
accent-german-words-replace-5 = wurst

accent-german-words-6 = sausages
accent-german-words-replace-6 = würste
accent-german-words-replace-6 = wurste

accent-german-words-7 = man
accent-german-words-replace-7 = mann

accent-german-words-8 = men
accent-german-words-replace-8 = männer
accent-german-words-replace-8 = manner

accent-german-words-9 = woman
accent-german-words-9-2 = lady
Expand Down Expand Up @@ -50,7 +50,7 @@ accent-german-words-16 = idiot
accent-german-words-replace-16 = dummkopf

accent-german-words-17 = idiots
accent-german-words-replace-17 = dummköpfe
accent-german-words-replace-17 = dummkopfe

accent-german-words-18 = butterfly
accent-german-words-replace-18 = schmetterling
Expand All @@ -68,10 +68,10 @@ accent-german-words-22 = music
accent-german-words-replace-22 = musik

accent-german-words-23 = captain
accent-german-words-replace-23 = kapitän
accent-german-words-replace-23 = kapitan

accent-german-words-24 = kebab
accent-german-words-replace-24 = döner
accent-german-words-replace-24 = doner

accent-german-words-25 = mouse
accent-german-words-replace-25 = maus
Expand All @@ -80,7 +80,7 @@ accent-german-words-26 = what
accent-german-words-replace-26 = wat

accent-german-words-27 = thank you
accent-german-words-replace-27 = dankeschön
accent-german-words-replace-27 = dankeschon

accent-german-words-28 = thanks
accent-german-words-replace-28 = danke
Expand Down Expand Up @@ -158,7 +158,7 @@ accent-german-words-51 = goodbye
accent-german-words-replace-51 = auf Wiedersehen

accent-german-words-52 = bye
accent-german-words-replace-52 = tschüss
accent-german-words-replace-52 = tschuss

accent-german-words-53 = bye bye
accent-german-words-53-2 = bye-bye
Expand All @@ -168,7 +168,7 @@ accent-german-words-54 = fantastic
accent-german-words-replace-54 = fantastisch

accent-german-words-55 = changeling
accent-german-words-replace-55 = doppelgänger
accent-german-words-replace-55 = doppelganger

accent-german-words-56 = forbidden
accent-german-words-56-2 = prohibited
Expand Down Expand Up @@ -196,4 +196,4 @@ accent-german-words-61-5 = tesla
accent-german-words-replace-61 = kugelblitz

accent-german-words-62 = car
accent-german-words-replace-62 = auto
accent-german-words-replace-62 = auto
22 changes: 11 additions & 11 deletions Resources/Locale/ru-RU/accent/german.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ accent-german-words-replace-4 = scheisse
accent-german-words-5 = сосиска
accent-german-words-replace-5 = wurst
accent-german-words-6 = сосиски
accent-german-words-replace-6 = würste
accent-german-words-replace-6 = wurste
accent-german-words-7 = мужчина
accent-german-words-replace-7 = mann
accent-german-words-8 = мужчины
accent-german-words-replace-8 = männer
accent-german-words-replace-8 = manner
accent-german-words-9 = женщина
accent-german-words-9-2 = леди
accent-german-words-replace-9 = frau
Expand All @@ -34,7 +34,7 @@ accent-german-words-replace-15 = hier
accent-german-words-16 = идиот
accent-german-words-replace-16 = dummkopf
accent-german-words-17 = идиоты
accent-german-words-replace-17 = dummköpfe
accent-german-words-replace-17 = dummkopfe
accent-german-words-18 = бабочка
accent-german-words-replace-18 = schmetterling
accent-german-words-19 = машина
Expand All @@ -46,15 +46,15 @@ accent-german-words-replace-21 = achtung
accent-german-words-22 = музыка
accent-german-words-replace-22 = musik
accent-german-words-23 = капитан
accent-german-words-replace-23 = kapitän
accent-german-words-replace-23 = kapitan
accent-german-words-24 = шашлык
accent-german-words-replace-24 = döner
accent-german-words-replace-24 = doner
accent-german-words-25 = мышь
accent-german-words-replace-25 = maus
accent-german-words-26 = что
accent-german-words-replace-26 = was
accent-german-words-27 = благодарю
accent-german-words-replace-27 = dankeschön
accent-german-words-replace-27 = dankeschon
accent-german-words-28 = спасибо
accent-german-words-replace-28 = danke
accent-german-words-29 = будь здоров
Expand Down Expand Up @@ -109,14 +109,14 @@ accent-german-words-51 = до встречи
accent-german-words-51-2 = Досвидания
accent-german-words-replace-51 = auf Wiedersehen
accent-german-words-52 = пока
accent-german-words-replace-52 = tschüss
accent-german-words-replace-52 = tschuss
accent-german-words-53 = пока пока
accent-german-words-53-2 = пока-пока
accent-german-words-replace-53 = tschau
accent-german-words-54 = фантастика
accent-german-words-replace-54 = fantastisch
accent-german-words-55 = генокрад
accent-german-words-replace-55 = doppelgänger
accent-german-words-replace-55 = doppelganger
accent-german-words-56 = запрещено
accent-german-words-56-2 = запрещён
accent-german-words-56-3 = запрет
Expand Down Expand Up @@ -155,13 +155,13 @@ accent-german-words-66-2 = главой
accent-german-words-replace-66 = offiziers

accent-german-words-67 = шаттл
accent-german-words-replace-67 = pulkzerstörer
accent-german-words-replace-67 = pulkzerstorer
accent-german-words-68-4 = шаттла
accent-german-words-68-3 = шаттлу
accent-german-words-68-2 = шаттлом
accent-german-words-68-1 = шаттле
accent-german-words-replace-68 = pulkzerstörers
accent-german-words-replace-68 = pulkzerstorers
accent-german-words-69 = шаттлов
accent-german-words-replace-69 = pulkzerstörere
accent-german-words-replace-69 = pulkzerstorere

#ss220-deutch-accent-update-end
Loading