From db09d1954db2fee5d29d1084650d385c3de8c98d Mon Sep 17 00:00:00 2001 From: qwerty2501 <939468+qwerty2501@users.noreply.github.com> Date: Sun, 29 Jan 2023 22:25:04 +0900 Subject: [PATCH] =?UTF-8?q?Rust=20API=E3=82=92async=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/voicevox_core/src/voice_model.rs | 2 +- crates/voicevox_core/src/voice_synthesizer.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/voicevox_core/src/voice_model.rs b/crates/voicevox_core/src/voice_model.rs index aa17d798a..af1953aa1 100644 --- a/crates/voicevox_core/src/voice_model.rs +++ b/crates/voicevox_core/src/voice_model.rs @@ -12,7 +12,7 @@ pub struct VoiceModel {} impl VoiceModel { /// 与えられたパスからモデルを取得する - pub fn from_path(path: impl AsRef) -> Result {} + pub async fn from_path(path: impl AsRef) -> Result {} /// ランダムに発行されたこのモデルのIdを返す pub fn id(&self) -> &VoiceModelId {} /// このモデルのメタ情報を返す diff --git a/crates/voicevox_core/src/voice_synthesizer.rs b/crates/voicevox_core/src/voice_synthesizer.rs index 068c5abd2..89c4653d6 100644 --- a/crates/voicevox_core/src/voice_synthesizer.rs +++ b/crates/voicevox_core/src/voice_synthesizer.rs @@ -4,13 +4,13 @@ use super::*; pub struct VoiceSynthesizer {} impl VoiceSynthesizer { /// コンストラクタ兼初期化 - pub fn new_with_initialize(options: InitializeOptions) -> Self {} + pub async fn new_with_initialize(options: InitializeOptions) -> Self {} /// 音声合成モデルを読み込む - pub fn load_model(&mut self, model: VoiceModel) -> Result<()> {} + pub async fn load_model(&mut self, model: VoiceModel) -> Result<()> {} /// 指定したモデルIdの音声合成モデルを開放する - pub fn unload_model(&mut self, model_id: VoiceModelId) -> Result<()> {} + pub async fn unload_model(&mut self, model_id: VoiceModelId) -> Result<()> {} /// 指定したモデルIdの音声合成モデルが読み込まれているか判定する pub fn is_loaded_model(&self, model_id: VoiceModelId) -> bool {} @@ -19,5 +19,5 @@ impl VoiceSynthesizer { pub fn metas(&self) -> &VoiceModelMeta {} /// 音声合成を行う - pub fn synthesis(&self, style_id: &StyleId) -> Result> {} + pub async fn synthesis(&self, style_id: &StyleId) -> Result> {} }