Using IHostingService for TTS listening and playing in background.

This commit is contained in:
Tom
2024-08-12 16:42:53 +00:00
parent 2643feeca7
commit f0071cae81
10 changed files with 208 additions and 118 deletions

View File

@@ -29,7 +29,7 @@ using TwitchChatTTS.Twitch.Socket;
using TwitchChatTTS.Twitch.Socket.Messages;
using TwitchChatTTS.Twitch.Socket.Handlers;
using CommonSocketLibrary.Backoff;
using TwitchChatTTS.Chat.Soeech;
using TwitchChatTTS.Chat.Speech;
using TwitchChatTTS.Chat.Messaging;
// dotnet publish -r linux-x64 -p:PublishSingleFile=true --self-contained true
@@ -156,5 +156,7 @@ s.AddKeyedSingleton<MessageTypeManager<IWebSocketHandler>, HermesMessageTypeMana
s.AddKeyedSingleton<SocketClient<WebSocketMessage>, HermesSocketClient>("hermes");
s.AddHostedService<TTS>();
s.AddHostedService<TTSListening>();
s.AddHostedService<TTSEngine>();
using IHost host = builder.Build();
await host.RunAsync();