voice-engine / ec

Echo Canceller, part of Voice Engine project
GNU General Public License v3.0
246 stars 70 forks source link

ec alsa stops on end of record #13

Open StuartIanNaylor opened 4 years ago

StuartIanNaylor commented 4 years ago

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?