---
title: "テキストからアクセント句を得る"
method: POST
path: "/accent_phrases"
tags: ["クエリ編集"]
---

# テキストからアクセント句を得る

`POST /accent_phrases`

テキストからアクセント句を得ます。<br>
is_kanaが`true`のとき、テキストは次の AquesTalk 風記法で解釈されます。デフォルトは`false`です。
* 全てのカナはカタカナで記述される
* アクセント句は`/`または`、`で区切る。`、`で区切った場合に限り無音区間が挿入される。
* カナの手前に`_`を入れるとそのカナは無声化される
* アクセント位置を`'`で指定する。全てのアクセント句にはアクセント位置を1つ指定する必要がある。
* アクセント句末に`？`(全角)を入れることにより疑問文の発音ができる。

AivisSpeech Engine では英単語は常に自動的に自然なカタカナ読みに変換されて読み上げられる仕様のため、enable_katakana_english は指定不要です（常に無視されます）。

## Query parameters

- `text` string, required
- `speaker` integer, required
- `is_kana` boolean
- `enable_katakana_english` boolean — AivisSpeech Engine ではサポートされていないパラメータです (常に無視されます) 。
- `core_version` string — AivisSpeech Engine ではサポートされていないパラメータです (常に無視されます) 。

## Response `200`

Successful Response

- AccentPhrase[]
  - `moras` Mora[], required — モーラのリスト
    - `text` string, required — 子音＋母音に対応する文字。 VOICEVOX ENGINE と異なり、感嘆符・句読点などの記号もモーラに含まれる。 記号モーラの場合、`text` には記号がそのまま、`vowel` には "pau" が設定される。
    - `consonant` string — 子音の音素。
    - `consonant_length` number — 子音の音長。 AivisSpeech Engine の実装上算出できないため、ダミー値として常に 0.0 が返される。
    - `vowel` string, required — 母音の音素。
    - `vowel_length` number, required — 母音の音長。 AivisSpeech Engine の実装上算出できないため、ダミー値として常に 0.0 が返される。
    - `pitch` number, required — 音高。 AivisSpeech Engine の実装上算出できないため、ダミー値として常に 0.0 が返される。
  - `accent` integer, required — アクセント箇所
  - `pause_mora` Mora — モーラ（子音＋母音）ごとの情報。
    - `text` string, required — 子音＋母音に対応する文字。 VOICEVOX ENGINE と異なり、感嘆符・句読点などの記号もモーラに含まれる。 記号モーラの場合、`text` には記号がそのまま、`vowel` には "pau" が設定される。
    - `consonant` string — 子音の音素。
    - `consonant_length` number — 子音の音長。 AivisSpeech Engine の実装上算出できないため、ダミー値として常に 0.0 が返される。
    - `vowel` string, required — 母音の音素。
    - `vowel_length` number, required — 母音の音長。 AivisSpeech Engine の実装上算出できないため、ダミー値として常に 0.0 が返される。
    - `pitch` number, required — 音高。 AivisSpeech Engine の実装上算出できないため、ダミー値として常に 0.0 が返される。
  - `is_interrogative` boolean — 疑問系かどうか

## Other responses

- `400` — 読み仮名のパースに失敗
- `422` — Validation Error

## Changes

- **2026-07-17** `1d935a3e31b8` — 1 info
  - added the new optional `query` request parameter `enable_katakana_english`
- **2026-03-31** `bd7182f25e54` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2025-03-02** `d8b6a60f88af` — 1 info
  - api operation id `accent_phrases_accent_phrases_post` removed and replaced with `accent_phrases`
- **2024-10-29** `54501f4624fd` — 1 breaking, 7 info
  - the `items/pause_mora` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - added the optional property `items/pause_mora/consonant` to the response with the `200` status
  - added the optional property `items/pause_mora/consonant_length` to the response with the `200` status
  - removed `#/components/schemas/Mora` from the `items/pause_mora` response property `allOf` list for the response status `200`
  - …4 more
- **2024-10-05** `e86c0159e1bd` — 5 breaking, 2 warning, 1 info
  - the `items/pause_mora` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `items/pause_mora/pitch` from the response with the `200` status
  - removed the required property `items/pause_mora/text` from the response with the `200` status
  - removed the required property `items/pause_mora/vowel` from the response with the `200` status
  - …4 more

[Full history](https://skmtc.dev/aivis-project/apis/aivisspeech-engine/changes/accent_phrases/post.md)

---

[API](https://skmtc.dev/aivis-project/apis/aivisspeech-engine.md) · [All operations](https://skmtc.dev/aivis-project/apis/aivisspeech-engine/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aivis-project/aivisspeech-engine/revisions/1d935a3e31b8/schema)
