Skip to content

Commit

Permalink
Fixed crashing in sample play at VoicersWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
EX3exp committed Oct 19, 2024
1 parent 38c38e0 commit 04f6b30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Mirivoice/Engines/TTS/EngineVITS2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public override void Inference(string ipaText, string cacheFilePath, int spkid,
Log.Error("EngineVITS2 is not initialized.");
return;
}

Tensor<long> phonemeIds = GetText($"{configVITS2._pad}{ipaText}");

// expand dimensions
Expand Down
8 changes: 6 additions & 2 deletions Mirivoice/Mirivoice.Core/Format/Voicer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,16 @@ public void Inference(string ipaText, string cacheFilePath, LineBoxView l, int s
Log.Error("Engine is not initialized.");
return;
}
Log.Debug($"speed: {l.Exp.VITS2Speed}, noise1: {l.Exp.VITS2Noise1}, noise2: {l.Exp.VITS2Noise2}");
Engine.Inference(ipaText, cacheFilePath, sid, l.Exp);
if (l != null)
{
Log.Debug($"speed: {l.Exp.VITS2Speed}, noise1: {l.Exp.VITS2Noise1}, noise2: {l.Exp.VITS2Noise2}");
Engine.Inference(ipaText, cacheFilePath, sid, l.Exp);
l.IsCacheIsVaild = true;
}
else
{
Engine.Inference(ipaText, cacheFilePath, sid, new MExpressionsWrapper());
}
}


Expand Down

0 comments on commit 04f6b30

Please sign in to comment.