User Dictionary Registration
This API is used for importing and exporting registered words in the user dictionary.
Retrieving Registered Words from User Dictionary
You can retrieve a list of registered words in JSON format.
Endpoint
GET https://acp-api.amivoice.com/profilewords/<dgn>/<pid>?adf=<adf>
Authentication
Please specify the APPKEY in the Authorization header.
Authorization: Bearer {APPKEY}
Request Parameters
Parameter Name | Parameter Name | Notes |
|---|---|---|
| dgn | Connection Engine Name | Specify a connection engine name such as -a-general. For available values, please see List of Speech Recognition Engines. Set it as a path parameter. |
| pid | Profile ID | Any string. Set it as a path parameter. |
| adf | Audio Data Format | Specify either 16k or 8k. If not specified, it defaults to 16k. Although some speech recognition engines support multiple sampling rates, user dictionary treats 8k and 16k as different engines, so you need to specify one. Set it as a query parameter. However, for End to End engines, 16k and 8k are treated as the same engine, so specification is not necessary. |
Retrieving Profile List
You can retrieve a list of profiles in JSON format.
Endpoint
GET https://acp-api.amivoice.com/profilewords/<dgn>/?adf=<adf>
Authentication
Please specify the APPKEY in the Authorization header.
Authorization: Bearer {APPKEY}
Request Parameters
Parameter Name | Parameter Name | Note |
|---|---|---|
| dgn | Connection engine name | Specify the connection engine name such as -a-general. For available values, please see List of Speech Recognition Engines. Set it as a path parameter. |
| adf | Audio data format | Specify either 16k or 8k. If not specified, it defaults to 16k. Although some speech recognition engines support multiple sampling rates, user dictionary is treated as different engines for 8k and 16k, so you need to specify one or the other. Set it as a query parameter. However, for End to End engines, 16k and 8k are treated as the same engine, so specification is not necessary. |
Registering Words in User Dictionary
You can replace words in the user dictionary for the specified speech recognition engine and profile ID.
Endpoint
POST https://acp-api.amivoice.com/profilewords/<dgn>/<pid>?adf=<adf>
Authentication
Please specify the APPKEY in the Authorization header.
Authorization: Bearer {APPKEY}
Request Parameters
Parameter Name | Parameter Name | Notes |
|---|---|---|
| dgn | Connection Engine Name | Specify a connection engine name such as -a-general. For available values, please see List of Speech Recognition Engines. Set it as a path parameter. |
| pid | Profile ID | Any string. Set it as a path parameter. |
| adf | Audio Data Format | Specify either 16k or 8k. If not specified, it defaults to 16k. Although some speech recognition engines support multiple sampling rates, user dictionary treats 8k and 16k as different engines, so you need to specify one. Set it as a query parameter. However, for End to End engines, 16k and 8k are treated as the same engine, so specification is not necessary. |
Content Type
Content-Type: application/json
Request Body
For Hybrid Engines
Field Name | Description | Notes |
|---|---|---|
profilewords | Word Registration Information | Specify the words you want to register in array format |
profilewords[].written | Written | Specify the written form of the word |
profilewords[].spoken | Pronunciation | Specify the pronunciation of the word |
profilewords[].classname | Class Name | Specify the class name. This can be omitted if not set. |
Example
{
"profilewords": [
{
"written": "AMI",
"spoken": "あみ",
},
{
"written": "AOI",
"spoken": "あおい",
},
{
"written": "躑躅森",
"spoken": "つつじもり",
"classname": "名前"
}
]
}
For End to End Engines
Field Name | Description | Notes |
|---|---|---|
profilewords | Keyword Biasing Information | Specify the words you want to boost in array format |
profilewords[].written | Written | Specify the written form of the word |
profilewords[].alternativewritten | Alternative Written | Specify the written form of the word to be replaced by the "Written" |
profilewords[].biasing | Biasing Level | Specify the strength of keyword biasing. Values from 0 to 1 can be specified, where 0 means no boost and 1 means strong boost at the cost of overall recognition accuracy. If not specified, it defaults to 0.5 |
It's possible to specify multiple alternative written for the same written. In this case, the same biasing level is applied to words with the same written. If different biasing levels are specified for the same written in the request, the value of the first occurrence in the request is adopted. In the following example, the biasing level for the same written "AMI" is uniformly applied with the value "0.8" which appears first. The biasing level for the third written "AOI" is applied with the default "0.5" as no specification is given.
Example
{
"profilewords": [
{
"written": "AMI",
"alternativewritten": "アドバンストメディア",
"biasing": 0.8
},
{
"written": "AMI",
"alternativewritten": "あみ"
},
{
"written": "AOI",
"alternativewritten": "あおい"
}
]
}