Versions in this module Expand all Collapse all v0 v0.0.2 Nov 2, 2023 v0.0.1 Nov 2, 2023 Changes in this version + func WithAccelerationMode(mode AccelerationMode) func(*SynthesizerOption) + func WithAccentType(at uint64) func(*Word) + func WithCpuNumThreads(num uint16) func(*SynthesizerOption) + func WithEnableInterrogativeUpspeak() func(*TtsOptions) + func WithEnableKana() func(*TtsOptions) + func WithPriority(p uint32) func(*Word) + func WithWordType(wt WordType) func(*Word) + type AccelerationMode int32 + const ACCELERATION_MODE_AUTO + const ACCELERATION_MODE_CPU + const ACCELERATION_MODE_GPU + type AccentPhrase struct + Accent int + IsInterrogative bool + Moras []Mora + PauseMora *Mora + type AudioQuery struct + AccentPhrases []AccentPhrase + IntonationScale float64 + Kana string + OutputSamplingRate int + OutputStereo bool + PitchScale float64 + PostPhonemeLength float64 + PrePhonemeLength float64 + SpeedScale float64 + VolumeScale float64 + type Error struct + Code ResultCode + Msg string + func (e Error) Error() string + type Meta struct + Name string + SpeakerId SpeakerId + Styles []Style + type Mora struct + Consonant *string + ConsonantLength *float64 + Pitch float64 + Text string + Vowel string + VowelLength float64 + type ResultCode int32 + const VOICEVOX_RESULT_EXTRACT_FULL_CONTEXT_LABEL_ERROR + const VOICEVOX_RESULT_GET_SUPPORTED_DEVICES_ERROR + const VOICEVOX_RESULT_GPU_SUPPORT_ERROR + const VOICEVOX_RESULT_INFERENCE_ERROR + const VOICEVOX_RESULT_INVALID_ACCENT_PHRASE_ERROR + const VOICEVOX_RESULT_INVALID_AUDIO_QUERY_ERROR + const VOICEVOX_RESULT_INVALID_MODEL_DATA_ERROR + const VOICEVOX_RESULT_INVALID_USER_DICT_WORD_ERROR + const VOICEVOX_RESULT_INVALID_UTF8_INPUT_ERROR + const VOICEVOX_RESULT_INVALID_UUID_ERROR + const VOICEVOX_RESULT_LOAD_USER_DICT_ERROR + const VOICEVOX_RESULT_MODEL_ALREADY_LOADED_ERROR + const VOICEVOX_RESULT_MODEL_NOT_FOUND_ERROR + const VOICEVOX_RESULT_NOT_LOADED_OPENJTALK_DICT_ERROR + const VOICEVOX_RESULT_OK + const VOICEVOX_RESULT_OPEN_ZIP_FILE_ERROR + const VOICEVOX_RESULT_PARSE_KANA_ERROR + const VOICEVOX_RESULT_READ_ZIP_ENTRY_ERROR + const VOICEVOX_RESULT_SAVE_USER_DICT_ERROR + const VOICEVOX_RESULT_STYLE_ALREADY_LOADED_ERROR + const VOICEVOX_RESULT_STYLE_NOT_FOUND_ERROR + const VOICEVOX_RESULT_USER_DICT_WORD_NOT_FOUND_ERROR + const VOICEVOX_RESULT_USE_USER_DICT_ERROR + type SpeakerId string + type Style struct + Id StyleId + Name string + type StyleId uint32 + type SupportedDevices struct + Cpu bool + Cuda bool + Dml bool + type Synthesizer struct + func (s *Synthesizer) Close() + func (s *Synthesizer) CreateAccentPhrases(text string, styleID StyleId) (a []AccentPhrase, err error) + func (s *Synthesizer) CreateAccentPhrasesFromKana(text string, styleID StyleId) (a []AccentPhrase, err error) + func (s *Synthesizer) CreateAudioQuery(text string, styleID StyleId) (a AudioQuery, err error) + func (s *Synthesizer) CreateAudioQueryFromKana(text string, styleID StyleId) (a AudioQuery, err error) + func (s *Synthesizer) GetMetas() (metas []Meta, err error) + func (s *Synthesizer) IsGpuMode() bool + func (s *Synthesizer) LoadAllModels() (err error) + func (s *Synthesizer) LoadModelsFromSpeakerId(speakerId SpeakerId) (err error) + func (s *Synthesizer) LoadModelsFromStyleId(styleId StyleId) (err error) + func (s *Synthesizer) Replace(ap []AccentPhrase, styleID StyleId) (a []AccentPhrase, err error) + func (s *Synthesizer) ReplaceOnlyMoraPitch(ap []AccentPhrase, styleID StyleId) (a []AccentPhrase, err error) + func (s *Synthesizer) ReplaceOnlyPhonemeLength(ap []AccentPhrase, styleID StyleId) (a []AccentPhrase, err error) + func (s *Synthesizer) Synthesis(aq AudioQuery, styleId StyleId) (io.ReadCloser, error) + func (s *Synthesizer) SynthesisWithoutInterrogativeUpspeak(aq AudioQuery, styleId StyleId) (io.ReadCloser, error) + func (s *Synthesizer) Tts(text string, styleID StyleId, options ...func(*TtsOptions)) (io.ReadCloser, error) + func (s *Synthesizer) UnloadAllModels() (err error) + func (s *Synthesizer) UnloadModelsFromSpeakerId(speakerId SpeakerId) (err error) + func (s *Synthesizer) UnloadModelsFromStyleId(styleId StyleId) (err error) + type SynthesizerOption struct + type TtsOptions struct + type UserDict struct + func (ud *UserDict) AddWord(word Word) (id string, err error) + func (ud *UserDict) Close() + func (ud *UserDict) Import(other *UserDict) (err error) + func (ud *UserDict) Load(path string) (err error) + func (ud *UserDict) RemoveWord(id string) (err error) + func (ud *UserDict) Save(path string) (err error) + func (ud *UserDict) ToJson() (j string, err error) + func (ud *UserDict) UpdateWord(id string, word Word) (err error) + func (ud *UserDict) Use() (err error) + type Voicevox struct + func NewVoicevox(corePath string, openJtalkPath string, modelPath string) (v *Voicevox, err error) + func (v *Voicevox) GetMessageFromResult(code ResultCode) string + func (v *Voicevox) GetMetas() []Meta + func (v *Voicevox) GetStyles() []Style + func (v *Voicevox) GetVersion() string + func (v *Voicevox) NewSynthesizer(options ...func(*SynthesizerOption)) (s Synthesizer, err error) + func (v *Voicevox) NewUserDict() (ud *UserDict) + func (v *Voicevox) SupportedDevices() (sd SupportedDevices, err error) + type Wav struct + func (w *Wav) Close() error + func (w *Wav) Read(p []byte) (n int, err error) + type Word struct + AccentType uint64 + Priority uint32 + Pronunciation string + Surface string + WordType WordType + func NewWord(surface, pronunciation string, options ...func(*Word)) (w Word) + type WordType int32 + const VOICEVOX_USER_DICT_WORD_TYPE_ADJECTIVE + const VOICEVOX_USER_DICT_WORD_TYPE_COMMON_NOUN + const VOICEVOX_USER_DICT_WORD_TYPE_PROPER_NOUN + const VOICEVOX_USER_DICT_WORD_TYPE_SUFFIX + const VOICEVOX_USER_DICT_WORD_TYPE_VERB