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

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

`POST /accent_phrases`

テキストからアクセント句を得ます。

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

## Query parameters

- `text` string, required
- `speaker` integer, required
- `is_kana` boolean
- `enable_katakana_english` boolean
- `core_version` string

## Response `200`

Successful Response

- AccentPhrase[]
  - `moras` Mora[], required — モーラのリスト
    - `text` string, required — 文字
    - `consonant` string — 子音の音素
    - `consonant_length` number — 子音の長さ
    - `vowel` string, required — 母音の音素
    - `vowel_length` number, required — 母音の長さ
    - `pitch` number, required — 音高
  - `accent` integer, required — アクセント箇所
  - `pause_mora` Mora — モーラ（子音＋母音）ごとの情報。
    - `text` string, required — 文字
    - `consonant` string — 子音の音素
    - `consonant_length` number — 子音の長さ
    - `vowel` string, required — 母音の音素
    - `vowel_length` number, required — 母音の長さ
    - `pitch` number, required — 音高
  - `is_interrogative` boolean — 疑問系かどうか

## Other responses

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

## Changes

- **2025-06-17** `defa0e760ef0` — 1 info
  - added the new optional `query` request parameter `enable_katakana_english`
- **2025-03-02** `d8b6a60f88af` — 1 info
  - api operation id `accent_phrases_accent_phrases_post` removed and replaced with `accent_phrases`
- **2025-01-03** `b7afc41080b3` — 1 breaking, 7 info
  - the `items/pause_mora` response's property type changed from no type 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-01-28** `2e8475c446af` — 1 breaking, 1 warning, 1 info
  - the `query` request parameter `speaker` became required
  - deleted the `query` request parameter `style_id`
  - `query` request parameter `speaker` was reactivated
- **2024-01-22** `ba5021ec9a6d` — 3 info
  - added the new optional `query` request parameter `style_id`
  - the `query` request parameter `speaker` became optional
  - `query` request parameter `speaker` was deprecated

[Full history](https://skmtc.dev/voicevox/apis/voicevox-engine-oss/changes/accent_phrases/post.md)

---

[API](https://skmtc.dev/voicevox/apis/voicevox-engine-oss.md) · [All operations](https://skmtc.dev/voicevox/apis/voicevox-engine-oss/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/voicevox/voicevox-engine-oss/revisions/fbe86976d6b9/schema)
