Skip to main content

User Word Registration

This API is for importing and exporting user-registered words.

Retrieving User-Registered Words

You can retrieve a list of registered words in JSON format.

Endpoint

GET https://acp-api.amivoice.com/profilewords/<dgn>/<pid>

Authentication

Please specify the APPKEY in the Authorization header.

Authorization: Bearer {APPKEY}

Request Parameters

Parameter Name
Parameter Name
Notes
dgnConnection Engine NameSpecify a connection engine name such as -a-general. For available values, please see List of Speech Recognition Engines. Set as a path parameter.
pidProfile IDAny string. Set as a path parameter.
adfAudio Data FormatSpecify either 16k or 8k. If not specified, it defaults to 16k. Although some speech recognition engines support multiple sampling rates, word registration treats 8k and 16k as different engines, so you need to specify one. Set as a query parameter.
warning

The adf parameter is currently not supported. It will be supported soon. Please note that word registration for 8k engines is not available.

Retrieving Profile List

You can retrieve a list of profiles in JSON format.

Endpoint

GET https://acp-api.amivoice.com/profilewords/<dgn>/

Authentication

Please specify the APPKEY in the Authorization header.

Authorization: Bearer {APPKEY}

Request Parameters

Parameter Name
Parameter Description
Note
dgnConnection engine nameSpecify the connection engine name such as -a-general. For available values, please see List of Speech Recognition Engines. Set as a path parameter.
adfAudio data formatSpecify either 16k or 8k. If not specified, it defaults to 16k. Although some speech recognition engines support multiple sampling rates, word registration is treated as different engines for 8k and 16k, so you need to specify one or the other. Set as a query parameter.
warning

"Retrieving Profile List" is currently not supported. It will be supported soon.

Registering User Words

You can replace user-registered words for the specified speech recognition engine and profile ID.

Endpoint

POST https://acp-api.amivoice.com/profilewords/<dgn>/<pid>

Authentication

Please specify the APPKEY in the Authorization header.

Authorization: Bearer {APPKEY}

Request Parameters

Parameter Name
Parameter Name
Notes
dgnConnection Engine NameSpecify a connection engine name such as -a-general. For available values, please see [List of Speech Recognition Engines] (/amivoice-api/manual/engines#list). Set as a path parameter.
pidProfile IDAny string. Set as a path parameter.
adfAudio Data FormatSpecify either 16k or 8k. If not specified, it defaults to 16k. Although some [speech recognition engines] (/amivoice-api/manual/engines#list) support multiple sampling rates, word registration treats 8k and 16k as different engines, so you need to specify one. Set as a query parameter.

Content Type

Content-Type: application/json

Request Body

Field Name
Description
Notes
profilewordsWord Registration InformationSpecify the words you want to register in array format
profilewords[].writtenWritten FormSpecify the written form of the word
profilewords[].spokenPronunciationSpecify the pronunciation of the word
profilewords[].classnameClass NameSpecify the class name. This can be omitted if not set.

Example

{
"profilewords": [
{
"written": "AMI",
"spoken": "あみ",
},
{
"written": "AOI",
"spoken": "あおい",
},
{
"written": "躑躅森",
"spoken": "つつじもり",
"classname": "名前"
}
]
}

Response

On Success

HTTP Status Code: 200 OK

Response Body

Field Name
Description
Notes
profilewordsWord Registration InformationRegistered words are obtained in array format
profilewords[].writtenWritten FormThe written form of the word is obtained
profilewords[].spokenPronunciationThe pronunciation of the word is obtained
profilewords[].classnameClass NameThe class name is returned. It is omitted if not set

Example

{
"profilewords": [
{
"written": "AMI",
"spoken": "あみ",
},
{
"written": "AOI",
"spoken": "あおい",
},
{
"written": "躑躅森",
"spoken": "つつじもり",
"classname": "名前"
}
]
}

On Failure

HTTP Status Code: Other than 200

Response Body

Field Name
Description
Notes
codeError CodeCode indicating the type of error
messageError MessageText explaining the details of the error content

Error Codes and Error Messages

HTTP Status Code
Response BodyError Situation
404 Not Found{"code":"?","message":"missing dictation grammar file name"}When the dictation grammar file name <dgn> is not specified
404 Not Found{"code":"?","message":"missing profile id"}When the profile ID <pid> is not specified
405 Method Not Allowed{"code":"?","message":"POST method is not allowed"}When POST is specified
400 Bad Request{"code":"-","message":"missing request body"}When a POST method is requested but no request body is specified
400 Bad Request{"code":"-","message":"invalid request body (<optionalMessage>)"}When the request body is not valid JSON
422 Unprocessable Entity{"code":"-","message":"missing profile words"}When the JSON specified in the request body is not in the expected format
422 Unprocessable Entity{"code":"-","message":"invalid written: <written>"}When the written form/pronunciation/word class in the JSON specified in the request body is incorrect
422 Unprocessable Entity{"code":"-","message":"invalid written: <spoken>"}When the written form/pronunciation/word class in the JSON specified in the request body is incorrect
422 Unprocessable Entity{"code":"-","message":"invalid written: <className>"}When the written form/pronunciation/word class in the JSON specified in the request body is incorrect
401 Unauthorized{"code":"-","message":"can't verify service authorization"}When authentication of the APPKEY (service authentication key string) fails
401 Unauthorized{"code":"-","message":"service authorization has expired: <expirationTime> (<expiresIn>)"}When authentication of the APPKEY (service authentication key string) fails
500 Internal Server Error{"code":"?","message":"unexpected exception occurred (<optionalMessage>)"}When an unexpected exception occurs

Example

{
"code":"?",
"message":"missing dictation grammar file name"
}