Improve sidecar client flow and S2T runtime behavior
This commit is contained in:
parent
14c2c4bceb
commit
b1f0791f04
@ -92,7 +92,7 @@ public sealed class PythonSidecarClient(JournalConfig config)
|
||||
for (var i = lines.Length - 1; i >= 0; i--)
|
||||
{
|
||||
var line = lines[i].Trim();
|
||||
if (line.StartsWith("{", StringComparison.Ordinal) && line.EndsWith("}", StringComparison.Ordinal))
|
||||
if (line.StartsWith('{') && line.EndsWith('}'))
|
||||
return line;
|
||||
}
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@ public sealed class SidecarCli(IVaultStorageService vaultStorage, IEntrySearchSe
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!token.StartsWith("-", StringComparison.Ordinal))
|
||||
if (!token.StartsWith('-'))
|
||||
{
|
||||
if (parsed.Query is null)
|
||||
{
|
||||
|
||||
@ -47,7 +47,7 @@ public sealed class LocalWhisperS2TService : IS2TService, IDisposable
|
||||
{
|
||||
_factory ??= WhisperFactory.FromPath(modelPath);
|
||||
_segmentBuffer = new MemoryStream();
|
||||
_chunkQueue = new BlockingCollection<byte[]>();
|
||||
_chunkQueue = [];
|
||||
_cts = new CancellationTokenSource();
|
||||
|
||||
var waveFormat = new WaveFormat(SampleRate, Bits, Channels);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user