TTS messages are now merged.

This commit is contained in:
Tom
2024-08-12 05:44:31 +00:00
parent 9f61295d2d
commit 2056b2cd48
12 changed files with 614 additions and 523 deletions

View File

@@ -43,7 +43,7 @@ namespace TwitchChatTTS
return null;
var enabledVoicesString = string.Join("|", VoicesAvailable.Where(v => VoicesEnabled == null || !VoicesEnabled.Any() || VoicesEnabled.Contains(v.Value)).Select(v => v.Value));
return new Regex($@"\b({enabledVoicesString})\:(.*?)(?=\Z|\b(?:{enabledVoicesString})\:)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
return new Regex($@"(?:\A|\s)(?<voice>{enabledVoicesString}):(?<message>.*?)(?=\Z|\s(?:{enabledVoicesString})\:)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
}
}
}