1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- require_once __DIR__.'/../../../vendor/autoload.php';
- use TencentCloud\Tci\V20190318\TciClient;
- use TencentCloud\Tci\V20190318\Models\SubmitPartialBodyClassTaskRequest;
- use TencentCloud\Tci\V20190318\Models\SubmitPartialBodyClassTask;
- use TencentCloud\Common\Exception\TencentCloudSDKException;
- use TencentCloud\Common\Credential;
- use TencentCloud\Common\Profile\ClientProfile;
- use TencentCloud\Common\Profile\HttpProfile;
- try {
-
- $cred = new Credential("", "");
-
-
- $httpProfile = new HttpProfile();
- $httpProfile->setReqMethod("POST");
- $httpProfile->setReqTimeout(30);
- $httpProfile->setEndpoint("tci.tencentcloudapi.com");
-
-
- $clientProfile = new ClientProfile();
- $clientProfile->setSignMethod("TC3-HMAC-SHA256");
- $clientProfile->setHttpProfile($httpProfile);
- $client = new TciClient($cred, "", $clientProfile);
-
- $req = new SubmitPartialBodyClassTaskRequest();
- $req->FileContent = "https://edu-test-1253131631.cos.ap-guangzhou.myqcloud.com/aieduautotest/autotest_vedio.mp4";
- $req->FileType = "vod_url";
- $req->Lang = 0;
- $req->LibrarySet = ["library_15603955264181591716"];
- $req->VocabLibNameList = ["testlib2"];
- $req->VoiceEncodeType = 1;
- $req->VoiceFileType = 10;
- $resp = $client->SubmitPartialBodyClassTask($req);
-
- print_r($resp->toJsonString());
-
-
- }
- catch(TencentCloudSDKException $e) {
- echo $e;
- }
|