Skip to content

Commit

Permalink
Merge pull request VOICEVOX#2 from SHAREVOX/feat/add-openapi-generate…
Browse files Browse the repository at this point in the history
…d-codes

feat: update openapi definition
  • Loading branch information
y-chan authored Sep 8, 2022
2 parents accc306 + 4b8207a commit 23cc861
Show file tree
Hide file tree
Showing 27 changed files with 408 additions and 84 deletions.
2 changes: 1 addition & 1 deletion openapi.json

Large diffs are not rendered by default.

49 changes: 26 additions & 23 deletions src/openapi/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
apis/DefaultApi.ts
apis/index.ts
index.ts
models/AccentPhrase.ts
models/AudioQuery.ts
models/DownloadableLibrary.ts
models/EngineManifest.ts
models/HTTPValidationError.ts
models/LicenseInfo.ts
models/Mora.ts
models/ParseKanaBadRequest.ts
models/Preset.ts
models/Speaker.ts
models/SpeakerInfo.ts
models/SpeakerStyle.ts
models/StyleInfo.ts
models/SupportedDevicesInfo.ts
models/UpdateInfo.ts
models/UserDictWord.ts
models/ValidationError.ts
models/WordTypes.ts
models/index.ts
runtime.ts
apis/DefaultApi.ts
apis/SVModelApi.ts
apis/index.ts
index.ts
models/AccentPhrase.ts
models/AudioQuery.ts
models/DownloadableLibrary.ts
models/EngineManifest.ts
models/HTTPValidationError.ts
models/LicenseInfo.ts
models/ModelConfig.ts
models/Mora.ts
models/ParseKanaBadRequest.ts
models/Preset.ts
models/SVModelInfo.ts
models/Speaker.ts
models/SpeakerInfo.ts
models/SpeakerStyle.ts
models/StyleInfo.ts
models/SupportedDevicesInfo.ts
models/UpdateInfo.ts
models/UserDictWord.ts
models/ValidationError.ts
models/WordTypes.ts
models/index.ts
runtime.ts
6 changes: 3 additions & 3 deletions src/openapi/apis/DefaultApi.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
135 changes: 135 additions & 0 deletions src/openapi/apis/SVModelApi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/* tslint:disable */
/* eslint-disable */
/**
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです。
*
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


import * as runtime from '../runtime';
import {
HTTPValidationError,
HTTPValidationErrorFromJSON,
HTTPValidationErrorToJSON,
SVModelInfo,
SVModelInfoFromJSON,
SVModelInfoToJSON,
} from '../models';

export interface PostSvModelSvModelPostRequest {
sVModelInfo: SVModelInfo;
}

/**
* SVModelApi - interface
*
* @export
* @interface SVModelApiInterface
*/
export interface SVModelApiInterface {
/**
*
* @summary Get Sv Models
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SVModelApiInterface
*/
getSvModelsSvModelsGetRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;

/**
* Get Sv Models
*/
getSvModelsSvModelsGet(initOverrides?: RequestInit): Promise<Array<string>>;

/**
* svモデルを登録します。 Parameters ---------- uuid: str モデル固有のUUID variance_model: str variance_model.onnxをbase64エンコードした文字列 embedder_model: str embedder_model.onnxをbase64エンコードした文字列 decoder_model: str decoder_model.onnxをbase64エンコードした文字列 metas: List[Speakers] モデルのメタ情報 metas.jsonをlistにしたもの model_config: ModelConfig model_config.jsonをdictにした機械学習に利用するための情報 speaker_infos: Dict[str, SpeakerInfo] keyをspeakerInfoのUUIDとした複数のspeaker情報
* @summary Post Sv Model
* @param {SVModelInfo} sVModelInfo
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SVModelApiInterface
*/
postSvModelSvModelPostRaw(requestParameters: PostSvModelSvModelPostRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<any>>;

/**
* svモデルを登録します。 Parameters ---------- uuid: str モデル固有のUUID variance_model: str variance_model.onnxをbase64エンコードした文字列 embedder_model: str embedder_model.onnxをbase64エンコードした文字列 decoder_model: str decoder_model.onnxをbase64エンコードした文字列 metas: List[Speakers] モデルのメタ情報 metas.jsonをlistにしたもの model_config: ModelConfig model_config.jsonをdictにした機械学習に利用するための情報 speaker_infos: Dict[str, SpeakerInfo] keyをspeakerInfoのUUIDとした複数のspeaker情報
* Post Sv Model
*/
postSvModelSvModelPost(requestParameters: PostSvModelSvModelPostRequest, initOverrides?: RequestInit): Promise<any>;

}

/**
*
*/
export class SVModelApi extends runtime.BaseAPI implements SVModelApiInterface {

/**
* Get Sv Models
*/
async getSvModelsSvModelsGetRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>> {
const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

const response = await this.request({
path: `/sv_models`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);

return new runtime.JSONApiResponse<any>(response);
}

/**
* Get Sv Models
*/
async getSvModelsSvModelsGet(initOverrides?: RequestInit): Promise<Array<string>> {
const response = await this.getSvModelsSvModelsGetRaw(initOverrides);
return await response.value();
}

/**
* svモデルを登録します。 Parameters ---------- uuid: str モデル固有のUUID variance_model: str variance_model.onnxをbase64エンコードした文字列 embedder_model: str embedder_model.onnxをbase64エンコードした文字列 decoder_model: str decoder_model.onnxをbase64エンコードした文字列 metas: List[Speakers] モデルのメタ情報 metas.jsonをlistにしたもの model_config: ModelConfig model_config.jsonをdictにした機械学習に利用するための情報 speaker_infos: Dict[str, SpeakerInfo] keyをspeakerInfoのUUIDとした複数のspeaker情報
* Post Sv Model
*/
async postSvModelSvModelPostRaw(requestParameters: PostSvModelSvModelPostRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<any>> {
if (requestParameters.sVModelInfo === null || requestParameters.sVModelInfo === undefined) {
throw new runtime.RequiredError('sVModelInfo','Required parameter requestParameters.sVModelInfo was null or undefined when calling postSvModelSvModelPost.');
}

const queryParameters: any = {};

const headerParameters: runtime.HTTPHeaders = {};

headerParameters['Content-Type'] = 'application/json';

const response = await this.request({
path: `/sv_model`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SVModelInfoToJSON(requestParameters.sVModelInfo),
}, initOverrides);

return new runtime.TextApiResponse(response) as any;
}

/**
* svモデルを登録します。 Parameters ---------- uuid: str モデル固有のUUID variance_model: str variance_model.onnxをbase64エンコードした文字列 embedder_model: str embedder_model.onnxをbase64エンコードした文字列 decoder_model: str decoder_model.onnxをbase64エンコードした文字列 metas: List[Speakers] モデルのメタ情報 metas.jsonをlistにしたもの model_config: ModelConfig model_config.jsonをdictにした機械学習に利用するための情報 speaker_infos: Dict[str, SpeakerInfo] keyをspeakerInfoのUUIDとした複数のspeaker情報
* Post Sv Model
*/
async postSvModelSvModelPost(requestParameters: PostSvModelSvModelPostRequest, initOverrides?: RequestInit): Promise<any> {
const response = await this.postSvModelSvModelPostRaw(requestParameters, initOverrides);
return await response.value();
}

}
1 change: 1 addition & 0 deletions src/openapi/apis/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* tslint:disable */
/* eslint-disable */
export * from './DefaultApi';
export * from './SVModelApi';
6 changes: 3 additions & 3 deletions src/openapi/models/AccentPhrase.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/openapi/models/AudioQuery.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/openapi/models/DownloadableLibrary.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/openapi/models/EngineManifest.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/openapi/models/HTTPValidationError.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/openapi/models/LicenseInfo.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
64 changes: 64 additions & 0 deletions src/openapi/models/ModelConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* tslint:disable */
/* eslint-disable */
/**
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです。
*
* The version of the OpenAPI document: latest
*
*
* 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';
/**
* model_config.jsonをdictにした機械学習に利用するための情報
* @export
* @interface ModelConfig
*/
export interface ModelConfig {
/**
*
* @type {string}
* @memberof ModelConfig
*/
lengthRegulator: string;
/**
*
* @type {number}
* @memberof ModelConfig
*/
startId: number;
}

export function ModelConfigFromJSON(json: any): ModelConfig {
return ModelConfigFromJSONTyped(json, false);
}

export function ModelConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelConfig {
if ((json === undefined) || (json === null)) {
return json;
}
return {

'lengthRegulator': json['length_regulator'],
'startId': json['start_id'],
};
}

export function ModelConfigToJSON(value?: ModelConfig | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {

'length_regulator': value.lengthRegulator,
'start_id': value.startId,
};
}

6 changes: 3 additions & 3 deletions src/openapi/models/Mora.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/openapi/models/ParseKanaBadRequest.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
6 changes: 3 additions & 3 deletions src/openapi/models/Preset.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* tslint:disable */
/* eslint-disable */
/**
* VOICEVOX ENGINE
* VOICEVOXの音声合成エンジンです
* SHAREVOX ENGINE
* SHAREVOXの音声合成エンジンです
*
* The version of the OpenAPI document: 0.13.0
* The version of the OpenAPI document: latest
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading

0 comments on commit 23cc861

Please sign in to comment.