a307012821 / yii2-tencent-ai
There is no license information available for the latest version (dev-master) of this package.
腾讯ai接sdk
dev-master
2019-01-03 06:17 UTC
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2025-04-29 01:30:03 UTC
README
Voice Translation of Tencent Voice AI Interface
composer require a307012821/yii2-tencent-ai dev-master
example
$base = file_get_contents("./source/3.mp3");
$base = base64_encode($base);
$app = App::SpeechRecognition([
"app_id" => "",
"app_key" => ""
]);
$result = $app->translate([
'format' => '8',
'seq' => '0',
'end' => '1',
'session_id' => 'test1',
'speech_chunk' => $base,
'source' => 'zh',
'target' => 'zh',
]);