Fixed TTS using StreamElements. Fixed several issues.

This commit is contained in:
Tom
2026-01-03 05:19:33 +00:00
parent fb04f4003f
commit aa89578297
16 changed files with 275 additions and 135 deletions

10
TTS.cs
View File

@@ -22,8 +22,8 @@ namespace TwitchChatTTS
public class TTS : IHostedService
{
public const int MAJOR_VERSION = 4;
public const int MINOR_VERSION = 8;
public const int PATCH_VERSION = 2;
public const int MINOR_VERSION = 9;
public const int PATCH_VERSION = 3;
private readonly User _user;
private readonly HermesApiClient _hermesApiClient;
@@ -84,7 +84,7 @@ namespace TwitchChatTTS
if (string.IsNullOrWhiteSpace(_configuration.Hermes?.Token))
{
_logger.Error("Tom to Speech API token not set in the yml file.");
_logger.Error("Tom to Speech API token not set in the configuration file.");
return;
}
@@ -96,7 +96,7 @@ namespace TwitchChatTTS
_logger.Error("Failed to fetch latest TTS version. Something went wrong.");
return;
}
if (hermesVersion.MajorVersion > TTS.MAJOR_VERSION || hermesVersion.MajorVersion == TTS.MAJOR_VERSION && (hermesVersion.MinorVersion > TTS.MINOR_VERSION || hermesVersion.MinorVersion == TTS.MINOR_VERSION && (hermesVersion.PatchVersion == null || hermesVersion.PatchVersion > TTS.PATCH_VERSION)))
if (hermesVersion.MajorVersion > MAJOR_VERSION || hermesVersion.MajorVersion == MAJOR_VERSION && (hermesVersion.MinorVersion > MINOR_VERSION || hermesVersion.MinorVersion == MINOR_VERSION && (hermesVersion.PatchVersion == null || hermesVersion.PatchVersion > PATCH_VERSION)))
{
_logger.Information($"A new update for TTS is avaiable! Version {hermesVersion.MajorVersion}.{hermesVersion.MinorVersion}.{hermesVersion.PatchVersion} is available at {hermesVersion.Download}");
var changes = hermesVersion.Changelog.Split("\n");
@@ -111,9 +111,9 @@ namespace TwitchChatTTS
}
var disposables = new List<IDisposable>();
var connected = _bus.GetTopic("tts_connected");
// 7tv
var connected = _bus.GetTopic("tts_connected");
disposables.Add(connected.FirstAsync().Subscribe(async (data) =>
{
if (data.Value is not User user)