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:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user