forked from VOICEVOX/voicevox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request VOICEVOX#2 from SHAREVOX/feat/add-openapi-generate…
…d-codes feat: update openapi definition
- Loading branch information
Showing
27 changed files
with
408 additions
and
84 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
export * from './DefaultApi'; | ||
export * from './SVModelApi'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.