Warning: session_start(): open(/var/lib/php/sessions/sess_c7ar06j48ntpn9qos9pcqkqm9l, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
cmodule RunCheetah > DynPrintLogAndEnabled {
transient Process process;
start-thread {
dm_registerAs_direct runCheetah();
dm_reloadOnFieldChange enabled();
_startIt();
}
void _startIt q {
cleanMeUp_process();
if (!enabled) ret;
File script = userDir("dev/cheetah-master/speech-loop");
assertFileExists(script);
print("Calling " + script);
process = Runtime.getRuntime().exec(platformQuoteOpt(bashExecutable()) + " " + platformQuoteOpt(script));
print("Cheetah process started");
print("PID: " + getOpt(process, "pid"));
drainErrorStreamToConsole(process, line -> enabled, lambda0 enter);
out = new PrintStream(process.getOutputStream());
isBeingTouched = WithTimestamp(null);
dm_startThread("Cheetah Recognition", r {
InputStreamReader in = new(process.getInputStream());
int c;
while ((c = in.read()) >= 0) {
if (enabled)
print_noNewLine((char) c);
}
});
}
void cleanMeUp_process {
if (process != null) {
print("Stopping Cheetah process");
process.destroy/*Forcibly*/();
process = null;
print("Stopped Cheetah process, hopefully");
}
}
}