Logo
Hotwords API

Cloud API (Form-Data)

Hotwords API protocol (Form-Data Format)

Create Hotwords Database

Basic Information

Path: /v1/hotwords

Method: POST

API Description: Upload a hotword list file to create a hotword database. There is no upper limit to the number of hotwords database you can create.

Hotwords List File Format

UTF-8 encoded text files.

Manually Extract Hotwords

One/group of hotwords per line, up to 30 characters per line, not to exceed 20000 lines. Set different formats according to the language.

  • Japanese/Japanese-English mixed: ["writing, pronunciation, category", "writing, pronunciation, category", ...]

  • Chinese/Chinese-English mixed/English: ["writing", "writing", ...]

For hot words that do not meet the requirements, the platform will automatically filter them out. Hot words in the following cases will be filtered out:

  • Consisting of only one column or two columns (applicable only to Japanese and Japanese-English mixed languages)
  • Categories not selected from the drop-down values
  • Containing only punctuation marks
  • Exceeding the character limit
  • Including emojis or special symbols
  • Empty content
  • Duplicate entries
  • Pronunciations not entered in hiragana or full-width katakana
  • When there are more than one column (applicable only to English, Chinese, and Chinese-English mixed languages)

Example of file contents:

早稲田大学,ワセダダイガク,固有名詞
新横浜,シンヨコハマ,地名

Automatically Extract Hotwords

The text content should not exceed 1,000,000 characters and 3 MB in size. Parameters need to be set auto_extraction = true 。Currently, only Chinese, Chinese-English mixed languages are supported.

Example of file contents:

中国第40次南极考察内陆队北京时间16日在中山站举行出征仪式,29名队员将分别前往泰山站、昆仑站和格罗夫山地区,开展相关科学考察。本次考察由自然资源部组织。这是中国首次派出3艘船执行南极考察任务,即雪龙号、雪龙二号和天惠轮。

Request Parameters

Body(form-data)

NameTypeRequiredDescriptionDefault Value
nameStringNoHotwords database namenone
lang_typeStringYesLanguage Code. Refer to Developer Guides - Language Supportrequired
fileFileYesHotwords list filerequired
auto_extractionBooleanNoWhether to automatically extract keywords from the content in the hotwords list file. Currently only Chinese and Chinese-English mixed languages are supportedfalse
idstringNoHotwords database ID
The following characters are supported: digits, letters (case-insensitive), underscores, and hyphens ([a-zA-Z0-9_-]). The length must not exceed 150 characters.
If no ID is specified, the system will automatically generate an ID.
Null

Return Parameters

NameTypeDescription
statusStringStatus code
messageStringStatus code description
dataObjectData
├─ idStringHotwords database ID

Example of request

curl --location 'https://api.voice.dolphin-ai.jp/v1/hotwords' \
--header 'Authorization: ••••••' \
--form 'file=@"name.txt"' \
--form 'lang_type="ja-JP"' \
--form 'name="test"'

Example of return

{
    "status": "000000",
    "message": "Success",
    "data": {
        "id": "HWABF229C4"
    }
}

Get a List of Hotword Database Information

Basic Information

Path: /v1/hotwords

Method: GET

API Description: Get information on all hotwords databases.

Request Parameters

NameTypeRequiredDescriptionDefault Value
nameStringNoHotwords database name or hotwords database IDnone
lang_typeStringNoLanguage codenone
page_sizeIntNoNumber of data per page, maximum 10010
page_indexIntNoPage number1

Return Parameters

NameTypeDescription
statusStringStatus code
messageStringStatus code description
dataObjectData
├─ amountIntThe number of hotwords database under the filtering conditions (such as hotwords database name or ID, language filtering)
├─ usedIntTotal number
├─ listobject[]
├─├─ idStringHotwords database ID
├─├─ nameStringHotwords database name
├─├─ lang_typeStringLanguage
├─├─ statusIntStatus 0: unused 1: in use
├─├─ amountIntNumber of entries
├─├─ update_timeStringLast modified time

Example of request

curl --location 'https://api.voice.dolphin-ai.jp/v1/hotwords' \
--header 'Authorization: ••••••'

Example of return

{
    "status": "000000",
    "message": "Success",
    "data": {
        "list": [
            {
                "id": "HWF21FA445",
                "name": "xxx",
                "lang_type": "ja-JP",
                "status": 0,
                "amount": 2,
                "updated_time": "2025-02-10 17:23:01"
            }
        ],
        "amount": 13,
        "used": 13
    }
}

Delete Hotwords Database

Basic Information

Path:/v1/hotwords/{hotwords_id}

Method: DELETE

API Description: Delete the hotwords database with the specified ID. Only the database that is not currently being used for recognition requests can be deleted.

Example of request

curl --location --request DELETE 'https://api.voice.dolphin-ai.jp/v1/hotwords/HWA3B0FD4F' \
--header 'Authorization: ••••••'

Example of return

{
    "status": "00000",
    "message": "success",
    "data": null
}

Return Parameters

NameTypeDescription
statusStringStatus code
messageStringStatus code description
dataObjectNone

Modify Hotwords Database Information

Basic Information

Path: /v1/hotwords/{hotwords_id}

Method: PUT

API Description: Modify the name of an existing hotword database or hotword list. Note: When modifying the hotwords list, all hotwords in the database will be overwritten by the new list.

Request Parameters

Body(form-data)

NameTypeRequiredDescriptionDefault Value
nameStringNoHotwords database name(and file. At least one is not empty)none
fileFileNoHotwords list file (and name. At least one is not empty)none
auto_extractionBooleanNoWhether to automatically extract keywords from the content in the hotwords list. Only Chinese and Chinese-English mixed languages are supported.false

Return Parameters

NameTypeDescription
statusStringStatus code
messageStringStatus code description
dataObjectData
├─ idStringHotwords database ID

Example of request

  1. Modify hotwords database name
curl --location --request PUT 'https://api.voice.dolphin-ai.jp/v1/hotwords/HWABF229C4' \
--header 'Authorization: ••••••' \
--form 'name="test2"'
  1. Modify the hotwords list file
curl --location --request PUT 'https://api.voice.dolphin-ai.jp/v1/hotwords/HWABF229C4' \
--header 'Authorization: ••••••' \
--form 'file=@"new.txt"'

Example of return

{
    "status": "000000",
    "message": "Success",
    "data": {
        "id": "HWABF229C4"
    }
}

Get Hotwords Database Information

Basic Information

Path: /v1/hotwords/{hotwords_id}

Method: GET

API Description: Get information about the hotwords database with the specified ID.

Return Parameters

NameTypeDescription
statusStringStatus code
messageStringStatus code description
dataObjectData
├─ idStringHotwords database ID
├─ nameStringHotwords database name
├─ lang_typeStringLanguage code
├─ statusIntStatus
0: unused
1: in use
├─ update_timeStringLast modified time
├─ wordsList<String>Hotwords list
├─ amountIntNumber of entries

Example of request

curl --location 'https://api.voice.dolphin-ai.jp/v1/hotwords/HWABF229C4' \
--header 'Authorization: ••••••'

Example of return

{
    "status": "000000",
    "message": "Success",
    "data": {
        "id": "HWABF229C4",
        "name": "test2",
        "lang_type": "ja-JP",
        "status": 0,
        "updated_time": "2025-01-22 15:09:14",
        "words": [
            "早稲田大学,ワセダダイガク,固有名詞"
        ],
        "amount": 1
    }
}

Download Hotwords Database

Basic Information

Path: /v1/hotwords/download/{hotwords_id}

Method: GET

API Description: Download the hotwords database of the specified ID.

Example of request

curl --location 'https://api.voice.dolphin-ai.jp/v1/hotwords/download/HWF8C024CA' \
--header 'Authorization: ••••••'

Example of return

Starting from the second line, enter one hot word per line. Note: For hot words in Japanese or mixed Japanese-English languages, you need to maintain 'writing, pronunciation, class' with three items separated by commas. If any item is missing, it is considered an invalid hot word. For hot words in other languages, only the 'writing' needs to be maintained.
インスパイア,コンニチハ,固有名詞
カタカナ,コンニチハ,固有名詞
プレゼント,コンニチハ,固有名詞