Added proper slave mode - additional clients after the first connection. Fixed a few issues. Updated to version 4.8.2.

This commit is contained in:
Tom
2025-03-06 16:05:15 +00:00
parent cbdca1c008
commit 622b359b12
17 changed files with 146 additions and 33 deletions

View File

@@ -68,14 +68,14 @@ namespace TwitchChatTTS.Hermes.Socket
ttsCreateUserVoice.Subscribe(async data => await Send(3, new RequestMessage()
{
Type = "create_tts_user",
Data = (IDictionary<string, object>) data.Value!
Data = (IDictionary<string, object>)data.Value!
}));
var ttsUpdateUserVoice = _bus.GetTopic("tts.user.voice.update");
ttsUpdateUserVoice.Subscribe(async data => await Send(3, new RequestMessage()
{
Type = "update_tts_user",
Data = (IDictionary<string, object>) data.Value!
Data = (IDictionary<string, object>)data.Value!
}));
}
@@ -267,6 +267,7 @@ namespace TwitchChatTTS.Hermes.Socket
ApiKey = _configuration.Hermes!.Token!,
MajorVersion = TTS.MAJOR_VERSION,
MinorVersion = TTS.MINOR_VERSION,
PatchVersion = TTS.PATCH_VERSION,
});
};
@@ -276,11 +277,13 @@ namespace TwitchChatTTS.Hermes.Socket
{
if (!Connected)
return;
Connected = false;
LoggedIn = false;
Ready = false;
_user.Slave = true;
}
LoggedIn = false;
Ready = false;
_logger.Warning("Tom to Speech websocket client disconnected.");
_heartbeatTimer.Enabled = false;