Closed glixx closed 5 years ago
I'm not sure what is going on with this one. I have installed the Mageia 7 beta release (with KDE desktop environment) - got all the latest updates. The program installed without any issues with python3-pygame and it seems to talk to eSpeak. When changing languages it says what I have selected (after manually removing line 51 in /usr/share/eduactiv8/classes/lang.py, but when starting, for instance, a letter learning activity (017/005) after clicking on 8 letters (sometimes more) it stops as if the eSpeak subprocess stopped accepting new text to process. The quality of sound is very bad also, but that may be down to me running the Mageia via VirtualBox (since trying to play a random video also was not great).
Is it possible to see output of espeak?
I tried to send the output to the stdout but so far no luck... I'll have another look at it when I get some time.
UPDATE: I did not manage to get any useful output printed without the program freezing or other issues cropping up, probably due to lack of knowledge on my side how to work with subprocesses/threads etc.. However, crashing the program made me realize that text was not 'flushed' to the eSpeak background process - and everything that was not 'said' during the operation of the program was read out after the program crashed. I think adding buffsize=0 in the process initialization should solve the issue, but this needs more testing.
UPDATE 2: The proposed solution is not enough to solve this issue. On subsequent runs, the eSpeak keeps on stopping on Mageia 7. No idea what is happening to the text written to the eSpeak stdin, but it does not get processed. Also tested with Python 2, and the issue is still there so not related to the use of Python 3.
Getting output from eSpeak was actually easier than I thought... I just needed to stop hiding it ;)
When creating subprocess the stdout and stderr need to be removed, and also do not need to be closed later in the stop_server()
this is what the self.process initialization line in speaker.py file needs to look like to get all the output from eSpeak:
self.process = subprocess.Popen(cmd, shell=False, bufsize=0, stdin=subprocess.PIPE)
... and there's a lot of output there - probably that is what is clogging the whole process.
There are hundreds of the 'underrun occurred' lines there. Could this be a potential issue in Mageia with the sound server?
Do you have patch?
The latest change on the development should let you see all the output from eSpeak. https://github.com/imiolek-ireneusz/eduActiv8/blob/development/classes/speaker.py
Package eduactiv8-4.19.01-0.6.git20190121.mga7.noarch.rpm works now.
Not sure how, but I'm pleased you managed to get this issue resolved. I couldn't get this to work properly on Mageia. Thanks.
Use Mageia 7 beta1: https://www.mageia.org/en/downloads/prerelease/
espeak works in console, but not in gui.