123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- require dirname(__FILE__, 2) . '/vendor/autoload.php';
- $secretId = "SECRETID";
- $secretKey = "SECRETKEY";
- $region = "ap-beijing";
- $cosClient = new Qcloud\Cos\Client(
- array(
- 'region' => $region,
- 'scheme' => 'https',
- 'credentials'=> array(
- 'secretId' => $secretId,
- 'secretKey' => $secretKey)));
- try {
-
- $result = $cosClient->updateVoiceSpeechRecognitionTemplate(array(
- 'Bucket' => 'examplebucket-125000000',
- 'Key' => '',
- 'Tag' => 'SpeechRecognition',
- 'Name' => 'voice-speechrecognition-name',
- 'SpeechRecognition' => array(
- 'EngineModelType' => '16k_zh',
- 'ChannelNum' => 1,
- 'ResTextFormat' => 1,
- 'FilterDirty' => 0,
- 'FilterModal' => 1,
- 'ConvertNumMode' => 0,
- 'SpeakerDiarization' => 1,
- 'SpeakerNumber' => 0,
- 'FilterPunc' => 0,
- 'OutputFileType' => 'txt',
- ),
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo($e);
- }
|