Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPIの定義を更新 #711

Merged
merged 2 commits into from
Feb 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/openapi/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -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
426 changes: 420 additions & 6 deletions src/openapi/apis/DefaultApi.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/openapi/models/AccentPhrase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/AudioQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/HTTPValidationError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/Mora.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/ParseKanaBadRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/Preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/Speaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/SpeakerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/SpeakerStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/openapi/models/StyleInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
64 changes: 64 additions & 0 deletions src/openapi/models/SupportedDevicesInfo.ts
Original file line number Diff line number Diff line change
@@ -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,
};
}

160 changes: 160 additions & 0 deletions src/openapi/models/UserDictWord.ts
Original file line number Diff line number Diff line change
@@ -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,
};
}

2 changes: 1 addition & 1 deletion src/openapi/models/ValidationError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 2 additions & 0 deletions src/openapi/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
2 changes: 1 addition & 1 deletion src/openapi/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
3 changes: 2 additions & 1 deletion src/store/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@ export const audioStore: VoiceVoxStoreOptions<
const speakers = await dispatch("INVOKE_ENGINE_CONNECTOR", {
engineKey: engineInfo.key,
action: "speakersSpeakersGet",
payload: [],
// 連想配列が第一引数になければ失敗する
payload: [{}],
Comment on lines -500 to +501
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントの通りで、これがなければスピーカーの取得に失敗して、起動できません

})
.then(toDispatchResponse("speakersSpeakersGet"))
.catch((error) => {
Expand Down