v0.9: VoicePipeline refactor — queue-based pipeline, lock/release model, thread-based TCP

This commit is contained in:
2026-08-13 12:38:27 +00:00
parent 41a53d35b0
commit caad0ed50e
6 changed files with 556 additions and 554 deletions
+20 -75
View File
@@ -9,21 +9,15 @@ partial class MainForm
private TextBox txtPttKey = null!;
private Label lblVoice = null!;
private ComboBox cmbVoice = null!;
private Button btnTestVoice = null!;
private Button btnManageVoices = null!;
private Label lblOutput = null!;
private ComboBox cmbOutput = null!;
private Label lblFile = null!;
private Button btnBrowseFile = null!;
private Label lblFileName = null!;
private Label lblServer = null!;
private TextBox txtSttEndpoint = null!;
private Label lblLineStatus = null!;
private Button btnLock = null!;
private RichTextBox txtLog = null!;
private CheckBox chkMinimizeToTray = null!;
private Button btnClearLog = null!;
private Label lblTextInput = null!;
private TextBox txtTextInput = null!;
private Label lblNoise = null!;
private TrackBar trkNoise = null!;
private Label lblNoiseVal = null!;
@@ -49,21 +43,15 @@ partial class MainForm
txtPttKey = new TextBox();
lblVoice = new Label();
cmbVoice = new ComboBox();
btnTestVoice = new Button();
btnManageVoices = new Button();
lblOutput = new Label();
cmbOutput = new ComboBox();
lblFile = new Label();
btnBrowseFile = new Button();
lblFileName = new Label();
lblServer = new Label();
txtSttEndpoint = new TextBox();
lblLineStatus = new Label();
btnLock = new Button();
txtLog = new RichTextBox();
chkMinimizeToTray = new CheckBox();
btnClearLog = new Button();
lblTextInput = new Label();
txtTextInput = new TextBox();
lblNoise = new Label();
trkNoise = new TrackBar();
lblNoiseVal = new Label();
@@ -100,64 +88,38 @@ partial class MainForm
cmbVoice.Size = new Size(200, 23);
cmbVoice.DropDownStyle = ComboBoxStyle.DropDownList;
// btnTestVoice
btnTestVoice.Text = "Test";
btnTestVoice.Location = new Point(423, 11);
btnTestVoice.Size = new Size(45, 25);
btnTestVoice.UseVisualStyleBackColor = true;
// btnManageVoices
btnManageVoices.Text = "Add/Remove...";
btnManageVoices.Location = new Point(474, 11);
btnManageVoices.Location = new Point(423, 11);
btnManageVoices.Size = new Size(95, 25);
btnManageVoices.UseVisualStyleBackColor = true;
// lblOutput
lblOutput.Text = "Output:";
lblOutput.Location = new Point(580, 15);
lblOutput.Location = new Point(530, 15);
lblOutput.Size = new Size(50, 23);
lblOutput.TextAlign = ContentAlignment.MiddleLeft;
// cmbOutput
cmbOutput.Location = new Point(633, 12);
cmbOutput.Size = new Size(180, 23);
cmbOutput.Location = new Point(583, 12);
cmbOutput.Size = new Size(150, 23);
cmbOutput.DropDownStyle = ComboBoxStyle.DropDownList;
// lblFile
lblFile.Text = "Text File:";
lblFile.Location = new Point(12, 48);
lblFile.Size = new Size(60, 23);
lblFile.TextAlign = ContentAlignment.MiddleLeft;
// btnBrowseFile
btnBrowseFile.Text = "Browse...";
btnBrowseFile.Location = new Point(75, 45);
btnBrowseFile.Size = new Size(75, 25);
btnBrowseFile.UseVisualStyleBackColor = true;
// lblFileName
lblFileName.Text = "(none)";
lblFileName.Location = new Point(155, 48);
lblFileName.Size = new Size(280, 23);
lblFileName.TextAlign = ContentAlignment.MiddleLeft;
lblFileName.ForeColor = Color.Gray;
// lblServer
lblServer.Text = "STT:";
lblServer.Location = new Point(440, 48);
lblServer.Location = new Point(12, 48);
lblServer.Size = new Size(35, 23);
lblServer.TextAlign = ContentAlignment.MiddleLeft;
// txtSttEndpoint
txtSttEndpoint.Location = new Point(478, 45);
txtSttEndpoint.Size = new Size(185, 23);
txtSttEndpoint.Location = new Point(50, 45);
txtSttEndpoint.Size = new Size(200, 23);
// lblLineStatus
lblLineStatus.Text = "";
lblLineStatus.Location = new Point(645, 48);
lblLineStatus.Size = new Size(160, 23);
lblLineStatus.TextAlign = ContentAlignment.MiddleRight;
lblLineStatus.ForeColor = Color.DarkBlue;
// btnLock
btnLock.Text = "Lock Model";
btnLock.Location = new Point(260, 44);
btnLock.Size = new Size(90, 25);
btnLock.UseVisualStyleBackColor = true;
// lblNoise
lblNoise.Text = "Noise:";
@@ -165,7 +127,7 @@ partial class MainForm
lblNoise.Size = new Size(40, 23);
lblNoise.TextAlign = ContentAlignment.MiddleLeft;
// trkNoise (0-1000 → 0.0-1.0, default 667)
// trkNoise
trkNoise.Location = new Point(52, 78);
trkNoise.Size = new Size(120, 45);
trkNoise.Minimum = 0;
@@ -186,7 +148,7 @@ partial class MainForm
lblSpeed.Size = new Size(40, 23);
lblSpeed.TextAlign = ContentAlignment.MiddleLeft;
// trkSpeed (50-300 → 0.5-3.0, default 100)
// trkSpeed
trkSpeed.Location = new Point(260, 78);
trkSpeed.Size = new Size(120, 45);
trkSpeed.Minimum = 50;
@@ -207,7 +169,7 @@ partial class MainForm
lblNoiseW.Size = new Size(45, 23);
lblNoiseW.TextAlign = ContentAlignment.MiddleLeft;
// trkNoiseW (0-1000 → 0.0-1.0, default 800)
// trkNoiseW
trkNoiseW.Location = new Point(475, 78);
trkNoiseW.Size = new Size(120, 45);
trkNoiseW.Minimum = 0;
@@ -223,19 +185,8 @@ partial class MainForm
lblNoiseWVal.TextAlign = ContentAlignment.MiddleLeft;
// txtLog
txtLog.Location = new Point(12, 149);
txtLog.Size = new Size(800, 310);
// lblTextInput
lblTextInput.Text = "Text:";
lblTextInput.Location = new Point(12, 121);
lblTextInput.Size = new Size(35, 23);
lblTextInput.TextAlign = ContentAlignment.MiddleLeft;
// txtTextInput
txtTextInput.Location = new Point(50, 118);
txtTextInput.Size = new Size(762, 23);
txtLog.Location = new Point(12, 121);
txtLog.Size = new Size(800, 338);
txtLog.ReadOnly = true;
txtLog.Font = new Font("Consolas", 9F);
txtLog.BackColor = Color.FromArgb(30, 30, 30);
@@ -261,16 +212,12 @@ partial class MainForm
Controls.Add(txtPttKey);
Controls.Add(lblVoice);
Controls.Add(cmbVoice);
Controls.Add(btnTestVoice);
Controls.Add(btnManageVoices);
Controls.Add(lblOutput);
Controls.Add(cmbOutput);
Controls.Add(lblFile);
Controls.Add(btnBrowseFile);
Controls.Add(lblFileName);
Controls.Add(lblServer);
Controls.Add(txtSttEndpoint);
Controls.Add(lblLineStatus);
Controls.Add(btnLock);
Controls.Add(lblNoise);
Controls.Add(trkNoise);
Controls.Add(lblNoiseVal);
@@ -280,8 +227,6 @@ partial class MainForm
Controls.Add(lblNoiseW);
Controls.Add(trkNoiseW);
Controls.Add(lblNoiseWVal);
Controls.Add(lblTextInput);
Controls.Add(txtTextInput);
Controls.Add(txtLog);
Controls.Add(chkMinimizeToTray);
Controls.Add(btnClearLog);