public class VocabularyService extends Object
| 构造器和说明 |
|---|
VocabularyService(String apikey) |
VocabularyService(String apikey,
String model) |
| 限定符和类型 | 方法和说明 |
|---|---|
Vocabulary |
createVocabulary(String targetModel,
String prefix,
com.google.gson.JsonArray vocabulary)
创建新热词
|
Vocabulary |
createVocabulary(String targetModel,
String prefix,
com.google.gson.JsonArray vocabulary,
VocabularyParam customParam) |
void |
deleteVocabulary(String vocabularyId)
删除热词表
|
void |
deleteVocabulary(String vocabularyId,
VocabularyParam customParam) |
String |
getLastRequestId()
获取最后一次请求的requestId
|
Vocabulary[] |
listVocabulary(String prefix)
查询已创建的所有热词表。
|
Vocabulary[] |
listVocabulary(String prefix,
int pageIndex,
int pageSize)
查询已创建的所有热词表
|
Vocabulary[] |
listVocabulary(String prefix,
int pageIndex,
int pageSize,
VocabularyParam customParam) |
Vocabulary |
queryVocabulary(String vocabularyId)
查询指定热词表
|
Vocabulary |
queryVocabulary(String vocabularyId,
VocabularyParam customParam) |
void |
updateVocabulary(String vocabularyId,
com.google.gson.JsonArray vocabulary)
更新热词表
|
void |
updateVocabulary(String vocabularyId,
com.google.gson.JsonArray vocabulary,
VocabularyParam customParam) |
public VocabularyService(String apikey)
public Vocabulary createVocabulary(String targetModel, String prefix, com.google.gson.JsonArray vocabulary) throws NoApiKeyException, InputRequiredException
targetModel - 热词对应的语音识别模型版本prefix - 热词自定义前缀,仅允许数字和小写字母,小于十个字符。vocabulary - 热词表NoApiKeyException - 如果apikey为空InputRequiredException - 如果必须参数为空public Vocabulary[] listVocabulary(String prefix) throws NoApiKeyException, InputRequiredException
prefix - 热词自定义前缀NoApiKeyException - 如果apikey为空InputRequiredException - 如果必须参数为空public Vocabulary[] listVocabulary(String prefix, int pageIndex, int pageSize) throws NoApiKeyException, InputRequiredException
prefix - 热词自定义前缀pageIndex - 查询的页索引pageSize - 查询的页大小NoApiKeyException - 如果apikey为空InputRequiredException - 如果必须参数为空public Vocabulary queryVocabulary(String vocabularyId) throws NoApiKeyException, InputRequiredException
vocabularyId - 需要查询的热词表NoApiKeyException - 如果apikey为空InputRequiredException - 如果必须参数为空public void updateVocabulary(String vocabularyId, com.google.gson.JsonArray vocabulary) throws NoApiKeyException, InputRequiredException
vocabularyId - 需要更新的热词表vocabulary - 热词表对象NoApiKeyException - 如果apikey为空InputRequiredException - 如果必须参数为空public void deleteVocabulary(String vocabularyId) throws NoApiKeyException, InputRequiredException
vocabularyId - 需要删除的热词表NoApiKeyException - 如果apikey为空InputRequiredException - 如果必须参数为空public Vocabulary createVocabulary(String targetModel, String prefix, com.google.gson.JsonArray vocabulary, VocabularyParam customParam) throws NoApiKeyException, InputRequiredException
public Vocabulary[] listVocabulary(String prefix, int pageIndex, int pageSize, VocabularyParam customParam) throws NoApiKeyException, InputRequiredException
public Vocabulary queryVocabulary(String vocabularyId, VocabularyParam customParam) throws NoApiKeyException, InputRequiredException
public void updateVocabulary(String vocabularyId, com.google.gson.JsonArray vocabulary, VocabularyParam customParam) throws NoApiKeyException, InputRequiredException
public void deleteVocabulary(String vocabularyId, VocabularyParam customParam) throws NoApiKeyException, InputRequiredException
public String getLastRequestId()
Copyright © 2024. All rights reserved.