From a1c9a917a77597b1596a448f370dbbb90fff8352 Mon Sep 17 00:00:00 2001 From: y-chan Date: Sun, 27 Feb 2022 02:17:45 +0900 Subject: [PATCH 1/2] update openapi --- openapi.json | 2 +- src/openapi/.openapi-generator/FILES | 2 + src/openapi/apis/DefaultApi.ts | 426 ++++++++++++++++++++- src/openapi/models/AccentPhrase.ts | 2 +- src/openapi/models/AudioQuery.ts | 2 +- src/openapi/models/HTTPValidationError.ts | 2 +- src/openapi/models/Mora.ts | 2 +- src/openapi/models/ParseKanaBadRequest.ts | 2 +- src/openapi/models/Preset.ts | 2 +- src/openapi/models/Speaker.ts | 2 +- src/openapi/models/SpeakerInfo.ts | 2 +- src/openapi/models/SpeakerStyle.ts | 2 +- src/openapi/models/StyleInfo.ts | 2 +- src/openapi/models/SupportedDevicesInfo.ts | 64 ++++ src/openapi/models/UserDictWord.ts | 160 ++++++++ src/openapi/models/ValidationError.ts | 2 +- src/openapi/models/index.ts | 2 + src/openapi/runtime.ts | 2 +- 18 files changed, 661 insertions(+), 19 deletions(-) create mode 100644 src/openapi/models/SupportedDevicesInfo.ts create mode 100644 src/openapi/models/UserDictWord.ts diff --git a/openapi.json b/openapi.json index 70d3b1a1e1..c69a47c134 100644 --- a/openapi.json +++ b/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.2","info":{"title":"VOICEVOX ENGINE","description":"VOICEVOXの音声合成エンジンです。","version":"0.10.2"},"paths":{"/audio_query":{"post":{"tags":["クエリ作成"],"summary":"音声合成用のクエリを作成する","description":"クエリの初期値を得ます。ここで得られたクエリはそのまま音声合成に利用できます。各値の意味は`Schemas`を参照してください。","operationId":"audio_query_audio_query_post","parameters":[{"required":true,"schema":{"title":"Text","type":"string"},"name":"text","in":"query"},{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audio_query_from_preset":{"post":{"tags":["クエリ作成"],"summary":"音声合成用のクエリをプリセットを用いて作成する","description":"クエリの初期値を得ます。ここで得られたクエリはそのまま音声合成に利用できます。各値の意味は`Schemas`を参照してください。","operationId":"audio_query_from_preset_audio_query_from_preset_post","parameters":[{"required":true,"schema":{"title":"Text","type":"string"},"name":"text","in":"query"},{"required":true,"schema":{"title":"Preset Id","type":"integer"},"name":"preset_id","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accent_phrases":{"post":{"tags":["クエリ編集"],"summary":"テキストからアクセント句を得る","description":"テキストからアクセント句を得ます。\nis_kanaが`true`のとき、テキストは次のようなAquesTalkライクな記法に従う読み仮名として処理されます。デフォルトは`false`です。\n* 全てのカナはカタカナで記述される\n* アクセント句は`/`または`、`で区切る。`、`で区切った場合に限り無音区間が挿入される。\n* カナの手前に`_`を入れるとそのカナは無声化される\n* アクセント位置を`'`で指定する。全てのアクセント句にはアクセント位置を1つ指定する必要がある。\n* アクセント句末に`?`(全角)を入れることにより疑問文の発音ができる。","operationId":"accent_phrases_accent_phrases_post","parameters":[{"required":true,"schema":{"title":"Text","type":"string"},"name":"text","in":"query"},{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"required":false,"schema":{"title":"Is Kana","type":"boolean","default":false},"name":"is_kana","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Accent Phrases Accent Phrases Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"400":{"description":"読み仮名のパースに失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseKanaBadRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mora_data":{"post":{"tags":["クエリ編集"],"summary":"アクセント句から音高・音素長を得る","operationId":"mora_data_mora_data_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Accent Phrases","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Mora Data Mora Data Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mora_length":{"post":{"tags":["クエリ編集"],"summary":"アクセント句から音素長を得る","operationId":"mora_length_mora_length_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Accent Phrases","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Mora Length Mora Length Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mora_pitch":{"post":{"tags":["クエリ編集"],"summary":"アクセント句から音高を得る","operationId":"mora_pitch_mora_pitch_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Accent Phrases","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Mora Pitch Mora Pitch Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/synthesis":{"post":{"tags":["音声合成"],"summary":"音声合成する","operationId":"synthesis_synthesis_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"description":"疑問系のテキストが与えられたら語尾を自動調整する","required":false,"schema":{"title":"Enable Interrogative Upspeak","type":"boolean","description":"疑問系のテキストが与えられたら語尾を自動調整する","default":true},"name":"enable_interrogative_upspeak","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cancellable_synthesis":{"post":{"tags":["音声合成"],"summary":"音声合成する(キャンセル可能)","operationId":"cancellable_synthesis_cancellable_synthesis_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/multi_synthesis":{"post":{"tags":["音声合成"],"summary":"複数まとめて音声合成する","operationId":"multi_synthesis_multi_synthesis_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Queries","type":"array","items":{"$ref":"#/components/schemas/AudioQuery"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/synthesis_morphing":{"post":{"tags":["音声合成"],"summary":"2人の話者でモーフィングした音声を合成する","description":"指定された2人の話者で音声を合成、指定した割合でモーフィングした音声を得ます。\nモーフィングの割合は`morph_rate`で指定でき、0.0でベースの話者、1.0でターゲットの話者に近づきます。","operationId":"_synthesis_morphing_synthesis_morphing_post","parameters":[{"required":true,"schema":{"title":"Base Speaker","type":"integer"},"name":"base_speaker","in":"query"},{"required":true,"schema":{"title":"Target Speaker","type":"integer"},"name":"target_speaker","in":"query"},{"required":true,"schema":{"title":"Morph Rate","maximum":1.0,"minimum":0.0,"type":"number"},"name":"morph_rate","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect_waves":{"post":{"tags":["その他"],"summary":"base64エンコードされた複数のwavデータを一つに結合する","description":"base64エンコードされたwavデータを一纏めにし、wavファイルで返します。","operationId":"connect_waves_connect_waves_post","requestBody":{"content":{"application/json":{"schema":{"title":"Waves","type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/presets":{"get":{"tags":["その他"],"summary":"Get Presets","description":"エンジンが保持しているプリセットの設定を返します\n\nReturns\n-------\npresets: List[Preset]\n プリセットのリスト","operationId":"get_presets_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Presets Presets Get","type":"array","items":{"$ref":"#/components/schemas/Preset"}}}}}}}},"/version":{"get":{"tags":["その他"],"summary":"Version","operationId":"version_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/speakers":{"get":{"tags":["その他"],"summary":"Speakers","operationId":"speakers_speakers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Speakers Speakers Get","type":"array","items":{"$ref":"#/components/schemas/Speaker"}}}}}}}},"/speaker_info":{"get":{"tags":["その他"],"summary":"Speaker Info","description":"指定されたspeaker_uuidに関する情報をjson形式で返します。\n画像や音声はbase64エンコードされたものが返されます。\n\nReturns\n-------\nret_data: SpeakerInfo","operationId":"speaker_info_speaker_info_get","parameters":[{"required":true,"schema":{"title":"Speaker Uuid","type":"string"},"name":"speaker_uuid","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakerInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccentPhrase":{"title":"AccentPhrase","required":["moras","accent"],"type":"object","properties":{"moras":{"title":"モーラのリスト","type":"array","items":{"$ref":"#/components/schemas/Mora"}},"accent":{"title":"アクセント箇所","type":"integer"},"pause_mora":{"title":"後ろに無音を付けるかどうか","allOf":[{"$ref":"#/components/schemas/Mora"}]},"is_interrogative":{"title":"疑問系かどうか","type":"boolean","default":false}},"description":"アクセント句ごとの情報"},"AudioQuery":{"title":"AudioQuery","required":["accent_phrases","speedScale","pitchScale","intonationScale","volumeScale","prePhonemeLength","postPhonemeLength","outputSamplingRate","outputStereo"],"type":"object","properties":{"accent_phrases":{"title":"アクセント句のリスト","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}},"speedScale":{"title":"全体の話速","type":"number"},"pitchScale":{"title":"全体の音高","type":"number"},"intonationScale":{"title":"全体の抑揚","type":"number"},"volumeScale":{"title":"全体の音量","type":"number"},"prePhonemeLength":{"title":"音声の前の無音時間","type":"number"},"postPhonemeLength":{"title":"音声の後の無音時間","type":"number"},"outputSamplingRate":{"title":"音声データの出力サンプリングレート","type":"integer"},"outputStereo":{"title":"音声データをステレオ出力するか否か","type":"boolean"},"kana":{"title":"[読み取り専用]AquesTalkライクな読み仮名。音声合成クエリとしては無視される","type":"string"}},"description":"音声合成用のクエリ"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Mora":{"title":"Mora","required":["text","vowel","vowel_length","pitch"],"type":"object","properties":{"text":{"title":"文字","type":"string"},"consonant":{"title":"子音の音素","type":"string"},"consonant_length":{"title":"子音の音長","type":"number"},"vowel":{"title":"母音の音素","type":"string"},"vowel_length":{"title":"母音の音長","type":"number"},"pitch":{"title":"音高","type":"number"}},"description":"モーラ(子音+母音)ごとの情報"},"ParseKanaBadRequest":{"title":"ParseKanaBadRequest","required":["text","error_name","error_args"],"type":"object","properties":{"text":{"title":"エラーメッセージ","type":"string"},"error_name":{"title":"エラー名","type":"string","description":"|name|description|\n|---|---|\n| UNKNOWN_TEXT | 判別できない読み仮名があります: {text} |\n| ACCENT_TOP | 句頭にアクセントは置けません: {text} |\n| ACCENT_TWICE | 1つのアクセント句に二つ以上のアクセントは置けません: {text} |\n| ACCENT_NOTFOUND | アクセントを指定していないアクセント句があります: {text} |\n| EMPTY_PHRASE | {position}番目のアクセント句が空白です |\n| INTERROGATION_MARK_NOT_AT_END | アクセント句末以外に「?」は置けません: {text} |\n| INFINITE_LOOP | 処理時に無限ループになってしまいました...バグ報告をお願いします。 |"},"error_args":{"title":"エラーを起こした箇所","type":"object","additionalProperties":{"type":"string"}}}},"Preset":{"title":"Preset","required":["id","name","speaker_uuid","style_id","speedScale","pitchScale","intonationScale","volumeScale","prePhonemeLength","postPhonemeLength"],"type":"object","properties":{"id":{"title":"プリセットID","type":"integer"},"name":{"title":"プリセット名","type":"string"},"speaker_uuid":{"title":"スピーカーのUUID","type":"string"},"style_id":{"title":"スタイルID","type":"integer"},"speedScale":{"title":"全体の話速","type":"number"},"pitchScale":{"title":"全体の音高","type":"number"},"intonationScale":{"title":"全体の抑揚","type":"number"},"volumeScale":{"title":"全体の音量","type":"number"},"prePhonemeLength":{"title":"音声の前の無音時間","type":"number"},"postPhonemeLength":{"title":"音声の後の無音時間","type":"number"}},"description":"プリセット情報"},"Speaker":{"title":"Speaker","required":["name","speaker_uuid","styles"],"type":"object","properties":{"name":{"title":"名前","type":"string"},"speaker_uuid":{"title":"スピーカーのUUID","type":"string"},"styles":{"title":"スピーカースタイルの一覧","type":"array","items":{"$ref":"#/components/schemas/SpeakerStyle"}},"version":{"title":"Version","type":"string","default":"スピーカーのバージョン"}},"description":"スピーカー情報"},"SpeakerInfo":{"title":"SpeakerInfo","required":["policy","portrait","style_infos"],"type":"object","properties":{"policy":{"title":"policy.md","type":"string"},"portrait":{"title":"portrait.pngをbase64エンコードしたもの","type":"string"},"style_infos":{"title":"スタイルの追加情報","type":"array","items":{"$ref":"#/components/schemas/StyleInfo"}}},"description":"話者の追加情報"},"SpeakerStyle":{"title":"SpeakerStyle","required":["name","id"],"type":"object","properties":{"name":{"title":"スタイル名","type":"string"},"id":{"title":"スタイルID","type":"integer"}},"description":"スピーカーのスタイル情報"},"StyleInfo":{"title":"StyleInfo","required":["id","icon","voice_samples"],"type":"object","properties":{"id":{"title":"スタイルID","type":"integer"},"icon":{"title":"当該スタイルのアイコンをbase64エンコードしたもの","type":"string"},"voice_samples":{"title":"voice_sampleのwavファイルをbase64エンコードしたもの","type":"array","items":{"type":"string"}}},"description":"スタイルの追加情報"},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}} \ No newline at end of file +{"openapi":"3.0.2","info":{"title":"VOICEVOX ENGINE","description":"VOICEVOXの音声合成エンジンです。","version":"0.10.4"},"paths":{"/audio_query":{"post":{"tags":["クエリ作成"],"summary":"音声合成用のクエリを作成する","description":"クエリの初期値を得ます。ここで得られたクエリはそのまま音声合成に利用できます。各値の意味は`Schemas`を参照してください。","operationId":"audio_query_audio_query_post","parameters":[{"required":true,"schema":{"title":"Text","type":"string"},"name":"text","in":"query"},{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audio_query_from_preset":{"post":{"tags":["クエリ作成"],"summary":"音声合成用のクエリをプリセットを用いて作成する","description":"クエリの初期値を得ます。ここで得られたクエリはそのまま音声合成に利用できます。各値の意味は`Schemas`を参照してください。","operationId":"audio_query_from_preset_audio_query_from_preset_post","parameters":[{"required":true,"schema":{"title":"Text","type":"string"},"name":"text","in":"query"},{"required":true,"schema":{"title":"Preset Id","type":"integer"},"name":"preset_id","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/accent_phrases":{"post":{"tags":["クエリ編集"],"summary":"テキストからアクセント句を得る","description":"テキストからアクセント句を得ます。\nis_kanaが`true`のとき、テキストは次のようなAquesTalkライクな記法に従う読み仮名として処理されます。デフォルトは`false`です。\n* 全てのカナはカタカナで記述される\n* アクセント句は`/`または`、`で区切る。`、`で区切った場合に限り無音区間が挿入される。\n* カナの手前に`_`を入れるとそのカナは無声化される\n* アクセント位置を`'`で指定する。全てのアクセント句にはアクセント位置を1つ指定する必要がある。\n* アクセント句末に`?`(全角)を入れることにより疑問文の発音ができる。","operationId":"accent_phrases_accent_phrases_post","parameters":[{"required":true,"schema":{"title":"Text","type":"string"},"name":"text","in":"query"},{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"required":false,"schema":{"title":"Is Kana","type":"boolean","default":false},"name":"is_kana","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Accent Phrases Accent Phrases Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"400":{"description":"読み仮名のパースに失敗","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseKanaBadRequest"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mora_data":{"post":{"tags":["クエリ編集"],"summary":"アクセント句から音高・音素長を得る","operationId":"mora_data_mora_data_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Accent Phrases","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Mora Data Mora Data Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mora_length":{"post":{"tags":["クエリ編集"],"summary":"アクセント句から音素長を得る","operationId":"mora_length_mora_length_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Accent Phrases","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Mora Length Mora Length Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mora_pitch":{"post":{"tags":["クエリ編集"],"summary":"アクセント句から音高を得る","operationId":"mora_pitch_mora_pitch_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Accent Phrases","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Mora Pitch Mora Pitch Post","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/synthesis":{"post":{"tags":["音声合成"],"summary":"音声合成する","operationId":"synthesis_synthesis_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"description":"疑問系のテキストが与えられたら語尾を自動調整する","required":false,"schema":{"title":"Enable Interrogative Upspeak","type":"boolean","description":"疑問系のテキストが与えられたら語尾を自動調整する","default":true},"name":"enable_interrogative_upspeak","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cancellable_synthesis":{"post":{"tags":["音声合成"],"summary":"音声合成する(キャンセル可能)","operationId":"cancellable_synthesis_cancellable_synthesis_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/multi_synthesis":{"post":{"tags":["音声合成"],"summary":"複数まとめて音声合成する","operationId":"multi_synthesis_multi_synthesis_post","parameters":[{"required":true,"schema":{"title":"Speaker","type":"integer"},"name":"speaker","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"title":"Queries","type":"array","items":{"$ref":"#/components/schemas/AudioQuery"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/synthesis_morphing":{"post":{"tags":["音声合成"],"summary":"2人の話者でモーフィングした音声を合成する","description":"指定された2人の話者で音声を合成、指定した割合でモーフィングした音声を得ます。\nモーフィングの割合は`morph_rate`で指定でき、0.0でベースの話者、1.0でターゲットの話者に近づきます。","operationId":"_synthesis_morphing_synthesis_morphing_post","parameters":[{"required":true,"schema":{"title":"Base Speaker","type":"integer"},"name":"base_speaker","in":"query"},{"required":true,"schema":{"title":"Target Speaker","type":"integer"},"name":"target_speaker","in":"query"},{"required":true,"schema":{"title":"Morph Rate","maximum":1.0,"minimum":0.0,"type":"number"},"name":"morph_rate","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioQuery"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connect_waves":{"post":{"tags":["その他"],"summary":"base64エンコードされた複数のwavデータを一つに結合する","description":"base64エンコードされたwavデータを一纏めにし、wavファイルで返します。","operationId":"connect_waves_connect_waves_post","requestBody":{"content":{"application/json":{"schema":{"title":"Waves","type":"array","items":{"type":"string"}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/presets":{"get":{"tags":["その他"],"summary":"Get Presets","description":"エンジンが保持しているプリセットの設定を返します\n\nReturns\n-------\npresets: List[Preset]\n プリセットのリスト","operationId":"get_presets_presets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get Presets Presets Get","type":"array","items":{"$ref":"#/components/schemas/Preset"}}}}}}}},"/version":{"get":{"tags":["その他"],"summary":"Version","operationId":"version_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/core_versions":{"get":{"tags":["その他"],"summary":"Core Versions","operationId":"core_versions_core_versions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Core Versions Core Versions Get","type":"array","items":{"type":"string"}}}}}}}},"/speakers":{"get":{"tags":["その他"],"summary":"Speakers","operationId":"speakers_speakers_get","parameters":[{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Speakers Speakers Get","type":"array","items":{"$ref":"#/components/schemas/Speaker"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/speaker_info":{"get":{"tags":["その他"],"summary":"Speaker Info","description":"指定されたspeaker_uuidに関する情報をjson形式で返します。\n画像や音声はbase64エンコードされたものが返されます。\n\nReturns\n-------\nret_data: SpeakerInfo","operationId":"speaker_info_speaker_info_get","parameters":[{"required":true,"schema":{"title":"Speaker Uuid","type":"string"},"name":"speaker_uuid","in":"query"},{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakerInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user_dict":{"get":{"tags":["ユーザー辞書"],"summary":"Get User Dict Words","description":"ユーザ辞書に登録されている単語の一覧を返します。\n単語の表層形(surface)は正規化済みの物を返します。\n\nReturns\n-------\nDict[str, UserDictWord]\n 単語のUUIDとその詳細","operationId":"get_user_dict_words_user_dict_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Get User Dict Words User Dict Get","type":"object","additionalProperties":{"$ref":"#/components/schemas/UserDictWord"}}}}}}}},"/user_dict_word":{"post":{"tags":["ユーザー辞書"],"summary":"Add User Dict Word","description":"ユーザ辞書に言葉を追加します。\n\nParameters\n----------\nsurface : str\n 言葉の表層形\npronunciation: str\n 言葉の発音(カタカナ)\naccent_type: int\n アクセント型(音が下がる場所を指す)","operationId":"add_user_dict_word_user_dict_word_post","parameters":[{"required":true,"schema":{"title":"Surface","type":"string"},"name":"surface","in":"query"},{"required":true,"schema":{"title":"Pronunciation","type":"string"},"name":"pronunciation","in":"query"},{"required":true,"schema":{"title":"Accent Type","type":"integer"},"name":"accent_type","in":"query"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user_dict_word/{word_uuid}":{"put":{"tags":["ユーザー辞書"],"summary":"Rewrite User Dict Word","description":"ユーザ辞書に登録されている言葉を更新します。\n\nParameters\n----------\nsurface : str\n 言葉の表層形\npronunciation: str\n 言葉の発音(カタカナ)\naccent_type: int\n アクセント型(音が下がる場所を指す)\nword_uuid: str\n 更新する言葉のUUID","operationId":"rewrite_user_dict_word_user_dict_word__word_uuid__put","parameters":[{"required":true,"schema":{"title":"Word Uuid","type":"string"},"name":"word_uuid","in":"path"},{"required":true,"schema":{"title":"Surface","type":"string"},"name":"surface","in":"query"},{"required":true,"schema":{"title":"Pronunciation","type":"string"},"name":"pronunciation","in":"query"},{"required":true,"schema":{"title":"Accent Type","type":"integer"},"name":"accent_type","in":"query"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["ユーザー辞書"],"summary":"Delete User Dict Word","description":"ユーザ辞書に登録されている言葉を削除します。\n\nParameters\n----------\nword_uuid: str\n 削除する言葉のUUID","operationId":"delete_user_dict_word_user_dict_word__word_uuid__delete","parameters":[{"required":true,"schema":{"title":"Word Uuid","type":"string"},"name":"word_uuid","in":"path"}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/supported_devices":{"get":{"tags":["その他"],"summary":"Supported Devices","operationId":"supported_devices_supported_devices_get","parameters":[{"required":false,"schema":{"title":"Core Version","type":"string"},"name":"core_version","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportedDevicesInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccentPhrase":{"title":"AccentPhrase","required":["moras","accent"],"type":"object","properties":{"moras":{"title":"モーラのリスト","type":"array","items":{"$ref":"#/components/schemas/Mora"}},"accent":{"title":"アクセント箇所","type":"integer"},"pause_mora":{"title":"後ろに無音を付けるかどうか","allOf":[{"$ref":"#/components/schemas/Mora"}]},"is_interrogative":{"title":"疑問系かどうか","type":"boolean","default":false}},"description":"アクセント句ごとの情報"},"AudioQuery":{"title":"AudioQuery","required":["accent_phrases","speedScale","pitchScale","intonationScale","volumeScale","prePhonemeLength","postPhonemeLength","outputSamplingRate","outputStereo"],"type":"object","properties":{"accent_phrases":{"title":"アクセント句のリスト","type":"array","items":{"$ref":"#/components/schemas/AccentPhrase"}},"speedScale":{"title":"全体の話速","type":"number"},"pitchScale":{"title":"全体の音高","type":"number"},"intonationScale":{"title":"全体の抑揚","type":"number"},"volumeScale":{"title":"全体の音量","type":"number"},"prePhonemeLength":{"title":"音声の前の無音時間","type":"number"},"postPhonemeLength":{"title":"音声の後の無音時間","type":"number"},"outputSamplingRate":{"title":"音声データの出力サンプリングレート","type":"integer"},"outputStereo":{"title":"音声データをステレオ出力するか否か","type":"boolean"},"kana":{"title":"[読み取り専用]AquesTalkライクな読み仮名。音声合成クエリとしては無視される","type":"string"}},"description":"音声合成用のクエリ"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"Mora":{"title":"Mora","required":["text","vowel","vowel_length","pitch"],"type":"object","properties":{"text":{"title":"文字","type":"string"},"consonant":{"title":"子音の音素","type":"string"},"consonant_length":{"title":"子音の音長","type":"number"},"vowel":{"title":"母音の音素","type":"string"},"vowel_length":{"title":"母音の音長","type":"number"},"pitch":{"title":"音高","type":"number"}},"description":"モーラ(子音+母音)ごとの情報"},"ParseKanaBadRequest":{"title":"ParseKanaBadRequest","required":["text","error_name","error_args"],"type":"object","properties":{"text":{"title":"エラーメッセージ","type":"string"},"error_name":{"title":"エラー名","type":"string","description":"|name|description|\n|---|---|\n| UNKNOWN_TEXT | 判別できない読み仮名があります: {text} |\n| ACCENT_TOP | 句頭にアクセントは置けません: {text} |\n| ACCENT_TWICE | 1つのアクセント句に二つ以上のアクセントは置けません: {text} |\n| ACCENT_NOTFOUND | アクセントを指定していないアクセント句があります: {text} |\n| EMPTY_PHRASE | {position}番目のアクセント句が空白です |\n| INTERROGATION_MARK_NOT_AT_END | アクセント句末以外に「?」は置けません: {text} |\n| INFINITE_LOOP | 処理時に無限ループになってしまいました...バグ報告をお願いします。 |"},"error_args":{"title":"エラーを起こした箇所","type":"object","additionalProperties":{"type":"string"}}}},"Preset":{"title":"Preset","required":["id","name","speaker_uuid","style_id","speedScale","pitchScale","intonationScale","volumeScale","prePhonemeLength","postPhonemeLength"],"type":"object","properties":{"id":{"title":"プリセットID","type":"integer"},"name":{"title":"プリセット名","type":"string"},"speaker_uuid":{"title":"スピーカーのUUID","type":"string"},"style_id":{"title":"スタイルID","type":"integer"},"speedScale":{"title":"全体の話速","type":"number"},"pitchScale":{"title":"全体の音高","type":"number"},"intonationScale":{"title":"全体の抑揚","type":"number"},"volumeScale":{"title":"全体の音量","type":"number"},"prePhonemeLength":{"title":"音声の前の無音時間","type":"number"},"postPhonemeLength":{"title":"音声の後の無音時間","type":"number"}},"description":"プリセット情報"},"Speaker":{"title":"Speaker","required":["name","speaker_uuid","styles"],"type":"object","properties":{"name":{"title":"名前","type":"string"},"speaker_uuid":{"title":"スピーカーのUUID","type":"string"},"styles":{"title":"スピーカースタイルの一覧","type":"array","items":{"$ref":"#/components/schemas/SpeakerStyle"}},"version":{"title":"Version","type":"string","default":"スピーカーのバージョン"}},"description":"スピーカー情報"},"SpeakerInfo":{"title":"SpeakerInfo","required":["policy","portrait","style_infos"],"type":"object","properties":{"policy":{"title":"policy.md","type":"string"},"portrait":{"title":"portrait.pngをbase64エンコードしたもの","type":"string"},"style_infos":{"title":"スタイルの追加情報","type":"array","items":{"$ref":"#/components/schemas/StyleInfo"}}},"description":"話者の追加情報"},"SpeakerStyle":{"title":"SpeakerStyle","required":["name","id"],"type":"object","properties":{"name":{"title":"スタイル名","type":"string"},"id":{"title":"スタイルID","type":"integer"}},"description":"スピーカーのスタイル情報"},"StyleInfo":{"title":"StyleInfo","required":["id","icon","voice_samples"],"type":"object","properties":{"id":{"title":"スタイルID","type":"integer"},"icon":{"title":"当該スタイルのアイコンをbase64エンコードしたもの","type":"string"},"voice_samples":{"title":"voice_sampleのwavファイルをbase64エンコードしたもの","type":"array","items":{"type":"string"}}},"description":"スタイルの追加情報"},"SupportedDevicesInfo":{"title":"SupportedDevicesInfo","required":["cpu","cuda"],"type":"object","properties":{"cpu":{"title":"CPUに対応しているか","type":"boolean"},"cuda":{"title":"CUDA(GPU)に対応しているか","type":"boolean"}},"description":"対応しているデバイスの情報"},"UserDictWord":{"title":"UserDictWord","required":["surface","cost","part_of_speech","part_of_speech_detail_1","part_of_speech_detail_2","part_of_speech_detail_3","inflectional_type","inflectional_form","stem","yomi","pronunciation","accent_type","accent_associative_rule"],"type":"object","properties":{"surface":{"title":"表層形","type":"string"},"cost":{"title":"コストの値","type":"integer"},"part_of_speech":{"title":"品詞","type":"string"},"part_of_speech_detail_1":{"title":"品詞細分類1","type":"string"},"part_of_speech_detail_2":{"title":"品詞細分類2","type":"string"},"part_of_speech_detail_3":{"title":"品詞細分類3","type":"string"},"inflectional_type":{"title":"活用型","type":"string"},"inflectional_form":{"title":"活用形","type":"string"},"stem":{"title":"原形","type":"string"},"yomi":{"title":"読み","type":"string"},"pronunciation":{"title":"発音","type":"string"},"accent_type":{"title":"アクセント型","type":"integer"},"mora_count":{"title":"モーラ数","type":"integer"},"accent_associative_rule":{"title":"アクセント結合規則","type":"string"}},"description":"辞書のコンパイルに使われる情報"},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}} \ No newline at end of file diff --git a/src/openapi/.openapi-generator/FILES b/src/openapi/.openapi-generator/FILES index c2795e12b5..9a07f61461 100644 --- a/src/openapi/.openapi-generator/FILES +++ b/src/openapi/.openapi-generator/FILES @@ -11,6 +11,8 @@ models/Speaker.ts models/SpeakerInfo.ts models/SpeakerStyle.ts models/StyleInfo.ts +models/SupportedDevicesInfo.ts +models/UserDictWord.ts models/ValidationError.ts models/index.ts runtime.ts diff --git a/src/openapi/apis/DefaultApi.ts b/src/openapi/apis/DefaultApi.ts index 362d3dc035..a4f89511db 100644 --- a/src/openapi/apis/DefaultApi.ts +++ b/src/openapi/apis/DefaultApi.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -36,22 +36,37 @@ import { SpeakerInfo, SpeakerInfoFromJSON, SpeakerInfoToJSON, + SupportedDevicesInfo, + SupportedDevicesInfoFromJSON, + SupportedDevicesInfoToJSON, + UserDictWord, + UserDictWordFromJSON, + UserDictWordToJSON, } from '../models'; export interface AccentPhrasesAccentPhrasesPostRequest { text: string; speaker: number; isKana?: boolean; + coreVersion?: string; +} + +export interface AddUserDictWordUserDictWordPostRequest { + surface: string; + pronunciation: string; + accentType: number; } export interface AudioQueryAudioQueryPostRequest { text: string; speaker: number; + coreVersion?: string; } export interface AudioQueryFromPresetAudioQueryFromPresetPostRequest { text: string; presetId: number; + coreVersion?: string; } export interface CancellableSynthesisCancellableSynthesisPostRequest { @@ -63,28 +78,52 @@ export interface ConnectWavesConnectWavesPostRequest { requestBody: Array; } +export interface DeleteUserDictWordUserDictWordWordUuidDeleteRequest { + wordUuid: string; +} + export interface MoraDataMoraDataPostRequest { speaker: number; accentPhrase: Array; + coreVersion?: string; } export interface MoraLengthMoraLengthPostRequest { speaker: number; accentPhrase: Array; + coreVersion?: string; } export interface MoraPitchMoraPitchPostRequest { speaker: number; accentPhrase: Array; + coreVersion?: string; } export interface MultiSynthesisMultiSynthesisPostRequest { speaker: number; audioQuery: Array; + coreVersion?: string; +} + +export interface RewriteUserDictWordUserDictWordWordUuidPutRequest { + wordUuid: string; + surface: string; + pronunciation: string; + accentType: number; } export interface SpeakerInfoSpeakerInfoGetRequest { speakerUuid: string; + coreVersion?: string; +} + +export interface SpeakersSpeakersGetRequest { + coreVersion?: string; +} + +export interface SupportedDevicesSupportedDevicesGetRequest { + coreVersion?: string; } export interface SynthesisMorphingSynthesisMorphingPostRequest { @@ -92,12 +131,14 @@ export interface SynthesisMorphingSynthesisMorphingPostRequest { targetSpeaker: number; morphRate: number; audioQuery: AudioQuery; + coreVersion?: string; } export interface SynthesisSynthesisPostRequest { speaker: number; audioQuery: AudioQuery; enableInterrogativeUpspeak?: boolean; + coreVersion?: string; } /** @@ -113,6 +154,7 @@ export interface DefaultApiInterface { * @param {string} text * @param {number} speaker * @param {boolean} [isKana] + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -125,11 +167,30 @@ export interface DefaultApiInterface { */ accentPhrasesAccentPhrasesPost(requestParameters: AccentPhrasesAccentPhrasesPostRequest, initOverrides?: RequestInit): Promise>; + /** + * ユーザ辞書に言葉を追加します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) + * @summary Add User Dict Word + * @param {string} surface + * @param {string} pronunciation + * @param {number} accentType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApiInterface + */ + addUserDictWordUserDictWordPostRaw(requestParameters: AddUserDictWordUserDictWordPostRequest, initOverrides?: RequestInit): Promise>; + + /** + * ユーザ辞書に言葉を追加します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) + * Add User Dict Word + */ + addUserDictWordUserDictWordPost(requestParameters: AddUserDictWordUserDictWordPostRequest, initOverrides?: RequestInit): Promise; + /** * クエリの初期値を得ます。ここで得られたクエリはそのまま音声合成に利用できます。各値の意味は`Schemas`を参照してください。 * @summary 音声合成用のクエリを作成する * @param {string} text * @param {number} speaker + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -147,6 +208,7 @@ export interface DefaultApiInterface { * @summary 音声合成用のクエリをプリセットを用いて作成する * @param {string} text * @param {number} presetId + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -191,6 +253,36 @@ export interface DefaultApiInterface { */ connectWavesConnectWavesPost(requestParameters: ConnectWavesConnectWavesPostRequest, initOverrides?: RequestInit): Promise; + /** + * + * @summary Core Versions + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApiInterface + */ + coreVersionsCoreVersionsGetRaw(initOverrides?: RequestInit): Promise>>; + + /** + * Core Versions + */ + coreVersionsCoreVersionsGet(initOverrides?: RequestInit): Promise>; + + /** + * ユーザ辞書に登録されている言葉を削除します。 Parameters ---------- word_uuid: str 削除する言葉のUUID + * @summary Delete User Dict Word + * @param {string} wordUuid + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApiInterface + */ + deleteUserDictWordUserDictWordWordUuidDeleteRaw(requestParameters: DeleteUserDictWordUserDictWordWordUuidDeleteRequest, initOverrides?: RequestInit): Promise>; + + /** + * ユーザ辞書に登録されている言葉を削除します。 Parameters ---------- word_uuid: str 削除する言葉のUUID + * Delete User Dict Word + */ + deleteUserDictWordUserDictWordWordUuidDelete(requestParameters: DeleteUserDictWordUserDictWordWordUuidDeleteRequest, initOverrides?: RequestInit): Promise; + /** * エンジンが保持しているプリセットの設定を返します Returns ------- presets: List[Preset] プリセットのリスト * @summary Get Presets @@ -206,11 +298,27 @@ export interface DefaultApiInterface { */ getPresetsPresetsGet(initOverrides?: RequestInit): Promise>; + /** + * ユーザ辞書に登録されている単語の一覧を返します。 単語の表層形(surface)は正規化済みの物を返します。 Returns ------- Dict[str, UserDictWord] 単語のUUIDとその詳細 + * @summary Get User Dict Words + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApiInterface + */ + getUserDictWordsUserDictGetRaw(initOverrides?: RequestInit): Promise>; + + /** + * ユーザ辞書に登録されている単語の一覧を返します。 単語の表層形(surface)は正規化済みの物を返します。 Returns ------- Dict[str, UserDictWord] 単語のUUIDとその詳細 + * Get User Dict Words + */ + getUserDictWordsUserDictGet(initOverrides?: RequestInit): Promise<{ [key: string]: UserDictWord; }>; + /** * * @summary アクセント句から音高・音素長を得る * @param {number} speaker * @param {Array} accentPhrase + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -227,6 +335,7 @@ export interface DefaultApiInterface { * @summary アクセント句から音素長を得る * @param {number} speaker * @param {Array} accentPhrase + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -243,6 +352,7 @@ export interface DefaultApiInterface { * @summary アクセント句から音高を得る * @param {number} speaker * @param {Array} accentPhrase + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -259,6 +369,7 @@ export interface DefaultApiInterface { * @summary 複数まとめて音声合成する * @param {number} speaker * @param {Array} audioQuery + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -270,10 +381,30 @@ export interface DefaultApiInterface { */ multiSynthesisMultiSynthesisPost(requestParameters: MultiSynthesisMultiSynthesisPostRequest, initOverrides?: RequestInit): Promise; + /** + * ユーザ辞書に登録されている言葉を更新します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) word_uuid: str 更新する言葉のUUID + * @summary Rewrite User Dict Word + * @param {string} wordUuid + * @param {string} surface + * @param {string} pronunciation + * @param {number} accentType + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApiInterface + */ + rewriteUserDictWordUserDictWordWordUuidPutRaw(requestParameters: RewriteUserDictWordUserDictWordWordUuidPutRequest, initOverrides?: RequestInit): Promise>; + + /** + * ユーザ辞書に登録されている言葉を更新します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) word_uuid: str 更新する言葉のUUID + * Rewrite User Dict Word + */ + rewriteUserDictWordUserDictWordWordUuidPut(requestParameters: RewriteUserDictWordUserDictWordWordUuidPutRequest, initOverrides?: RequestInit): Promise; + /** * 指定されたspeaker_uuidに関する情報をjson形式で返します。 画像や音声はbase64エンコードされたものが返されます。 Returns ------- ret_data: SpeakerInfo * @summary Speaker Info * @param {string} speakerUuid + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -289,16 +420,32 @@ export interface DefaultApiInterface { /** * * @summary Speakers + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface */ - speakersSpeakersGetRaw(initOverrides?: RequestInit): Promise>>; + speakersSpeakersGetRaw(requestParameters: SpeakersSpeakersGetRequest, initOverrides?: RequestInit): Promise>>; /** * Speakers */ - speakersSpeakersGet(initOverrides?: RequestInit): Promise>; + speakersSpeakersGet(requestParameters: SpeakersSpeakersGetRequest, initOverrides?: RequestInit): Promise>; + + /** + * + * @summary Supported Devices + * @param {string} [coreVersion] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DefaultApiInterface + */ + supportedDevicesSupportedDevicesGetRaw(requestParameters: SupportedDevicesSupportedDevicesGetRequest, initOverrides?: RequestInit): Promise>; + + /** + * Supported Devices + */ + supportedDevicesSupportedDevicesGet(requestParameters: SupportedDevicesSupportedDevicesGetRequest, initOverrides?: RequestInit): Promise; /** * 指定された2人の話者で音声を合成、指定した割合でモーフィングした音声を得ます。 モーフィングの割合は`morph_rate`で指定でき、0.0でベースの話者、1.0でターゲットの話者に近づきます。 @@ -307,6 +454,7 @@ export interface DefaultApiInterface { * @param {number} targetSpeaker * @param {number} morphRate * @param {AudioQuery} audioQuery + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -325,6 +473,7 @@ export interface DefaultApiInterface { * @param {number} speaker * @param {AudioQuery} audioQuery * @param {boolean} [enableInterrogativeUpspeak] 疑問系のテキストが与えられたら語尾を自動調整する + * @param {string} [coreVersion] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof DefaultApiInterface @@ -384,6 +533,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['is_kana'] = requestParameters.isKana; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ @@ -405,6 +558,57 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { return await response.value(); } + /** + * ユーザ辞書に言葉を追加します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) + * Add User Dict Word + */ + async addUserDictWordUserDictWordPostRaw(requestParameters: AddUserDictWordUserDictWordPostRequest, initOverrides?: RequestInit): Promise> { + if (requestParameters.surface === null || requestParameters.surface === undefined) { + throw new runtime.RequiredError('surface','Required parameter requestParameters.surface was null or undefined when calling addUserDictWordUserDictWordPost.'); + } + + if (requestParameters.pronunciation === null || requestParameters.pronunciation === undefined) { + throw new runtime.RequiredError('pronunciation','Required parameter requestParameters.pronunciation was null or undefined when calling addUserDictWordUserDictWordPost.'); + } + + if (requestParameters.accentType === null || requestParameters.accentType === undefined) { + throw new runtime.RequiredError('accentType','Required parameter requestParameters.accentType was null or undefined when calling addUserDictWordUserDictWordPost.'); + } + + const queryParameters: any = {}; + + if (requestParameters.surface !== undefined) { + queryParameters['surface'] = requestParameters.surface; + } + + if (requestParameters.pronunciation !== undefined) { + queryParameters['pronunciation'] = requestParameters.pronunciation; + } + + if (requestParameters.accentType !== undefined) { + queryParameters['accent_type'] = requestParameters.accentType; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/user_dict_word`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ユーザ辞書に言葉を追加します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) + * Add User Dict Word + */ + async addUserDictWordUserDictWordPost(requestParameters: AddUserDictWordUserDictWordPostRequest, initOverrides?: RequestInit): Promise { + await this.addUserDictWordUserDictWordPostRaw(requestParameters, initOverrides); + } + /** * クエリの初期値を得ます。ここで得られたクエリはそのまま音声合成に利用できます。各値の意味は`Schemas`を参照してください。 * 音声合成用のクエリを作成する @@ -428,6 +632,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['speaker'] = requestParameters.speaker; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ @@ -472,6 +680,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['preset_id'] = requestParameters.presetId; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ @@ -569,6 +781,63 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { return await response.value(); } + /** + * Core Versions + */ + async coreVersionsCoreVersionsGetRaw(initOverrides?: RequestInit): Promise>> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/core_versions`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Core Versions + */ + async coreVersionsCoreVersionsGet(initOverrides?: RequestInit): Promise> { + const response = await this.coreVersionsCoreVersionsGetRaw(initOverrides); + return await response.value(); + } + + /** + * ユーザ辞書に登録されている言葉を削除します。 Parameters ---------- word_uuid: str 削除する言葉のUUID + * Delete User Dict Word + */ + async deleteUserDictWordUserDictWordWordUuidDeleteRaw(requestParameters: DeleteUserDictWordUserDictWordWordUuidDeleteRequest, initOverrides?: RequestInit): Promise> { + if (requestParameters.wordUuid === null || requestParameters.wordUuid === undefined) { + throw new runtime.RequiredError('wordUuid','Required parameter requestParameters.wordUuid was null or undefined when calling deleteUserDictWordUserDictWordWordUuidDelete.'); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/user_dict_word/{word_uuid}`.replace(`{${"word_uuid"}}`, encodeURIComponent(String(requestParameters.wordUuid))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ユーザ辞書に登録されている言葉を削除します。 Parameters ---------- word_uuid: str 削除する言葉のUUID + * Delete User Dict Word + */ + async deleteUserDictWordUserDictWordWordUuidDelete(requestParameters: DeleteUserDictWordUserDictWordWordUuidDeleteRequest, initOverrides?: RequestInit): Promise { + await this.deleteUserDictWordUserDictWordWordUuidDeleteRaw(requestParameters, initOverrides); + } + /** * エンジンが保持しているプリセットの設定を返します Returns ------- presets: List[Preset] プリセットのリスト * Get Presets @@ -597,6 +866,34 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { return await response.value(); } + /** + * ユーザ辞書に登録されている単語の一覧を返します。 単語の表層形(surface)は正規化済みの物を返します。 Returns ------- Dict[str, UserDictWord] 単語のUUIDとその詳細 + * Get User Dict Words + */ + async getUserDictWordsUserDictGetRaw(initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/user_dict`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => runtime.mapValues(jsonValue, UserDictWordFromJSON)); + } + + /** + * ユーザ辞書に登録されている単語の一覧を返します。 単語の表層形(surface)は正規化済みの物を返します。 Returns ------- Dict[str, UserDictWord] 単語のUUIDとその詳細 + * Get User Dict Words + */ + async getUserDictWordsUserDictGet(initOverrides?: RequestInit): Promise<{ [key: string]: UserDictWord; }> { + const response = await this.getUserDictWordsUserDictGetRaw(initOverrides); + return await response.value(); + } + /** * アクセント句から音高・音素長を得る */ @@ -615,6 +912,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['speaker'] = requestParameters.speaker; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -656,6 +957,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['speaker'] = requestParameters.speaker; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -697,6 +1002,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['speaker'] = requestParameters.speaker; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -738,6 +1047,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['speaker'] = requestParameters.speaker; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -761,6 +1074,61 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { return await response.value(); } + /** + * ユーザ辞書に登録されている言葉を更新します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) word_uuid: str 更新する言葉のUUID + * Rewrite User Dict Word + */ + async rewriteUserDictWordUserDictWordWordUuidPutRaw(requestParameters: RewriteUserDictWordUserDictWordWordUuidPutRequest, initOverrides?: RequestInit): Promise> { + if (requestParameters.wordUuid === null || requestParameters.wordUuid === undefined) { + throw new runtime.RequiredError('wordUuid','Required parameter requestParameters.wordUuid was null or undefined when calling rewriteUserDictWordUserDictWordWordUuidPut.'); + } + + if (requestParameters.surface === null || requestParameters.surface === undefined) { + throw new runtime.RequiredError('surface','Required parameter requestParameters.surface was null or undefined when calling rewriteUserDictWordUserDictWordWordUuidPut.'); + } + + if (requestParameters.pronunciation === null || requestParameters.pronunciation === undefined) { + throw new runtime.RequiredError('pronunciation','Required parameter requestParameters.pronunciation was null or undefined when calling rewriteUserDictWordUserDictWordWordUuidPut.'); + } + + if (requestParameters.accentType === null || requestParameters.accentType === undefined) { + throw new runtime.RequiredError('accentType','Required parameter requestParameters.accentType was null or undefined when calling rewriteUserDictWordUserDictWordWordUuidPut.'); + } + + const queryParameters: any = {}; + + if (requestParameters.surface !== undefined) { + queryParameters['surface'] = requestParameters.surface; + } + + if (requestParameters.pronunciation !== undefined) { + queryParameters['pronunciation'] = requestParameters.pronunciation; + } + + if (requestParameters.accentType !== undefined) { + queryParameters['accent_type'] = requestParameters.accentType; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/user_dict_word/{word_uuid}`.replace(`{${"word_uuid"}}`, encodeURIComponent(String(requestParameters.wordUuid))), + method: 'PUT', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.VoidApiResponse(response); + } + + /** + * ユーザ辞書に登録されている言葉を更新します。 Parameters ---------- surface : str 言葉の表層形 pronunciation: str 言葉の発音(カタカナ) accent_type: int アクセント型(音が下がる場所を指す) word_uuid: str 更新する言葉のUUID + * Rewrite User Dict Word + */ + async rewriteUserDictWordUserDictWordWordUuidPut(requestParameters: RewriteUserDictWordUserDictWordWordUuidPutRequest, initOverrides?: RequestInit): Promise { + await this.rewriteUserDictWordUserDictWordWordUuidPutRaw(requestParameters, initOverrides); + } + /** * 指定されたspeaker_uuidに関する情報をjson形式で返します。 画像や音声はbase64エンコードされたものが返されます。 Returns ------- ret_data: SpeakerInfo * Speaker Info @@ -776,6 +1144,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['speaker_uuid'] = requestParameters.speakerUuid; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ @@ -800,9 +1172,13 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { /** * Speakers */ - async speakersSpeakersGetRaw(initOverrides?: RequestInit): Promise>> { + async speakersSpeakersGetRaw(requestParameters: SpeakersSpeakersGetRequest, initOverrides?: RequestInit): Promise>> { const queryParameters: any = {}; + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; const response = await this.request({ @@ -818,8 +1194,38 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { /** * Speakers */ - async speakersSpeakersGet(initOverrides?: RequestInit): Promise> { - const response = await this.speakersSpeakersGetRaw(initOverrides); + async speakersSpeakersGet(requestParameters: SpeakersSpeakersGetRequest, initOverrides?: RequestInit): Promise> { + const response = await this.speakersSpeakersGetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Supported Devices + */ + async supportedDevicesSupportedDevicesGetRaw(requestParameters: SupportedDevicesSupportedDevicesGetRequest, initOverrides?: RequestInit): Promise> { + const queryParameters: any = {}; + + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + const response = await this.request({ + path: `/supported_devices`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SupportedDevicesInfoFromJSON(jsonValue)); + } + + /** + * Supported Devices + */ + async supportedDevicesSupportedDevicesGet(requestParameters: SupportedDevicesSupportedDevicesGetRequest, initOverrides?: RequestInit): Promise { + const response = await this.supportedDevicesSupportedDevicesGetRaw(requestParameters, initOverrides); return await response.value(); } @@ -858,6 +1264,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['morph_rate'] = requestParameters.morphRate; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; @@ -904,6 +1314,10 @@ export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface { queryParameters['enable_interrogative_upspeak'] = requestParameters.enableInterrogativeUpspeak; } + if (requestParameters.coreVersion !== undefined) { + queryParameters['core_version'] = requestParameters.coreVersion; + } + const headerParameters: runtime.HTTPHeaders = {}; headerParameters['Content-Type'] = 'application/json'; diff --git a/src/openapi/models/AccentPhrase.ts b/src/openapi/models/AccentPhrase.ts index 4fee061836..1f84864ff5 100644 --- a/src/openapi/models/AccentPhrase.ts +++ b/src/openapi/models/AccentPhrase.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/AudioQuery.ts b/src/openapi/models/AudioQuery.ts index 9ca6010153..fdff626db7 100644 --- a/src/openapi/models/AudioQuery.ts +++ b/src/openapi/models/AudioQuery.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/HTTPValidationError.ts b/src/openapi/models/HTTPValidationError.ts index 4155858c26..68bcd071a5 100644 --- a/src/openapi/models/HTTPValidationError.ts +++ b/src/openapi/models/HTTPValidationError.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/Mora.ts b/src/openapi/models/Mora.ts index 8c516a54da..ee36c7cb3f 100644 --- a/src/openapi/models/Mora.ts +++ b/src/openapi/models/Mora.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/ParseKanaBadRequest.ts b/src/openapi/models/ParseKanaBadRequest.ts index 0499d7f58e..03f4b81cc6 100644 --- a/src/openapi/models/ParseKanaBadRequest.ts +++ b/src/openapi/models/ParseKanaBadRequest.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/Preset.ts b/src/openapi/models/Preset.ts index 68010a5963..95aa5f0d24 100644 --- a/src/openapi/models/Preset.ts +++ b/src/openapi/models/Preset.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/Speaker.ts b/src/openapi/models/Speaker.ts index dd29616783..938f31f5ec 100644 --- a/src/openapi/models/Speaker.ts +++ b/src/openapi/models/Speaker.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/SpeakerInfo.ts b/src/openapi/models/SpeakerInfo.ts index 8a81a7b215..534d9e91fc 100644 --- a/src/openapi/models/SpeakerInfo.ts +++ b/src/openapi/models/SpeakerInfo.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/SpeakerStyle.ts b/src/openapi/models/SpeakerStyle.ts index 144f80576d..796f08c24d 100644 --- a/src/openapi/models/SpeakerStyle.ts +++ b/src/openapi/models/SpeakerStyle.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/StyleInfo.ts b/src/openapi/models/StyleInfo.ts index 4b38a63c45..b1a3a39fda 100644 --- a/src/openapi/models/StyleInfo.ts +++ b/src/openapi/models/StyleInfo.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/SupportedDevicesInfo.ts b/src/openapi/models/SupportedDevicesInfo.ts new file mode 100644 index 0000000000..31028a224f --- /dev/null +++ b/src/openapi/models/SupportedDevicesInfo.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * VOICEVOX ENGINE + * VOICEVOXの音声合成エンジンです。 + * + * The version of the OpenAPI document: 0.10.4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * 対応しているデバイスの情報 + * @export + * @interface SupportedDevicesInfo + */ +export interface SupportedDevicesInfo { + /** + * + * @type {boolean} + * @memberof SupportedDevicesInfo + */ + cpu: boolean; + /** + * + * @type {boolean} + * @memberof SupportedDevicesInfo + */ + cuda: boolean; +} + +export function SupportedDevicesInfoFromJSON(json: any): SupportedDevicesInfo { + return SupportedDevicesInfoFromJSONTyped(json, false); +} + +export function SupportedDevicesInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupportedDevicesInfo { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'cpu': json['cpu'], + 'cuda': json['cuda'], + }; +} + +export function SupportedDevicesInfoToJSON(value?: SupportedDevicesInfo | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'cpu': value.cpu, + 'cuda': value.cuda, + }; +} + diff --git a/src/openapi/models/UserDictWord.ts b/src/openapi/models/UserDictWord.ts new file mode 100644 index 0000000000..d18407c386 --- /dev/null +++ b/src/openapi/models/UserDictWord.ts @@ -0,0 +1,160 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * VOICEVOX ENGINE + * VOICEVOXの音声合成エンジンです。 + * + * The version of the OpenAPI document: 0.10.4 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * 辞書のコンパイルに使われる情報 + * @export + * @interface UserDictWord + */ +export interface UserDictWord { + /** + * + * @type {string} + * @memberof UserDictWord + */ + surface: string; + /** + * + * @type {number} + * @memberof UserDictWord + */ + cost: number; + /** + * + * @type {string} + * @memberof UserDictWord + */ + partOfSpeech: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + partOfSpeechDetail1: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + partOfSpeechDetail2: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + partOfSpeechDetail3: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + inflectionalType: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + inflectionalForm: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + stem: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + yomi: string; + /** + * + * @type {string} + * @memberof UserDictWord + */ + pronunciation: string; + /** + * + * @type {number} + * @memberof UserDictWord + */ + accentType: number; + /** + * + * @type {number} + * @memberof UserDictWord + */ + moraCount?: number; + /** + * + * @type {string} + * @memberof UserDictWord + */ + accentAssociativeRule: string; +} + +export function UserDictWordFromJSON(json: any): UserDictWord { + return UserDictWordFromJSONTyped(json, false); +} + +export function UserDictWordFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserDictWord { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'surface': json['surface'], + 'cost': json['cost'], + 'partOfSpeech': json['part_of_speech'], + 'partOfSpeechDetail1': json['part_of_speech_detail_1'], + 'partOfSpeechDetail2': json['part_of_speech_detail_2'], + 'partOfSpeechDetail3': json['part_of_speech_detail_3'], + 'inflectionalType': json['inflectional_type'], + 'inflectionalForm': json['inflectional_form'], + 'stem': json['stem'], + 'yomi': json['yomi'], + 'pronunciation': json['pronunciation'], + 'accentType': json['accent_type'], + 'moraCount': !exists(json, 'mora_count') ? undefined : json['mora_count'], + 'accentAssociativeRule': json['accent_associative_rule'], + }; +} + +export function UserDictWordToJSON(value?: UserDictWord | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'surface': value.surface, + 'cost': value.cost, + 'part_of_speech': value.partOfSpeech, + 'part_of_speech_detail_1': value.partOfSpeechDetail1, + 'part_of_speech_detail_2': value.partOfSpeechDetail2, + 'part_of_speech_detail_3': value.partOfSpeechDetail3, + 'inflectional_type': value.inflectionalType, + 'inflectional_form': value.inflectionalForm, + 'stem': value.stem, + 'yomi': value.yomi, + 'pronunciation': value.pronunciation, + 'accent_type': value.accentType, + 'mora_count': value.moraCount, + 'accent_associative_rule': value.accentAssociativeRule, + }; +} + diff --git a/src/openapi/models/ValidationError.ts b/src/openapi/models/ValidationError.ts index 99ee89df50..75f0a6197f 100644 --- a/src/openapi/models/ValidationError.ts +++ b/src/openapi/models/ValidationError.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/openapi/models/index.ts b/src/openapi/models/index.ts index cf6b9162c5..1915bba089 100644 --- a/src/openapi/models/index.ts +++ b/src/openapi/models/index.ts @@ -10,4 +10,6 @@ export * from './Speaker'; export * from './SpeakerInfo'; export * from './SpeakerStyle'; export * from './StyleInfo'; +export * from './SupportedDevicesInfo'; +export * from './UserDictWord'; export * from './ValidationError'; diff --git a/src/openapi/runtime.ts b/src/openapi/runtime.ts index 5a6eb75ddd..73ad1ea9b3 100644 --- a/src/openapi/runtime.ts +++ b/src/openapi/runtime.ts @@ -4,7 +4,7 @@ * VOICEVOX ENGINE * VOICEVOXの音声合成エンジンです。 * - * The version of the OpenAPI document: 0.10.2 + * The version of the OpenAPI document: 0.10.4 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). From b15d8fba4e82484ecb967ec8ffdbd6cb8797a82e Mon Sep 17 00:00:00 2001 From: y-chan Date: Sun, 27 Feb 2022 02:17:57 +0900 Subject: [PATCH 2/2] fix get speakers error --- src/store/audio.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/audio.ts b/src/store/audio.ts index cb03ffdb54..d2ca281961 100644 --- a/src/store/audio.ts +++ b/src/store/audio.ts @@ -497,7 +497,8 @@ export const audioStore: VoiceVoxStoreOptions< const speakers = await dispatch("INVOKE_ENGINE_CONNECTOR", { engineKey: engineInfo.key, action: "speakersSpeakersGet", - payload: [], + // 連想配列が第一引数になければ失敗する + payload: [{}], }) .then(toDispatchResponse("speakersSpeakersGet")) .catch((error) => {