After activating AMS, you can directly call AMS APIs to recognize audio stream content (such as game live streaming, radio, and voice chat). Note:
Before calling the API, make sure that the current account has at least the access permission of AMS. For more information on how to configure the permission, see CAM Authorization Guide. If you cannot access the service, you will need to activate the service/check the billing information (for root account) or request the corresponding permission from the admin or root account (for sub-account/collaborator).
Task templates are used to manage how files are processed for recognition tasks. You can skip this step if the default template is used.
Note:
Currently, only the default template can be edited for template configuration.
1. Log in to the CMS console and select AMS > Service Management on the left sidebar to enter the Service Management page. 2. On the service management page, click View Details, and the details of the default template will be displayed on the right.
3. On the specific information page, click Edit in the top-right corner to enter the template editing page.
4. On the template editing page, set the configuration information, including template name, audio stream or large file segment duration (15s, 30s, or 60s), optional callback address (to which risky content can be returned), and full callback for live streaming switch (on/off). You can customize the template configuration based on your business and storage needs.
5. Click Save to save the current template, which will take effect immediately for all AMS services under the account.
The custom library is used to configure the personalized recognition content. You can skip this step if you don't need to configure a custom library.
1. Log in to the CMS console and select AMS > Custom Library Management > Custom Dictionary on the left sidebar to enter the Custom Dictionary page. 2. On the Custom Dictionary page, click Add Dictionary to pop up the Create Dictionary window.
3. In the Create Dictionary pop-up window, configure a custom library based on your business needs.
4. Click OK.
5. On the Custom Dictionary page, select the target dictionary and click Manage in the Operation column to enter the dictionary content management page.
6. On the dictionary content management page, click Add Sample in the top-left corner to pop up the Add Sample window.
7. In the Add Sample pop-up window, select the recognition details, enter keywords, and click OK.
Note:
Recognition Details: violation type that corresponds to the recognition model.
Keywords: each keyword can contain up to 20 characters, and a maximum of 500 keywords separated by line breaks can be batch submitted at a time.
8. On the Custom Dictionary page, select the target dictionary and click in the Operation column to enable or disable it. Note:
After the custom dictionary is enabled, custom violation results will be returned in preference to the default dictionary.
After the dictionary is disabled, samples in it will not be used to match and recognize image content.
9.After configuring the custom dictionary, you can associate it with the policy created in Configure a task policy. You can skip this step if you use the preset default policy. The default policy is developed by TenDI based on models for multiple industries. It is suitable for most content security requirements.
1. Log in to the CMS console and select AMS > Policy Management on the left sidebar to enter the Policy Management page. 2. On the Policy Management page, click Create Policy in the top-left corner to enter the Create Policy page.
3. On the Create Policy page, set the relevant policy information, including the policy name, Biztype name, associated service template (not required currently), and industry category (select whether to use TenDI's preset industry templates for recognition), and click Next.
4. Configure the recognition policy, select whether to recognize different types of risky content based on your business needs, and click Next.
5. Configure the custom library and select whether to configure the custom dictionary you set. If there is no custom library, you can click Next to save the current policy and go to the Configure a custom dictionary step.
6. After the creation is completed, you can view the policy configuration information on this page. After confirming it, click Complete, and then the policy can be used in API calls.
Step 4. Create an AMS task
After completing the above steps, you can call the CreateAudioModerationTask API to create an audio stream recognition task as instructed below:
Note:
When connecting to the service, you can use API Explorer for online debugging.
Step 5. Get the AMS task result
After creating the audio recognition task, you can call the DescribeTaskDetail API to query the details of the task as instructed below:
If the API call is successful, you will receive the response output from the API, including the task details. You can refer to the example of viewing task details for more information on sample response parameters.
Was this page helpful?