Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Engine::load_from_bytes() #59

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

cm-ayf
Copy link
Contributor

@cm-ayf cm-ayf commented Jan 18, 2025

WASM で使いたそうな人がいたので.

@cm-ayf cm-ayf requested a review from phenylshima January 18, 2025 02:06
@cm-ayf cm-ayf self-assigned this Jan 18, 2025
@cm-ayf cm-ayf force-pushed the feat/load-from-bytes branch from 208459d to 1e25079 Compare January 18, 2025 02:07
@cm-ayf cm-ayf force-pushed the feat/load-from-bytes branch from 1e25079 to 2add8b2 Compare January 18, 2025 02:07
Comment on lines +166 to +171
/// Load `.htsvoice` file content as [`Voice`].
#[cfg(feature = "htsvoice")]
pub fn load_htsvoice_from_bytes(bytes: &[u8]) -> Result<Voice, ModelError> {
Ok(parser::parse_htsvoice(bytes)?)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この辺,データでロードできるならload_htsvoice_fileのstd::fs::readをEngine::loadに書くべきような気がします.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants