> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get accent phrases from text

> Get accent phrases from text.

When is_kana is `true`, text is interpreted as AquesTalk-style notation. Default is `false`.
* All kana must be written in Katakana
* Accent phrases are separated by `/` or `,`. When separated by `,`, a silence interval is inserted.
* Prepending `_` before a kana makes that kana voiceless.
* Accent position is specified with `'`. If all accent positions are omitted, the engine automatically assigns accents.
* Accent positions within the same accent phrase must be consistent.



## OpenAPI

````yaml https://raw.githubusercontent.com/invokable/laravel-voicevox/refs/heads/main/docs/en/laravel-openapi.json post /accent_phrases
openapi: 3.1.0
info:
  title: VOICEVOX ENGINE OSS
  description: VOICEVOX OSS  text-to-speech synthesis engine.
  version: latest
servers: []
security: []
paths:
  /accent_phrases:
    post:
      tags:
        - Query Editing
      summary: Get accent phrases from text
      description: >-
        Get accent phrases from text.


        When is_kana is `true`, text is interpreted as AquesTalk-style notation.
        Default is `false`.

        * All kana must be written in Katakana

        * Accent phrases are separated by `/` or `,`. When separated by `,`, a
        silence interval is inserted.

        * Prepending `_` before a kana makes that kana voiceless.

        * Accent position is specified with `'`. If all accent positions are
        omitted, the engine automatically assigns accents.

        * Accent positions within the same accent phrase must be consistent.
      operationId: accent_phrases
      parameters:
        - name: text
          in: query
          required: true
          schema:
            type: string
            title: Text
        - name: speaker
          in: query
          required: true
          schema:
            type: integer
            title: Speaker
        - name: is_kana
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Is Kana
        - name: enable_katakana_english
          in: query
          required: false
          schema:
            type: boolean
            default: true
            title: Enable Katakana English
        - name: core_version
          in: query
          required: false
          schema:
            type: string
            title: Core Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AccentPhrase'
                title: Response Accent Phrases Accent Phrases Post
        '400':
          description: Failed to parse pronunciation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParseKanaBadRequest'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AccentPhrase:
      properties:
        moras:
          items:
            $ref: '#/components/schemas/Mora'
          type: array
          title: Moras
          description: List of moras
        accent:
          type: integer
          title: Accent
          description: Accent position
        pause_mora:
          $ref: '#/components/schemas/Mora'
          title: Pause Mora
          description: >-
            Silent mora appended to the end of the accent phrase. If null, no
            silent mora is appended.
        is_interrogative:
          type: boolean
          title: Is Interrogative
          description: Whether the phrase is interrogative
          default: false
      type: object
      required:
        - moras
        - accent
      title: AccentPhrase
      description: Information for each accent phrase.
    ParseKanaBadRequest:
      properties:
        text:
          type: string
          title: Text
          description: Error message
        error_name:
          type: string
          title: Error Name
          description: |-
            Error name

            |name|description|
            |---|---|
            | UNKNOWN_TEXT | Unrecognizable pronunciation found: {text} |
            | ACCENT_TOP | Accent mark at the beginning of a phrase: {text} |
            | ACCENT_TWICE | Multiple accent marks in one phrase: {text} |
            | ACCENT_NOTFOUND | No accent mark found: {text} |
            | DEFAULT_MORA | Cannot convert the following text to mora: {text} |
            | UNKNOWN_ACCENT | Unknown accent type: {text} |
        error_args:
          additionalProperties:
            type: string
          type: object
          title: Error Args
          description: Location that caused the error
      type: object
      required:
        - text
        - error_name
        - error_args
      title: ParseKanaBadRequest
      description: Failed to parse pronunciation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Mora:
      properties:
        text:
          type: string
          title: Text
          description: Character
        consonant:
          type: string
          title: Consonant
          description: Consonant phoneme
        consonant_length:
          type: number
          title: Consonant Length
          description: Consonant length
        vowel:
          type: string
          title: Vowel
          description: Vowel phoneme
        vowel_length:
          type: number
          title: Vowel Length
          description: Vowel length
        pitch:
          type: number
          title: Pitch
          description: Pitch
      type: object
      required:
        - text
        - vowel
        - vowel_length
        - pitch
      title: Mora
      description: Information for each mora (consonant + vowel).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````