Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

No audio on ubuntu trusty desktop install #1141

Closed
sigmonsays opened this issue Oct 8, 2017 · 5 comments · Fixed by #1168
Closed

No audio on ubuntu trusty desktop install #1141

sigmonsays opened this issue Oct 8, 2017 · 5 comments · Fixed by #1168

Comments

@sigmonsays
Copy link

I am attempting to run mycroft on my desktop and it is not working correctly. My expectation is that I can issue commands in the CLI and hear responses. For instance if I type "say Hello" then I should hear hello spoken.

After a lot of debugging it seems to be a problem with how mimic is being invoked. It seems like the wav files are not being generated (or being deleted later) or the pho files are missing.

I am running ubuntu trusty, python version 2.7. I have attempted running mycroft master branch (release/v0.9.0-19-g7e660bc) and also the release-v0.8.22 branch and nothing seems to work.

I have gone into the code and put various debug statements into the tts mimic handler to see what commands it executes. When I run the commands manually they properly create .wav files and .pho files in /tmp/mycroft/cache/tts. What is weird though is these files are disappearing, and I suspect it is happening after they are generated. If I chattr +i the files they can not be deleted, and I see stack traces showing the cache clean function is being called. Is it possible these files are being deleted from the cache too soon?

What I have proven though is everything is "working" -- if I generate a wav/pho file and log the file name written to disk, I can chattr both files. This means mycroft can't delete the files. So.. when I issue "say Hello" its the same hash (ie /tmp/mycroft/cache/tts/04af779804e578a145250c722cbfddef.pho) and i actually hear Hello spoken. However this required a lot of manual trickery and log watching.

Unfortunately due to the async nature of mycroft I do not have the time to invest debugging it fully. I lost the flow after it started putting talk messages into queues.

@forslund
Copy link
Collaborator

forslund commented Oct 8, 2017

It could be possible. The cache is pruned if the remaining disk space on the tmp partition is too low. Too low in this case is < 5% free space.

Could that be it?

@sigmonsays
Copy link
Author

That is questionable logic. I have 99% used on root (where /tmp is) but root is a 225G mount and 1% is 2.6G free, more than enough space. What is the function called?

I will go look later and disable that behavior, unless there is a configuration parameter.

@forslund
Copy link
Collaborator

forslund commented Oct 9, 2017

@sigmonsays
Copy link
Author

sigmonsays commented Oct 10, 2017

appreciate it, this is what was causing my issue. I cleaned up my hard drive to drop above 5% free and everything works now.

In terms of the bad logic, treating 5% free as a cleanup threshold seems wrong (5% of 1TB drive is a lot of space). Second, the real underlying issue is how a cleanup routine can delete a file from cache before it is being used. Perhaps it makes sense to update the curate_cache function to check timestamps of files and not delete them if they are under an age threshold.

There could be better logging when errors occur. This might be the most frustrating thing as a developer watching the system silently fail without a single log line indicating an error.

Thanks

@forslund
Copy link
Collaborator

I will take all three things in consideration and give it a go tomorrow.

forslund added a commit to forslund/mycroft-core that referenced this issue Oct 18, 2017
==== Fixed Issues ====
MycroftAI#1141

====  Tech Notes ====
Curate cache now only removes cache files if the diskspace is below the
set percentage AND if below a set amount of free disk space
MatthewScholefield pushed a commit that referenced this issue Oct 26, 2017
==== Fixed Issues ====
#1141

====  Tech Notes ====
Curate cache now only removes cache files if the diskspace is below the
set percentage AND if below a set amount of free disk space
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants