fix: remove frame-stealing read from pipeline loop

The pipeline's main select loop was reading from frameCh alongside the
SimpleTranscriber's collectAudio goroutine. Since Go channels deliver
each value to exactly one reader, the pipeline was randomly consuming
~50% of audio frames and discarding them, causing the transcriber to
receive fragmented audio and produce incomplete transcriptions.

Remove the `case <-frameCh:` from the pipeline loop so all frames are
exclusively consumed by the transcriber.
This commit is contained in:
burakgizlice
2026-02-14 00:23:52 +03:00
parent f3717b4abc
commit 295bd0f9f9
-2
View File
@@ -196,8 +196,6 @@ func (p *pipeline) run(ctx context.Context) {
for { for {
select { select {
case <-frameCh:
case action := <-p.actionCh: case action := <-p.actionCh:
switch action { switch action {
case Inject: case Inject: