synthesis($text,'zh',1,[ 'spd'=>$spd, 'per'=>$per, ]); return $res; }catch (\Exception $exception){ } return false; } public static function getClient() { $appId = Yii::$app->params['baiduAipAppId']; $appKey = Yii::$app->params['baiduAipAppKey']; $appSecret = Yii::$app->params['baiduAipAppSecret']; $client = new AipSpeech($appId,$appKey,$appSecret); return $client; } }