function text2Wav($string,$lang = "ru")
{
- print_r($this);
+ $redis = new Redis();
+ $hash ='';
+ if ($redis->pconnect('127.0.0.1', 6379, 2.5)) {
+ $hash="voice-".hash("sha256","$lang-$string");
+ $result=$redis->get($hash);
+ if ($result) {
+ return $result;
+ }
+ }
if ($this->mode == 'festival') {
}
if (!$proc_result) {
+ if ($hash) {
+ $redis->set($hash,$data);
+ }
return $data;
} else {
return '';