VOICEVOXの音声合成エンジンです。
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: latest
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import voicevox "github.com/shikanime/go-voicevox"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), voicevox.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), voicevox.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), voicevox.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), voicevox.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to http://localhost:50021
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AudioLibraryManagementApi | DownloadableLibrariesDownloadableLibrariesGet | Get /downloadable_libraries | Downloadable Libraries |
| AudioLibraryManagementApi | InstallLibraryInstallLibraryLibraryUuidPost | Post /install_library/{library_uuid} | Install Library |
| AudioLibraryManagementApi | InstalledLibrariesInstalledLibrariesGet | Get /installed_libraries | Installed Libraries |
| OtherApi | AddPresetAddPresetPost | Post /add_preset | Add Preset |
| OtherApi | ConnectWavesConnectWavesPost | Post /connect_waves | base64エンコードされた複数のwavデータを一つに結合する |
| OtherApi | CoreVersionsCoreVersionsGet | Get /core_versions | Core Versions |
| OtherApi | DeletePresetDeletePresetPost | Post /delete_preset | Delete Preset |
| OtherApi | EngineManifestEngineManifestGet | Get /engine_manifest | Engine Manifest |
| OtherApi | GetPresetsPresetsGet | Get /presets | Get Presets |
| OtherApi | InitializeSpeakerInitializeSpeakerPost | Post /initialize_speaker | Initialize Speaker |
| OtherApi | IsInitializedSpeakerIsInitializedSpeakerGet | Get /is_initialized_speaker | Is Initialized Speaker |
| OtherApi | SpeakerInfoSpeakerInfoGet | Get /speaker_info | Speaker Info |
| OtherApi | SpeakersSpeakersGet | Get /speakers | Speakers |
| OtherApi | SupportedDevicesSupportedDevicesGet | Get /supported_devices | Supported Devices |
| OtherApi | UpdatePresetUpdatePresetPost | Post /update_preset | Update Preset |
| OtherApi | VersionVersionGet | Get /version | Version |
| QueryCreationApi | AudioQueryAudioQueryPost | Post /audio_query | 音声合成用のクエリを作成する |
| QueryCreationApi | AudioQueryFromPresetAudioQueryFromPresetPost | Post /audio_query_from_preset | 音声合成用のクエリをプリセットを用いて作成する |
| QueryEditApi | AccentPhrasesAccentPhrasesPost | Post /accent_phrases | テキストからアクセント句を得る |
| QueryEditApi | MoraDataMoraDataPost | Post /mora_data | アクセント句から音高・音素長を得る |
| QueryEditApi | MoraLengthMoraLengthPost | Post /mora_length | アクセント句から音素長を得る |
| QueryEditApi | MoraPitchMoraPitchPost | Post /mora_pitch | アクセント句から音高を得る |
| SettingApi | SettingGetSettingGet | Get /setting | Setting Get |
| SettingApi | SettingPostSettingPost | Post /setting | Setting Post |
| SpeechSynthesisApi | CancellableSynthesisCancellableSynthesisPost | Post /cancellable_synthesis | 音声合成する(キャンセル可能) |
| SpeechSynthesisApi | MorphableTargetsMorphableTargetsPost | Post /morphable_targets | 指定した話者に対してエンジン内の話者がモーフィングが可能か判定する |
| SpeechSynthesisApi | MultiSynthesisMultiSynthesisPost | Post /multi_synthesis | 複数まとめて音声合成する |
| SpeechSynthesisApi | SynthesisMorphingSynthesisMorphingPost | Post /synthesis_morphing | 2人の話者でモーフィングした音声を合成する |
| SpeechSynthesisApi | SynthesisSynthesisPost | Post /synthesis | 音声合成する |
| UserDictionaryApi | AddUserDictWordUserDictWordPost | Post /user_dict_word | Add User Dict Word |
| UserDictionaryApi | DeleteUserDictWordUserDictWordWordUuidDelete | Delete /user_dict_word/{word_uuid} | Delete User Dict Word |
| UserDictionaryApi | GetUserDictWordsUserDictGet | Get /user_dict | Get User Dict Words |
| UserDictionaryApi | ImportUserDictWordsImportUserDictPost | Post /import_user_dict | Import User Dict Words |
| UserDictionaryApi | RewriteUserDictWordUserDictWordWordUuidPut | Put /user_dict_word/{word_uuid} | Rewrite User Dict Word |
- AccentPhrase
- AudioQuery
- DownloadableLibrary
- EngineManifest
- HTTPValidationError
- LibrarySpeaker
- LicenseInfo
- Mora
- MorphableTargetInfo
- ParseKanaBadRequest
- Preset
- Speaker
- SpeakerInfo
- SpeakerStyle
- SpeakerSupportPermittedSynthesisMorphing
- SpeakerSupportedFeatures
- StyleInfo
- SupportedDevicesInfo
- SupportedFeatures
- UpdateInfo
- UserDictWord
- ValidationError
- WordTypes
Endpoints do not require authorization.
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime