RoboZhando/TTSQueue.cs
/// <summary>Returns a task that processes the message queue</summary>
Returns a task that processes the message queue
Returns a task that processes the message queue
private async Task StartProcessing(CancellationToken cancellationToken = default)
        {
            await foreach(var message in _queue.Reader.ReadAllAsync(cancellationToken))
            {
                try
                {
                    await Synthesizer.SpeakAsync(message, VoiceConnection, cancellationToken);
                }
                catch
                {
                }
            }
        }
private async Task StartProcessing ( CancellationToken cancellationToken = default ) { await foreach ( var message in _queue . Reader . ReadAllAsync ( cancellationToken ) ) { try { await Synthesizer . SpeakAsync ( message , VoiceConnection , cancellationToken ) ; } catch { } } }
Returns a task that processes the message queue
Returns a task that processes the message queue
// Speak the message // We failed to speak that message, so lets just give up
cancellationToken
CancellationToken