All Products
Search
Document Center

Create an extended hotword vocabulary through the POP API

Last Updated: Jun 02, 2020

You can manage extended hotwords on your client, rather than through the console settings, by calling the following pctowap open platform (POP) API operations:

  • POP API operation for creating hotword vocabularies: CreateAsrVocab
  • POP API operation for obtaining hotword vocabularies: GetAsrVocab
  • POP API operation for updating hotword vocabularies: UpdateAsrVocab
  • POP API operation for deleting hotword vocabularies: DeleteAsrVocab
  • POP API operation for listing all hotword vocabularies: ListAsrVocab

Restrictions

  1. By default, a maximum of 10 vocabularies can be created.
  2. One vocabulary contains a maximum of 128 hotwords, each of which must be 1 to 32 characters in length.
  3. Extended hotwords must be encoded in UTF-8 and cannot contain punctuation marks or special characters.
  4. The wight of each hotword must be an integer ranging from -6 to 5. The weight indicates the probability that the corresponding hotword can be recognized. A weight greater than 0 indicates a higher probability, while a weight smaller than 0 indicates a lower probability. The weight -6 indicates that the corresponding hotword is least likely to be recognized. The weight 2 is commonly used. If the recognition effect is poor, you can increase the weight appropriately. A high weight of a hotword may deteriorate the recognition effect of other hotwords.

CreateAsrVocab

You can call this operation to create a hotword vocabulary. One vocabulary contains extended hotwords of the same type.

Request parameters

When you submit the request for creating a hotword vocabulary, you need to specify the request parameters in the request body. The following table describes the request parameters.

Parameter Type Required Description
Name String Yes The name of the vocabulary to be created.
Description String No The description of the vocabulary to be created.
WordWeights String Yes The JSON map of the hotwords in the vocabulary and their corresponding weight, for example, “{\”apple\”: 3, \”watermelon\”: 3}”. In each key-value pair, the key is an extended hotword of the String type, and the value is the weight of the extended hotword of the Integer type.

For more information about hotwords and their weight, see the Restrictions section.

Response parameters

After you submit the request for creating a hotword vocabulary, the response parameters returned are in JSON format.

Sample success response:

  1. {
  2. "VocabId": "0074ac87db754e0fbd3465c60d86e118",
  3. "RequestId": "77C00AE4-A646-4A41-B6FF-F06C19FACE76"
  4. }

Parameter description:

  • The HTTP status code 200 indicates that the operation is successful. For more information about the error codes, see the Error codes section.
  • The following table describes the parameters returned in JSON format.
Parameter Type Description
RequestId String The ID of the request.
VocabId String The ID of the vocabulary that was created. The ID is required for obtaining, updating, or deleting the vocabulary later.

GetAsrVocab

You can call this operation to obtain information about a specified vocabulary based on the vocabulary ID.

Request parameters

When you submit the request for obtaining a hotword vocabulary, you need to specify the request parameters in the request body. The following table describes the request parameters.

Parameter Type Required Description
Id String Yes The ID of the vocabulary that you want to obtain. The ID was generated when the corresponding vocabulary was created.

Response parameters

After you submit the request for obtaining a hotword vocabulary, the response parameters returned are in JSON format.

Sample success response:

  1. {
  2. "RequestId": "A590423E-FEBC-4AA0-A520-4DA772929E04",
  3. "Vocab": {
  4. "Name": "Test vocabulary",
  5. "Md5": "58c732d3b31eb564c275371d46fcdfc0",
  6. "Description":"Test vocabulary description",
  7. "CreateTime": "2018-11-26 17:19:40",
  8. "UpdateTime": "2018-11-26 17:19:40",
  9. "Id": "6118b2a057d1440bb253382a76177ced",
  10. "WordWeights": {
  11. "Watermelon": 3,
  12. "Apple": 3
  13. },
  14. "Size": 323
  15. }
  16. }

Parameter description:

  • The HTTP status code 200 indicates that the operation is successful. For more information about the error codes, see the Error codes section.
  • The following table describes the parameters returned in JSON format.
Parameter Type Description
RequestId String The ID of the request.
Vocab Vocab object A Vocab object contains the parameters in the following table.

The following table describes the parameters in a Vocab object.

Parameter Type Description
Id String The ID of the vocabulary that was obtained. The ID was generated when the corresponding vocabulary was created.
Name String The name of the vocabulary that was obtained.
Description String The description of the vocabulary that was obtained.
Size Integer The size of the compiled vocabulary.
Md5 String The MD5 value of the compiled vocabulary.
CreateTime String The time when the vocabulary was created.
UpdateTime String The last time when the vocabulary was updated.
WordWeights Map The map of the extended hotwords in the vocabulary and their corresponding weight.

UpdateAsrVocab

You can call this operation to update a specified vocabulary based on the vocabulary ID. You can change the vocabulary name, vocabulary description, hotwords in the vocabulary, and the weight of the hotwords.

Request parameters

When you submit the request for updating a hotword vocabulary, you need to specify the request parameters in the request body. The following table describes the request parameters.

Parameter Type Required Description
Id String Yes The ID of the vocabulary that you want to update. The ID was generated when the corresponding vocabulary was created.
Name String Yes The new name of the vocabulary.
Description String No The new description of the vocabulary.
WordWeights String Yes The JSON map of the extended hotwords in the new vocabulary and their corresponding weight.

Response parameters

After you submit the request for updating a hotword vocabulary, the response parameters returned are in JSON format.

Sample success response:

  1. {
  2. "RequestId": "829E373C-9E23-4DEF-A979-002F140B2FCC"
  3. }

Parameter description:

  • The HTTP status code 200 indicates that the operation is successful. For more information about the error codes, see the Error codes section.
  • The following table describes the parameters returned in JSON format.
Parameter Type Description
RequestId String The ID of the request.

DeleteAsrVocab

You can call this operation to delete a specified vocabulary based on the vocabulary ID.

Request parameters

When you submit the request for deleting a hotword vocabulary, you need to specify the request parameter in the request body. The following table describes the request parameters.

Parameter Type Required Description
Id String Yes The ID of the vocabulary that you want to delete. The ID was generated when the corresponding vocabulary was created.

Response parameters

After you submit the request for deleting a hotword vocabulary, the response parameters returned are in JSON format.

Sample success response:

  1. {
  2. "RequestId": "75CCBD40-BC19-4227-9140-0F42806BBF6F"
  3. }

Parameter description:

  • The HTTP status code 200 indicates that the operation is successful. For more information about the error codes, see the Error codes section.
  • The following table describes the parameters returned in JSON format.
Parameter Type Description
RequestId String The ID of the request.

ListAsrVocab

You can call this operation to list all vocabularies on a specified page.

Note: To ensure an appropriate size of the response body, the specific extended hotwords or their corresponding weight are not contained in the response body.

Request parameters

When you submit the request for listing all hotword vocabularies, you need to specify the request parameters in the request body. The following table describes the request parameters.

Parameter Type Required Description
PageNumber Integer No The number of the page that contains the required vocabularies. The value is an integer greater than 0. Default value: 1.
PageSize Integer No The number of vocabularies on each page. Valid values: 10 to 100. Default value: 10.[10, 100]

Note:The server sorts vocabularies in descending order based on the last update time of the vocabularies. If excessive vocabularies are obtained at the same time, the HTTP request body will be so large that it may be intercepted by the gateway or proxy. In this case, you need to obtain the specified vocabularies by page. The PageSize parameter specifies the number of vocabularies on each page. If the number of vocabularies on the specified page is smaller than the value of PageSize, all vocabularies on the page are returned. The PageNumber parameter specifies the number of the page that contains the required vocabularies.

Response parameters

After you submit the request for listing all hotword vocabularies, the response parameters returned are in JSON format.

Sample success response:

  1. {
  2. "Page": {
  3. "PageNumber": 1,
  4. "PageSize": 10,
  5. "TotalItems": 5,
  6. "TotalPages": 1,
  7. "Content": [{
  8. "Name": "Test vocabulary_1",
  9. "Md5": "eafaaf1d73b17c9d35c64d600e0793d9",
  10. "Description":"Test vocabulary description_1",
  11. "CreateTime": "2018-11-26 17:51:41",
  12. "UpdateTime": "2018-11-26 17:51:41",
  13. "Id": "266df2819a9d4d96a07c5c5d39b6430e",
  14. "Size": 323
  15. }, {
  16. "Name": "Test vocabulary_2",
  17. "Md5": "f32c10fd8569cb3712576a0ea988d469",
  18. "Description":"Test vocabulary description_2",
  19. "CreateTime": "2018-11-26 17:51:41",
  20. "UpdateTime": "2018-11-26 17:51:41",
  21. "Id": "0fa718759c034f67bb3e394d2fd9866b",
  22. "Size": 323
  23. }]
  24. },
  25. "RequestId": "CB7B4AB4-5C16-4617-8B91-519A130E8991"
  26. }

Parameter description:

  • The HTTP status code 200 indicates that the operation is successful. For more information about the error codes, see the Error codes section.
  • The following table describes the parameters returned in JSON format.
Parameter Type Description
RequestId String The ID of the request.
Page Page object A Page object contains the parameters in the following table. If the request parameter PageNumber is specified, the information about the vocabularies on the specified page is returned. If the request parameter PageNumber is not specified, the information about the vocabularies on the first page is returned.

The following table describes the parameters in a Page object.

Parameter Type Description
Content List< Vocab > The list of vocabularies. The parameters involved are the same as those contained in a Vocab object, excluding the WordWeights parameter. For more information, see the parameter description of the Vocab object in the GetAsrVocab section.
PageNumber Integer The number of the page that contains the required vocabularies. The value is the same as that of the corresponding request parameter.
PageSize Integer The number of vocabularies on each page. The value is the same as that of the corresponding request parameter.
TotalPages Integer The total number of pages.
TotalItems Integer The total number of vocabularies.

Error codes

After you submit requests for creating, obtaining, updating, deleting, and listing vocabularies, if the returned HTTP status code is not 200, the requests failed. The failure information in JSON format is contained in the HTTP response body. The following table describes the error codes.

Error code Description Scheme
SLP.PAGE_NUMBER_INVALID The error code returned because the value of the PageNumber parameter is invalid when the ListAsrVocab operation is called. Verify that the value of the PageNumber parameter is an integer greater than 0.
SLP.PAGE_SIZE_INVALID The error code returned because the value of the PageSize parameter is invalid when the ListAsrVocab operation is called. Verify that the value of the PageSize parameter is an integer among the valid values. Valid values:[10, 100]
SLP.NOT_FOUND The error code returned because the specified vocabulary ID does not exist. Verify that the vocabulary ID is valid.
SLP.PARAMETER_ERROR The error code returned because the request parameters are incorrectly set. Check parameter settings based on the specific error message.
SLP.EXCEED_LIMIT The error code returned because the number of existing vocabularies has reached the upper limit. Make sure that the current number of vocabularies has not reached the upper limit. By default, each user can create a maximum of 10 extended hotword vocabularies.
SLP.ASR_VOCAB_ERROR Other errors. Fix the problem based on the specific error message.

The following example shows an error response returned when the number of existing vocabularies has reached the upper limit:

  1. {
  2. "RequestId": "848C33E3-5A74-4BF8-9BE6-B78576C6388A",
  3. "HostId": "nls-slp.ap-southeast-1.aliyuncs.com",
  4. "Code": "SLP.EXCEED_LIMIT",
  5. "Message": "Vocab count has reached the limit! (max: 10)"
  6. }

Demo code

Note: A Java demo is provided. It uses the CommonRequest method of the Alibaba Cloud SDK for Java to send POP API requests in a remote procedure call (RPC) style. For more information about how to use the CommonRequest method of the Alibaba Cloud SDK for Java, see Use CommonRequest.

Add Java dependencies:You only need to add dependencies on the core library of the Alibaba Cloud SDK for Java and the Alibaba open source library fastjson. The core library version of the Alibaba Cloud SDK for Java must be V3.5.0 or later. If the version is V4.0.0 or later, you need to add dependencies on third-party libraries as prompted.

  1. <dependency>
  2. <groupId>com.aliyun</groupId>
  3. <artifactId>aliyun-java-sdk-core</artifactId>
  4. <version>3.7.1</version>
  5. </dependency>
  6. <dependency>
  7. <groupId>com.alibaba</groupId>
  8. <artifactId>fastjson</artifactId>
  9. <version>1.2.49</version>
  10. </dependency>

Sample code

  1. import com.alibaba.fastjson.JSONObject;
  2. import com.aliyuncs.CommonRequest;
  3. import com.aliyuncs.CommonResponse;
  4. import com.aliyuncs.DefaultAcsClient;
  5. import com.aliyuncs.IAcsClient;
  6. import com.aliyuncs.exceptions.ClientException;
  7. import com.aliyuncs.http.MethodType;
  8. import com.aliyuncs.http.ProtocolType;
  9. import com.aliyuncs.profile.DefaultProfile;
  10. import java.util.ArrayList;
  11. import java.util.HashMap;
  12. import java.util.List;
  13. import java.util.Map;
  14. public class AsrVocabPopApiDemo {
  15. /**
  16. * The region information.
  17. * Use the constant values.
  18. */
  19. private static final String REGION_ID = "ap-southeast-1";
  20. private static final String DOMAIN = "nls-slp.ap-southeast-1.aliyuncs.com";
  21. private static final ProtocolType PROTOCOL_TYPE = ProtocolType.HTTPS;
  22. /**
  23. * The POP API information.
  24. * Use the constant values.
  25. */
  26. private static final String API_VERSION = "2019-08-19";
  27. private static final String ACTION_CREATE_ASR = "CreateAsrVocab";
  28. private static final String ACTION_GET_ASR_VOCAB = "GetAsrVocab";
  29. private static final String ACTION_LIST_ASR_VOCAB = "ListAsrVocab";
  30. private static final String ACTION_UPDATE_ASR_VOCAB = "UpdateAsrVocab";
  31. private static final String ACTION_DELETE_ASR_VOCAB = "DeleteAsrVocab";
  32. /**
  33. * The keys of parameters.
  34. * Use the constant values.
  35. */
  36. private static final String KEY_VOCAB_ID = "VocabId";
  37. private static final String KEY_ID = "Id";
  38. private static final String KEY_NAME = "Name";
  39. private static final String KEY_DESCRIPTION = "Description";
  40. private static final String KEY_WORD_WEIGHTS = "WordWeights";
  41. private static final String KEY_VOCAB = "Vocab";
  42. private static final String KEY_PAGE = "Page";
  43. private static final String KEY_PAGE_NUMBER = "PageNumber";
  44. private static final String KEY_PAGE_SIZE = "PageSize";
  45. // Create and authenticate a client.
  46. private static IAcsClient client;
  47. static class Vocab {
  48. public String Id;
  49. public String Name;
  50. public String Description;
  51. public int Size;
  52. public String Md5;
  53. public String CreateTime;
  54. public String UpdateTime;
  55. public Map<String, Integer> WordWeights = new HashMap<String, Integer>();
  56. }
  57. static class Page {
  58. class VocabContent {
  59. public String Id;
  60. public String Name;
  61. public String Description;
  62. public int Size;
  63. public String Md5;
  64. public String CreateTime;
  65. public String UpdateTime;
  66. }
  67. public int PageNumber;
  68. public int PageSize;
  69. public int TotalItems;
  70. public int TotalPages;
  71. public List<VocabContent> Content = new ArrayList<VocabContent>();
  72. }
  73. public AsrVocabPopApiDemo(String akId, String akSecret) {
  74. DefaultProfile profile = DefaultProfile.getProfile(REGION_ID, akId, akSecret);
  75. client = new DefaultAcsClient(profile);
  76. }
  77. private CommonRequest newRequest(String action) {
  78. CommonRequest request = new CommonRequest();
  79. request.setDomain(DOMAIN);
  80. request.setProtocol(PROTOCOL_TYPE);
  81. request.setVersion(API_VERSION);
  82. request.setMethod(MethodType.POST);
  83. request.setAction(action);
  84. return request;
  85. }
  86. /**
  87. * Create a vocabulary.
  88. *
  89. * @param name Required. The name of the vocabulary to be created.
  90. * @param description Optional. The description of the vocabulary to be created.
  91. * @param wordWeights Required. The JSON map of the hotwords in the vocabulary to be created and their corresponding weight.
  92. *
  93. * @return String The ID of the created vocabulary.
  94. */
  95. String createAsrVocab(String name, String description, String wordWeights) {
  96. CommonRequest request = newRequest(ACTION_CREATE_ASR);
  97. request.putBodyParameter(KEY_NAME, name);
  98. request.putBodyParameter(KEY_DESCRIPTION, description);
  99. request.putBodyParameter(KEY_WORD_WEIGHTS, wordWeights);
  100. CommonResponse response = null;
  101. try {
  102. response = client.getCommonResponse(request);
  103. } catch (ClientException e) {
  104. e.printStackTrace();
  105. }
  106. if (response.getHttpStatus() != 200) {
  107. System.out.println(response.getData());
  108. System.out.println("The vocabulary fails to be created. HTTP error code:" + response.getHttpStatus());
  109. return null;
  110. }
  111. JSONObject result = JSONObject.parseObject(response.getData());
  112. String vocabId = result.getString(KEY_VOCAB_ID);
  113. return vocabId;
  114. }
  115. /**
  116. * Obtain a vocabulary.
  117. *
  118. * @param vocabId The ID of the vocabulary to be obtained.
  119. *
  120. * @return Vocab The Vocab object.
  121. */
  122. Vocab getAsrVocab(String vocabId) {
  123. CommonRequest request = newRequest(ACTION_GET_ASR_VOCAB);
  124. request.putBodyParameter(KEY_ID, vocabId);
  125. CommonResponse response = null;
  126. try {
  127. response = client.getCommonResponse(request);
  128. } catch (ClientException e) {
  129. e.printStackTrace();
  130. }
  131. if (response.getHttpStatus() != 200) {
  132. System.out.println(response.getData());
  133. System.out.println("The vocabulary fails to be obtained. HTTP error code:" + response.getHttpStatus());
  134. return null;
  135. }
  136. JSONObject result = JSONObject.parseObject(response.getData());
  137. String vocabJson = result.getString(KEY_VOCAB);
  138. Vocab vocab = JSONObject.parseObject(vocabJson, Vocab.class);
  139. return vocab;
  140. }
  141. /**
  142. * Update a vocabulary.
  143. *
  144. * @param vocabId The ID of the vocabulary to be updated.
  145. * @param name The new name of the vocabulary.
  146. * @param description The new description of the vocabulary.
  147. * @param wordWeights The JSON map of the extended hotwords in the new vocabulary and their corresponding weight.
  148. *
  149. * @return boolean Indicates whether the vocabulary is updated.
  150. */
  151. boolean updateAsrVocab(String vocabId, String name, String description, String wordWeights) {
  152. CommonRequest request = newRequest(ACTION_UPDATE_ASR_VOCAB);
  153. request.putBodyParameter(KEY_ID, vocabId);
  154. request.putBodyParameter(KEY_NAME, name);
  155. request.putBodyParameter(KEY_DESCRIPTION, description);
  156. request.putBodyParameter(KEY_WORD_WEIGHTS, wordWeights);
  157. CommonResponse response = null;
  158. try {
  159. response = client.getCommonResponse(request);
  160. } catch (ClientException e) {
  161. e.printStackTrace();
  162. }
  163. if (response.getHttpStatus() != 200) {
  164. System.out.println(response.getData());
  165. System.out.println("The vocabulary fails to be updated. HTTP error code:" + response.getHttpStatus());
  166. return false;
  167. }
  168. return true;
  169. }
  170. /**
  171. * Delete a vocabulary.
  172. *
  173. * @param vocabId The ID of the vocabulary to be deleted.
  174. *
  175. * @return boolean Indicates whether the vocabulary is deleted.
  176. * */
  177. boolean deleteAsrVocab(String vocabId) {
  178. CommonRequest request = newRequest(ACTION_DELETE_ASR_VOCAB);
  179. request.putBodyParameter(KEY_ID, vocabId);
  180. CommonResponse response = null;
  181. try {
  182. response = client.getCommonResponse(request);
  183. } catch (ClientException e) {
  184. e.printStackTrace();
  185. }
  186. if (response.getHttpStatus() != 200) {
  187. System.out.println(response.getData());
  188. System.out.println("The vocabulary fails to be deleted. HTTP error code:" + response.getHttpStatus());
  189. return false;
  190. }
  191. return true;
  192. }
  193. /**
  194. * List all vocabularies on a specified page.
  195. * If you do not specify the number of the page that contains the required vocabularies, the vocabularies on the first page are returned.
  196. * If you do not specify the number of vocabularies on each page, each page contains 10 vocabularies.
  197. *
  198. * @return Page The information about the returned vocabularies.
  199. */
  200. Page listAsrVocab() {
  201. CommonRequest request = newRequest(ACTION_LIST_ASR_VOCAB);
  202. request.putBodyParameter(KEY_PAGE_NUMBER, 1);
  203. request.putBodyParameter(KEY_PAGE_SIZE, 10);
  204. CommonResponse response = null;
  205. try {
  206. response = client.getCommonResponse(request);
  207. } catch (ClientException e) {
  208. e.printStackTrace();
  209. }
  210. if (response.getHttpStatus() != 200) {
  211. System.out.println(response.getData());
  212. System.out.println("The vocabularies on the specified page fail to be listed. HTTP error code:" + response.getHttpStatus());
  213. return null;
  214. }
  215. JSONObject result = JSONObject.parseObject(response.getData());
  216. String pageJson = result.getString(KEY_PAGE);
  217. Page page = JSONObject.parseObject(pageJson, Page.class);
  218. return page;
  219. }
  220. public static void main(String[] args) {
  221. if (args.length < 2) {
  222. System.err.println("FileASRDemo need params: <AccessKey Id> <AccessKey Secret>");
  223. return;
  224. }
  225. String accessKeyId = args[0];
  226. String accessKeySecret = args[1];
  227. AsrVocabPopApiDemo demo = new AsrVocabPopApiDemo(accessKeyId, accessKeySecret);
  228. // The ID of the vocabulary.
  229. String vocabId = null;
  230. /**
  231. * Create a vocabulary.
  232. */
  233. String name = "Test vocabulary";
  234. String description = "Test vocabulary description";
  235. String wordWeights = "{\"Apple\": 3, \"Watermelon\": 3}";
  236. vocabId = demo.createAsrVocab(name, description, wordWeights);
  237. if (vocabId != null) {
  238. System.out.println("The vocabulary is created. Vocabulary ID:" + vocabId);
  239. }
  240. else {
  241. System.out.println("The vocabulary fails to be created.") ;
  242. return;
  243. }
  244. /**
  245. * Obtain a vocabulary.
  246. */
  247. Vocab vocab = demo.getAsrVocab(vocabId);
  248. if (vocab != null) {
  249. System.out.println("The vocabulary is obtained:" + JSONObject.toJSONString(vocab));
  250. }
  251. else {
  252. System.out.println("The vocabulary fails to be obtained.") ;
  253. }
  254. /**
  255. * Update a vocabulary.
  256. */
  257. name = "Test vocabulary 2";
  258. description = "Test vocabulary description 2";
  259. wordWeights = "{\"Apple\": 2, \"Watermelon\": 2}";
  260. boolean isUpdated = demo.updateAsrVocab(vocabId, name, description, wordWeights);
  261. if (isUpdated) {
  262. System.out.println("The vocabulary is updated:" + JSONObject.toJSONString(demo.getAsrVocab(vocabId)));
  263. }
  264. else {
  265. System.out.println("The vocabulary fails to be updated.") ;
  266. }
  267. /**
  268. * Delete a vocabulary.
  269. */
  270. boolean isDeleted = demo.deleteAsrVocab(vocabId);
  271. if (isDeleted) {
  272. System.out.println("The vocabulary is deleted.") ;
  273. }
  274. else {
  275. System.out.println("The vocabulary fails to be deleted.") ;
  276. }
  277. /**
  278. * List all vocabularies.
  279. */
  280. // Create multiple vocabularies.
  281. for (int i = 0; i < 10; i++) {
  282. name = "Test vocabulary_" + String.valueOf(i);
  283. description = "Test vocabulary description_" + String.valueOf(i);
  284. JSONObject jsonObject = new JSONObject();
  285. jsonObject.put("Apple", 2);
  286. jsonObject.put("Watermelon", 2);
  287. wordWeights = jsonObject.toJSONString();
  288. demo.createAsrVocab(name, description, wordWeights);
  289. }
  290. // List created vocabularies.
  291. Page page = demo.listAsrVocab();
  292. if (page != null) {
  293. System.out.println("The created vocabularies are listed:" + JSONObject.toJSONString(page));
  294. }
  295. else {
  296. System.out.println("The created vocabularies fail to be listed.") ;
  297. return;
  298. }
  299. // Delete all vocabularies.
  300. for (int i = 0; i < page.Content.size(); i++) {
  301. demo.deleteAsrVocab(page.Content.get(i).Id);
  302. }
  303. page = demo.listAsrVocab();
  304. if (page != null) {
  305. System.out.println("All vocabularies are deleted:" + JSONObject.toJSONString(page));
  306. }
  307. }
  308. }