-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge https://github.com/stakira/OpenUtau into C+V
- Loading branch information
Showing
49 changed files
with
1,633 additions
and
775 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
OpenUtau.Core/DiffSinger/Phonemizers/DiffSingerJyutpingPhonemizer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using IKg2p; | ||
using OpenUtau.Api; | ||
using Pinyin; | ||
|
||
namespace OpenUtau.Core.DiffSinger { | ||
[Phonemizer("DiffSinger Jyutping Phonemizer", "DIFFS ZH-YUE", language: "ZH-YUE")] | ||
public class DiffSingerJyutpingPhonemizer : DiffSingerBasePhonemizer { | ||
protected override string GetDictionaryName() => "dsdict-zh-yue.yaml"; | ||
protected override string GetLangCode()=>"yue"; | ||
protected override string GetLangCode() => "yue"; | ||
protected override string[] Romanize(IEnumerable<string> lyrics) { | ||
List<G2pRes> g2pResults = ZhG2p.CantoneseInstance.Convert(lyrics.ToList(), false, false); | ||
return g2pResults.Select(res => res.syllable).ToArray(); | ||
return Pinyin.Jyutping.Instance.HanziToPinyin(lyrics.ToList(), CanTone.Style.NORMAL, Pinyin.Error.Default).Select(res => res.pinyin).ToArray(); | ||
} | ||
} | ||
} |
Oops, something went wrong.