Skip to content
Merged
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
12 changes: 6 additions & 6 deletions OpenUtau.Core/Enunu/EnunuRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ struct AcousticResponse {
public AcousticResult result;
}

struct VocoderResult {
struct SyntheResult {
public string path_wav;
}

struct VocoderResponse {
struct SyntheResponse {
public string error;
public VocoderResult result;
public SyntheResult result;
}

static readonly object lockObj = new object();
Expand Down Expand Up @@ -83,12 +83,12 @@ public Task<RenderResult> Render(RenderPhrase phrase, Progress progress, Cancell
var result = Layout(phrase);
if (!File.Exists(wavPath)) {
var config = EnunuConfig.Load(phrase.singer);
if (config.extensions.wav_synthesizer.Contains("vocoder")) {
Log.Information($"Starting enunu vocoder synthesis \"{ustPath}\"");
if (config.extensions.wav_synthesizer.Contains("synthe")) {
Log.Information($"Starting enunu synthesis \"{ustPath}\"");
var enunuNotes = PhraseToEnunuNotes(phrase);
// TODO: using first note tempo as ust tempo.
EnunuUtils.WriteUst(enunuNotes, phrase.phones.First().tempo, phrase.singer, ustPath);
var response = EnunuClient.Inst.SendRequest<VocoderResponse>(new string[] { "vocoder", ustPath, wavPath });
var response = EnunuClient.Inst.SendRequest<SyntheResponse>(new string[] { "synthe", ustPath, wavPath });
if (response.error != null) {
throw new Exception(response.error);
}
Expand Down