Tencent Cloud SOE SDK for Python
raw JSON → 3.0.1459 verified Sat May 09 auth: no python
Tencent Cloud Speech-Oriented Evaluation (SOE) SDK for Python. Provides API access to Tencent Cloud's SOE service for spoken language evaluation. As of version 3.0.1459, it follows a modular structure under the tencentcloud package. The SDK follows the release cadence of the main tencentcloud-sdk-python repository, with updates tied to service API changes.
pip install tencentcloud-sdk-python-soe Common errors
error ModuleNotFoundError: No module named 'tencentcloud.soe' ↓
cause Did not install the SOE-specific package or installed only the common package.
fix
pip install tencentcloud-sdk-python-soe
error tencentcloud.common.exception.TencentCloudSDKException: The region is not supported for the product. ↓
cause Region not valid for SOE service.
fix
Check the official Tencent Cloud SOE region list and pass a valid region like 'ap-guangzhou'.
Warnings
gotcha The SDK requires both 'tencentcloud-sdk-python-common' and 'tencentcloud-sdk-python-soe' to be installed separately. ↓
fix Install both packages: pip install tencentcloud-sdk-python-common tencentcloud-sdk-python-soe
gotcha Region must be specified explicitly; there is no default fallback. Using an invalid region leads to API errors. ↓
fix Supply a valid region string (e.g., 'ap-guangzhou', 'ap-beijing') to the client constructor.
Imports
- SoeClient
from tencentcloud.soe.v20180724 import soe_client - models
from tencentcloud.soe.v20180724 import models
Quickstart
from tencentcloud.common import credential
from tencentcloud.soe.v20180724 import soe_client, models
import os
cred = credential.Credential(
os.environ.get('TENCENTCLOUD_SECRET_ID', ''),
os.environ.get('TENCENTCLOUD_SECRET_KEY', '')
)
client = soe_client.SoeClient(cred, 'ap-guangzhou')
req = models.InitOralProcessRequest()
req.SessionId = 'session_12345'
req.RefText = 'test'
req.WorkMode = 1
req.EvalMode = 1
req.StorageMode = 0
resp = client.InitOralProcess(req)
print(resp.to_json_string())