fixed
This commit is contained in:
@@ -206,15 +206,11 @@ class Events extends \think\worker\Events
|
|||||||
Tools::log_to_write_txt(['tempFile:',$tempFile]);
|
Tools::log_to_write_txt(['tempFile:',$tempFile]);
|
||||||
|
|
||||||
file_put_contents($tempFile, $audioData);
|
file_put_contents($tempFile, $audioData);
|
||||||
// 设置请求参数
|
|
||||||
//$params = [
|
|
||||||
// 'sample_rate' => 16000, // 采样率
|
|
||||||
// 'language' => 'zh_cn', // 语言
|
|
||||||
//];
|
|
||||||
// 设置转写参数
|
// 设置转写参数
|
||||||
$lfasrConfig = [
|
$lfasrConfig = [
|
||||||
'hasParticiple' => 'true',
|
'hasParticiple' => 'true',
|
||||||
'sample_rate' => 16000, // 采样率
|
//'sample_rate' => 16000, // 采样率
|
||||||
'language' => 'zh_cn', // 语言
|
'language' => 'zh_cn', // 语言
|
||||||
//...
|
//...
|
||||||
];
|
];
|
||||||
@@ -222,6 +218,8 @@ class Events extends \think\worker\Events
|
|||||||
$app_id = $xunfei_record_config['appid'];
|
$app_id = $xunfei_record_config['appid'];
|
||||||
$secret_key = $xunfei_record_config['secretKey'];
|
$secret_key = $xunfei_record_config['secretKey'];
|
||||||
|
|
||||||
|
Tools::log_to_write_txt(['app_id:',$app_id]);
|
||||||
|
Tools::log_to_write_txt(['secret_key:',$secret_key]);
|
||||||
|
|
||||||
$filePath = $tempFile;//'/Users/wh/Desktop/test.wav';
|
$filePath = $tempFile;//'/Users/wh/Desktop/test.wav';
|
||||||
// 这里的$app_id、$secret_key是在开放平台控制台获得
|
// 这里的$app_id、$secret_key是在开放平台控制台获得
|
||||||
|
|||||||
Reference in New Issue
Block a user