Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec alsa stops on end of record #13

Open
StuartIanNaylor opened this issue Apr 8, 2020 · 0 comments
Open

ec alsa stops on end of record #13

StuartIanNaylor opened this issue Apr 8, 2020 · 0 comments

Comments

@StuartIanNaylor
Copy link

I am starting ec like so as sum the channels of my mic array

.pi@raspberrypi:~/ec $ ./ec -i 'cap' -o 'plughw:CARD=ALSA,DEV=0' -d 200
Running... Press Ctrl+C to exit
default pipe size: 65536
new pipe size: 8192
skip frames 200
Enable AEC
playback filled 1632 bytes zero
No playback, bypass AEC

As you will see in another console it works on playback.

But if you record smething on end ec stops.
Been trying to use this with mycroft that stops and starts recording as it processes commands.

Why does ec stop when a recording ends?

Tried a few asound.conf but current is

pcm.!default {
    type asym
    playback.pcm "eci"
    capture.pcm "eco"
}


pcm.eci {
    type plug
    slave {
        format S16_LE
        rate 16000
        channels 1
        pcm {
            type file
            slave.pcm null
            file "/tmp/ec.input"
            format "raw"
        }
    }
}

pcm.eco {
    type plug
    slave.pcm {
        type fifo
        infile "/tmp/ec.output"
        rate 16000
        format S16_LE
        channels 2
    }
}



pcm.cap {
 type plug
 slave {
   pcm "plughw:CARD=CameraB409241,DEV=0"
   channels 4
   }
 route_policy sum
}

Even as a daemon -D stop recording and ec ends?

SaneBow pushed a commit to SaneBow/ec that referenced this issue Nov 26, 2021
When the consumer (aka reader of the out fifo pipe) closes the fifo, the
next write to it will cause a SIGPIPE and the ec process terminates with
exit code 141.
To prevent this, make the process ignore the SIGPIPE signal. This is
fine as that is the only place where ec writes to a fifo, and allows
the error to be handled locally instead of in a global signal handler.
In case a write fails because of a broken pipe, close the fd and re-open
it. This will then again block until a consumer connects, and write to
it when it does.

Fixes voice-engine#13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant