Description of problem: I updated my Fedora 24 system yesterday, espeak will not work reading from a pipe. Version-Release number of selected component (if applicable): espeak-1.48.04-8.fc24.x86_64 How reproducible: Always since update. Steps to Reproduce: 1. create named pipe <pipfile>: mknod /tmp/namedpipe p 2. run espeak: espeak --stdout -f /tmp/namedpipe | paplay --playback 3. send text to pipe: echo 'hi there' >/tmp/namedpipe Actual results: If you strace espeak after step (2), then run step (3) you get: strace: Process 11283 attached open("/home/pdestefa/tmp/_reuse/tts.pipe.txt", O_RDONLY) = 3 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 close(3) = 0 tgkill(11283, 11285, SIGRTMIN) = 0 futex(0x7f8f4965f9d0, FUTEX_WAIT, 11285, NULL) = 0 munmap(0x7f8f55e28000, 409600) = 0 write(1, "RIFF$\360\377\177WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0\0"..., 352) = 352 exit_group(0) = ? +++ exited with 0 +++ Output is invalid, only a few hundred bytes. paplay plays it, but wave contains nothing audible. Expected results: Should read from pine and produce wav output. Should be a read call before close, right? Additional info: This worked yesterday! I've been using this exact same command for months now, since F24 released, and it has worked perfectly. I use it many times every day. Espeak works if you use an unnamed pipe (i.e: echo 'hi there' | espeak --stdout | paplay --playback ), so I'm completely baffled why this doesn't work now or what could have changed. I did not update espeak, or the kernel, but other things. I realize this isn't a change in espeak that caused this, but I can't think of anyone else who might be able to help me with this new problem other than espeak developers.
(In reply to Paul DeStefano from comment #0) > Description of problem: > I updated my Fedora 24 system yesterday, espeak will not work reading from a > pipe. > > Version-Release number of selected component (if applicable): > espeak-1.48.04-8.fc24.x86_64 > > How reproducible: > Always since update. > > Steps to Reproduce: > 1. create named pipe <pipfile>: mknod /tmp/namedpipe p > 2. run espeak: espeak --stdout -f /tmp/namedpipe | paplay --playback > 3. send text to pipe: echo 'hi there' >/tmp/namedpipe > > Actual results: > If you strace espeak after step (2), then run step (3) you get: > > strace: Process 11283 attached > open("/home/pdestefa/tmp/_reuse/tts.pipe.txt", O_RDONLY) = 3 > fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 > close(3) = 0 > tgkill(11283, 11285, SIGRTMIN) = 0 > futex(0x7f8f4965f9d0, FUTEX_WAIT, 11285, NULL) = 0 > munmap(0x7f8f55e28000, 409600) = 0 > write(1, "RIFF$\360\377\177WAVEfmt \20\0\0\0\1\0\1\0\"V\0\0D\254\0\0"..., > 352) = 352 > exit_group(0) = ? > +++ exited with 0 +++ > > Output is invalid, only a few hundred bytes. paplay plays it, but wave > contains nothing audible. > > Expected results: > Should read from pine and produce wav output. Should be a read call before > close, right? > > Additional info: > This worked yesterday! I've been using this exact same command for months > now, since F24 released, and it has worked perfectly. I use it many times > every day. > > Espeak works if you use an unnamed pipe (i.e: echo 'hi there' | espeak > --stdout | paplay --playback ), so I'm completely baffled why this doesn't > work now or what could have changed. > > I did not update espeak, or the kernel, but other things. I realize this > isn't a change in espeak that caused this, but I can't think of anyone else > who might be able to help me with this new problem other than espeak > developers. I am not aware of any change. It's also reproducible on f23 (espeak-1.48.04-6.fc23.x86_64). If it worked for you yesterday, I think it was by an coincidence.
It has never worked: espeak.cpp: filesize = GetFileLength(filename); This is 0 for FIFO, so the upstream didn't count with FIFOs.
I understand the code you found; that makes complete sense. But, I have incontrovertible proof that it did work for two whole months. Could GetFileLength() have changed it's behavior? What happens when espeak uses STDIN? It must have a different code path for that? Can I use this bug to get espeak to work with named pipes? The fact that it works with unnamed pipes and not namedpipes seems like a bug to me, but if that distinction was intentional then I guess it's an enhancement request. If the former, I could submit a patch, but without knowing the history, I don't feel comfortable designing the solution myself.
(In reply to Paul DeStefano from comment #3) > I understand the code you found; that makes complete sense. But, I have > incontrovertible proof that it did work for two whole months. Could > GetFileLength() have changed it's behavior? > It seems we rebased it "Fri Mar 7 2014" so if there was any change it had to be done outside of espeak. > What happens when espeak uses STDIN? It must have a different code path for > that? > Yes it's different code path there. > Can I use this bug to get espeak to work with named pipes? The fact that it > works with unnamed pipes and not namedpipes seems like a bug to me, but if > that distinction was intentional then I guess it's an enhancement request. > If the former, I could submit a patch, but without knowing the history, I > don't feel comfortable designing the solution myself. Ondra is working on it and I am sure he will provide patch/solution soon.
Created attachment 1190885 [details] proposed patch The attached patch should resolve the issue. However before rebuilding, I'll send it upstream and wait for their comments.
Awesome! Thanks so much. I realize not many people were annoyed by this, so I appreciate your help.
espeak-1.48.04-9.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe889d7399
espeak-1.48.04-9.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c64030073d
espeak-1.48.04-9.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-fe889d7399
espeak-1.48.04-9.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c64030073d
espeak-1.48.04-9.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
espeak-1.48.04-9.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.