Skip to content

Commit

Permalink
Rust APIをasync化
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerty2501 committed Jan 29, 2023
1 parent d7ddce2 commit db09d19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/voicevox_core/src/voice_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct VoiceModel {}

impl VoiceModel {
/// 与えられたパスからモデルを取得する
pub fn from_path(path: impl AsRef<Path>) -> Result<Self> {}
pub async fn from_path(path: impl AsRef<Path>) -> Result<Self> {}
/// ランダムに発行されたこのモデルのIdを返す
pub fn id(&self) -> &VoiceModelId {}
/// このモデルのメタ情報を返す
Expand Down
8 changes: 4 additions & 4 deletions crates/voicevox_core/src/voice_synthesizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand All @@ -19,5 +19,5 @@ impl VoiceSynthesizer {
pub fn metas(&self) -> &VoiceModelMeta {}

/// 音声合成を行う
pub fn synthesis(&self, style_id: &StyleId) -> Result<Vec<u8>> {}
pub async fn synthesis(&self, style_id: &StyleId) -> Result<Vec<u8>> {}
}

0 comments on commit db09d19

Please sign in to comment.