Skip to content

Commit

Permalink
Fixed punctuation's prosody
Browse files Browse the repository at this point in the history
  • Loading branch information
EX3exp committed Dec 17, 2024
1 parent 56504d9 commit 22b52dd
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,17 +327,12 @@ public static MResultPrototype[] SetUpProsody(LineBoxView l, List<MResultPrototy
}
}

if (next is not null && IsPunctuation(next.Phoneme) && endPuncs.Contains(next.Phoneme))
if (i == results.Count - 1 || IsPunctuation(results[i].Phoneme) && results[i].Phoneme.Trim() != string.Empty)
{
//Log.Debug($"Next is punctuation: {next.Phoneme}");
//Log.Debug($"Current: {mResultPrototype.Phoneme}");
mResultPrototype.ProsodyType = (int)ProsodyType.Eos;
}
if (i == results.Count - 1 && prev is not null && prev.ProsodyType != (int)ProsodyType.Eos)
{

mResultPrototype.ProsodyType = (int)ProsodyType.Eos;
}


if (mResultPrototype.ProsodyType == (int)ProsodyType.Undefined) // if not set
Expand Down

0 comments on commit 22b52dd

Please sign in to comment.