From c3a0a76cb4a3cd053bb48800d96b4a78192c145f Mon Sep 17 00:00:00 2001 From: qwerty2501 <939468+qwerty2501@users.noreply.github.com> Date: Fri, 24 Feb 2023 01:31:27 +0900 Subject: [PATCH] =?UTF-8?q?Windows=E3=81=AE=E3=82=B5=E3=83=B3=E3=83=97?= =?UTF-8?q?=E3=83=AB=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/cpp/windows/simple_tts/simple_tts.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/example/cpp/windows/simple_tts/simple_tts.cpp b/example/cpp/windows/simple_tts/simple_tts.cpp index 5c348235b..c5f29c1e0 100644 --- a/example/cpp/windows/simple_tts/simple_tts.cpp +++ b/example/cpp/windows/simple_tts/simple_tts.cpp @@ -34,7 +34,8 @@ int main() { initializeOptions.load_all_models = true; VoicevoxResultCode result = VoicevoxResultCode::VOICEVOX_RESULT_OK; - result = voicevox_initialize(initializeOptions); + VoicevoxSynthesizer* synthesizer; + result = voicevox_synthesizer_new_with_initialize(initializeOptions,&synthesizer); if (result != VoicevoxResultCode::VOICEVOX_RESULT_OK) { OutErrorMessage(result); return 0; @@ -46,7 +47,7 @@ int main() { uint8_t* output_wav = nullptr; VoicevoxTtsOptions ttsOptions = voicevox_make_default_tts_options(); - result = voicevox_tts(wide_to_utf8_cppapi(speak_words).c_str(), speaker_id, ttsOptions, &output_binary_size, &output_wav); + result = voicevox_synthesizer_tts(synthesizer,wide_to_utf8_cppapi(speak_words).c_str(), speaker_id, ttsOptions, &output_binary_size, &output_wav); if (result != VoicevoxResultCode::VOICEVOX_RESULT_OK) { OutErrorMessage(result); return 0; @@ -65,8 +66,7 @@ int main() { std::wcout << L"音声データの開放" << std::endl; voicevox_wav_free(output_wav); - voicevox_finalize(); - + voicevox_synthesizer_delete(synthesizer); } ///