クエリ作成

音声合成用のクエリをプリセットを用いて作成する

音声合成用のクエリの初期値を得ます。ここで得られたクエリはそのまま音声合成に利用できます。<br> 各値の意味は Schemas を参照してください。

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

post/audio_query_from_preset

Query parameters

textstring required
preset_idinteger required
enable_katakana_englishboolean

AivisSpeech Engine ではサポートされていないパラメータです (常に無視されます) 。

AivisSpeech Engine ではサポートされていないパラメータです (常に無視されます) 。

core_versionstring

AivisSpeech Engine ではサポートされていないパラメータです (常に無視されます) 。

AivisSpeech Engine ではサポートされていないパラメータです (常に無視されます) 。

Response

Successful Response

speedScalenumber required

全体の話速を 0.5 ~ 2.0 の範囲で指定する (デフォルト: 1.0) 。 2.0 で 2 倍速、0.5 で 0.5 倍速になる。

intonationScalenumber required

選択した話者スタイルの感情表現の強弱を 0.0 ~ 2.0 の範囲で指定する (デフォルト: 1.0) 。 「全体の抑揚」ではない点で VOICEVOX ENGINE と仕様が異なる。 数値が大きいほど、選択した話者スタイルに近い感情表現が込められた声になる。 例えば話者スタイルが「上機嫌」なら、数値が大きいほどより嬉しそうな明るい話し方になる。 一方で、話者やスタイルによっては、数値を上げすぎると発声がおかしくなったり、棒読みで不自然な声になる場合もある。 正しく発声できる上限値は話者やスタイルごとに異なる。必要に応じて最適な値を見つけて調整すること。 全スタイルの平均であるノーマルスタイルでは自動で適切な感情表現が選択されるため、この値を指定しても無視される。

tempoDynamicsScalenumber

話す速さ(テンポ)の緩急の強弱を 0.0 ~ 2.0 の範囲で指定する (デフォルト: 1.0) 。 AivisSpeech Engine 固有のフィールドで、VOICEVOX ENGINE には存在しない。 数値が大きいほどより早口で生っぽい抑揚がついた声になる。 VOICEVOX ENGINE との互換性のため、未指定時はデフォルト値が適用される。

pitchScalenumber required

全体の音高を -0.15 ~ 0.15 の範囲で指定する (デフォルト: 0.0) 。 数値が大きいほど高い声になる。 VOICEVOX ENGINE と異なり、この値を 0.0 から変更すると音質が劣化するため注意が必要。

volumeScalenumber required

全体の音量を 0.0 ~ 2.0 の範囲で指定する (デフォルト: 1.0) 。 数値が大きいほど大きな声になる。

prePhonemeLengthnumber required

音声の前の無音時間 (秒)。

postPhonemeLengthnumber required

音声の後の無音時間 (秒)。

pauseLengthnumber nullable

句読点などの無音時間。null のときは無視される。デフォルト値は null 。

pauseLengthScalenumber

句読点などの無音時間(倍率)。デフォルト値は 1 。

outputSamplingRateinteger required

音声データの出力サンプリングレート。

outputStereoboolean required

音声データをステレオ出力するか否か。

kanastring

読み上げるテキストを指定する。「読みの AquesTalk 風記法テキスト」ではない点で VOICEVOX ENGINE と仕様が異なる。 VOICEVOX ENGINE では AquesTalk 風記法テキストが入る読み取り専用フィールドだが (音声合成時には無視される) 、AivisSpeech Engine では音声合成時に漢字や記号が含まれた通常の読み上げテキストも必要なため、苦肉の策で読み上げテキスト指定用のフィールドとして転用した。 VOICEVOX ENGINE との互換性のため None や空文字列が指定された場合も動作するが、その場合はアクセント句から自動生成されたひらがな文字列が読み上げテキストになるため、不自然なイントネーションになってしまう。 可能な限り kana に通常の読み上げテキストを指定した上で音声合成 API に渡すことを推奨する。

Changes

Changed in 18 of the 50 revisions of this API.241862

    • added the new optional query request parameter enable_katakana_english

      new-optional-request-parameter

    • added the optional property detail/items/ctx to the response with the 422 status

      response-optional-property-added

    • added the optional property detail/items/input to the response with the 422 status

      response-optional-property-added

    • added the optional property tempoDynamicsScale to the response with the 200 status

      response-optional-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the optional property tempoDynamicsScale from the response with the 200 status

      response-optional-property-removed

    • api operation id audio_query_from_preset_audio_query_from_preset_post removed and replaced with audio_query_from_preset

      api-operation-id-removed

    This revision also has 8 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property tempoDynamicsScale to the response with the 200 status

      response-optional-property-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the optional property tempoDynamicsScale from the response with the 200 status

      response-optional-property-removed

    This revision also has 8 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 54501f4624fd18See the full diff
    • the accent_phrases/items/pause_mora response's property type/format changed from / to object/ for status 200

      response-property-type-changed

    • added the optional property accent_phrases/items/pause_mora/consonant to the response with the 200 status

      response-optional-property-added

    • added the optional property accent_phrases/items/pause_mora/consonant_length to the response with the 200 status

      response-optional-property-added

    • added the optional property tempoDynamicsScale to the response with the 200 status

      response-optional-property-added

    • removed Mora from the accent_phrases/items/pause_mora response property allOf list for the response status 200

      response-property-all-of-removed

    • added the required property accent_phrases/items/pause_mora/pitch to the response with the 200 status

      response-required-property-added

    • added the required property accent_phrases/items/pause_mora/text to the response with the 200 status

      response-required-property-added

    • added the required property accent_phrases/items/pause_mora/vowel to the response with the 200 status

      response-required-property-added

    • added the required property accent_phrases/items/pause_mora/vowel_length to the response with the 200 status

      response-required-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • e86c0159e1bd531See the full diff
    • the accent_phrases/items/pause_mora response's property type/format changed from object/ to / for status 200

      response-property-type-changed

    • removed the required property accent_phrases/items/pause_mora/pitch from the response with the 200 status

      response-required-property-removed

    • removed the required property accent_phrases/items/pause_mora/text from the response with the 200 status

      response-required-property-removed

    • removed the required property accent_phrases/items/pause_mora/vowel from the response with the 200 status

      response-required-property-removed

    • removed the required property accent_phrases/items/pause_mora/vowel_length from the response with the 200 status

      response-required-property-removed

    • removed the optional property accent_phrases/items/pause_mora/consonant from the response with the 200 status

      response-optional-property-removed

    • removed the optional property accent_phrases/items/pause_mora/consonant_length from the response with the 200 status

      response-optional-property-removed

    • removed the optional property tempoDynamicsScale from the response with the 200 status

      response-optional-property-removed

    • added Mora to the accent_phrases/items/pause_mora response property allOf list for the response status 200

      response-property-all-of-added

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 179894d155aa17See the full diff
    • the accent_phrases/items/pause_mora response's property type/format changed from / to object/ for status 200

      response-property-type-changed

    • added the optional property accent_phrases/items/pause_mora/consonant to the response with the 200 status

      response-optional-property-added

    • added the optional property accent_phrases/items/pause_mora/consonant_length to the response with the 200 status

      response-optional-property-added

    • removed Mora from the accent_phrases/items/pause_mora response property allOf list for the response status 200

      response-property-all-of-removed

    • added the required property accent_phrases/items/pause_mora/pitch to the response with the 200 status

      response-required-property-added

    • added the required property accent_phrases/items/pause_mora/text to the response with the 200 status

      response-required-property-added

    • added the required property accent_phrases/items/pause_mora/vowel to the response with the 200 status

      response-required-property-added

    • added the required property accent_phrases/items/pause_mora/vowel_length to the response with the 200 status

      response-required-property-added

  • eb97301b5bb318See the full diff
    • query request parameter core_version list-of-types was narrowed by removing types null

      request-parameter-list-of-types-narrowed

    • for the query request parameter core_version, the type/format was generalized from / to string/

      request-parameter-type-generalized

    • added the optional property pauseLength to the response with the 200 status

      response-optional-property-added

    • added the optional property pauseLengthScale to the response with the 200 status

      response-optional-property-added

    • added Mora to the accent_phrases/items/pause_mora response property allOf list for the response status 200

      response-property-all-of-added

    • removed Mora subschema #2 from the accent_phrases/items/pause_mora response property anyOf list for the response status 200

      response-property-any-of-removed

    • response property accent_phrases/items/moras/items/consonant list-of-types was narrowed by removing types null from media type application/json of response 200

      response-property-list-of-types-narrowed

    • response property accent_phrases/items/moras/items/consonant_length list-of-types was narrowed by removing types null from media type application/json of response 200

      response-property-list-of-types-narrowed

    • response property kana list-of-types was narrowed by removing types null from media type application/json of response 200

      response-property-list-of-types-narrowed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog