v0.2: streaming playback, model params, text input

- Stream audio directly to device via BufferedWaveProvider (no temp WAVs)
- Add Noise/Speed/NoiseW sliders with live value labels
- Sliders reinit engine on MouseUp (not Scroll) to avoid locking
- Add text input field with Speak button for direct synthesis
- Test button uses text input if non-empty
- Fix sentence terminator auto-append (espeak-ng final-word drop)
- Fix UTF-8 text marshaling (piper_synthesize_start keeps text ref)
- Fix voice catalogue language column (JSON snake_case mapping)
- Use piper_default_synthesize_options for model-specific defaults
- Fix nullable warnings in designer files
- Fix unused _playing field in AudioOutput
This commit is contained in:
2026-08-10 11:50:48 +00:00
parent 8585972a1e
commit f7ea07b78e
4 changed files with 128 additions and 13 deletions
-4
View File
@@ -8,7 +8,6 @@ internal sealed class AudioOutput : IDisposable
private BufferedWaveProvider? _bufferProvider;
private int _sampleRate;
private string _deviceName = string.Empty;
private bool _playing;
private bool _disposed;
public Action<string>? Log { get; set; }
@@ -35,7 +34,6 @@ internal sealed class AudioOutput : IDisposable
_waveOut.Init(_bufferProvider);
_waveOut.PlaybackStopped += OnPlaybackStopped;
_playing = true;
_waveOut.Play();
}
@@ -60,7 +58,6 @@ internal sealed class AudioOutput : IDisposable
private void OnPlaybackStopped(object? sender, StoppedEventArgs e)
{
_playing = false;
}
public void Stop()
@@ -74,7 +71,6 @@ internal sealed class AudioOutput : IDisposable
}
_bufferProvider?.ClearBuffer();
_bufferProvider = null;
_playing = false;
}
private static int FindDevice(string? deviceName)