v0.5: TCP STT client with PTT on/off, server endpoint in config + UI

This commit is contained in:
2026-08-11 09:03:50 +00:00
parent 08d6eeb46e
commit 4a58b94f35
11 changed files with 696 additions and 53 deletions
+2 -12
View File
@@ -1,5 +1,4 @@
using Robovoice.Core;
using Robovoice.Stt.File;
using Robovoice.Tts.LibPiper;
namespace Robovoice.App;
@@ -8,7 +7,7 @@ internal sealed class Orchestrator : IAsyncDisposable
{
private readonly LibPiperTtsEngine _tts;
private readonly AudioOutput _audioOutput;
private readonly FileSttSource _sttSource;
private readonly ISttSource _sttSource;
private readonly Action<string> _log;
private CancellationTokenSource? _currentCts;
private bool _disposed;
@@ -18,7 +17,7 @@ internal sealed class Orchestrator : IAsyncDisposable
public Orchestrator(
LibPiperTtsEngine tts,
AudioOutput audioOutput,
FileSttSource sttSource,
ISttSource sttSource,
Action<string> log)
{
_tts = tts;
@@ -97,15 +96,6 @@ internal sealed class Orchestrator : IAsyncDisposable
sw.Stop();
}
public void TriggerNextLine()
{
_sttSource.EmitNext();
}
public string? GetPendingLine() => _sttSource.GetPendingLine();
public int GetCurrentLineIndex() => _sttSource.CurrentIndex;
public int GetLineCount() => _sttSource.LineCount;
public async ValueTask DisposeAsync()
{
if (_disposed) return;