From 2b6f943418b9348bf99425d763fa2bf32aa235b4 Mon Sep 17 00:00:00 2001 From: Lotte V Date: Sat, 29 Jul 2023 23:22:24 +0200 Subject: [PATCH] Add German phonetic assistant + view model fix --- OpenUtau.Core/Util/LyricsHelper.cs | 6 ++++++ OpenUtau/ViewModels/PhoneticAssistantViewModel.cs | 2 ++ 2 files changed, 8 insertions(+) diff --git a/OpenUtau.Core/Util/LyricsHelper.cs b/OpenUtau.Core/Util/LyricsHelper.cs index 04a5a305c..193cd91b5 100644 --- a/OpenUtau.Core/Util/LyricsHelper.cs +++ b/OpenUtau.Core/Util/LyricsHelper.cs @@ -36,6 +36,7 @@ public Type GetPreferred() { typeof(PinyinLyricsHelper), typeof(ArpabetG2pLyricsHelper), typeof(FrenchG2pLyricsHelper), + typeof(GermanG2pLyricsHelper), typeof(ItalianG2pLyricsHelper), typeof(PortugueseG2pLyricsHelper), typeof(RussianG2pLyricsHelper), @@ -80,6 +81,10 @@ public class FrenchG2pLyricsHelper : G2pLyricsHelper { public FrenchG2pLyricsHelper() : base(new FrenchG2p()) { } } + public class GermanG2pLyricsHelper : G2pLyricsHelper { + public GermanG2pLyricsHelper() : base(new GermanG2p()) { } + } + public class ItalianG2pLyricsHelper : G2pLyricsHelper { public ItalianG2pLyricsHelper() : base(new ItalianG2p()) { } } @@ -96,3 +101,4 @@ public class SpanishG2pLyricsHelper : G2pLyricsHelper { public SpanishG2pLyricsHelper() : base(new SpanishG2p()) { } } } + diff --git a/OpenUtau/ViewModels/PhoneticAssistantViewModel.cs b/OpenUtau/ViewModels/PhoneticAssistantViewModel.cs index 2c8e82d55..bc3851199 100644 --- a/OpenUtau/ViewModels/PhoneticAssistantViewModel.cs +++ b/OpenUtau/ViewModels/PhoneticAssistantViewModel.cs @@ -25,9 +25,11 @@ public G2pOption(Type klass) { private readonly List g2ps = new List() { new G2pOption(typeof(ArpabetG2p)), new G2pOption(typeof(FrenchG2p)), + new G2pOption(typeof(GermanG2p)), new G2pOption(typeof(ItalianG2p)), new G2pOption(typeof(PortugueseG2p)), new G2pOption(typeof(RussianG2p)), + new G2pOption(typeof(SpanishG2p)), }; private Api.G2pPack? g2p;