Skip to content

Commit

Permalink
fix g2p input bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgitpr committed Aug 9, 2024
1 parent b494994 commit cf04af3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OpenUtau.Core/BaseChinesePhonemizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static string[] Romanize(IEnumerable<string> lyrics) {
var hanziLyrics = lyricsArray
.Where(ZhG2p.MandarinInstance.IsHanzi)
.ToList();
List<G2pRes> g2pResults = ZhG2p.MandarinInstance.Convert(lyrics.ToList(), false, false);
List<G2pRes> g2pResults = ZhG2p.MandarinInstance.Convert(hanziLyrics.ToList(), false, false);
var pinyinResult = g2pResults.Select(res => res.syllable).ToArray();
if (pinyinResult == null) {
return lyricsArray;
Expand Down
2 changes: 1 addition & 1 deletion OpenUtau.Plugin.Builtin/CantoneseSyoPhonemizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public static string[] Romanize(IEnumerable<string> lyrics) {
var hanziLyrics = lyricsArray
.Where(ZhG2p.CantoneseInstance.IsHanzi)
.ToList();
List<G2pRes> g2pResults = ZhG2p.CantoneseInstance.Convert(lyrics.ToList(), false, false);
List<G2pRes> g2pResults = ZhG2p.CantoneseInstance.Convert(hanziLyrics.ToList(), false, false);
var jyutpingResult = g2pResults.Select(res => res.syllable).ToArray();
if (jyutpingResult == null) {
return lyricsArray;
Expand Down

0 comments on commit cf04af3

Please sign in to comment.