Skip to content

Commit

Permalink
change: liberate VOICEVOX CORE
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Aug 30, 2024
1 parent 8627833 commit 16a0601
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ extern_system_fn! {
);

match severity {
// TODO: https://github.com/VOICEVOX/voicevox_project/issues/24 をやる際に、libonnxruntime側で`WARNING`未満のログを遮断する
ort_sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_VERBOSE | ort_sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_INFO => {}
ort_sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_VERBOSE => tracing::event!(parent: &span, Level::DEBUG, "{message}"),
ort_sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_INFO => tracing::event!(parent: &span, Level::INFO, "{message}"),
ort_sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_WARNING => tracing::event!(parent: &span, Level::WARN, "{message}"),
ort_sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_ERROR | ort_sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_FATAL => {
tracing::event!(parent: &span, Level::ERROR, "{message}");
Expand Down
5 changes: 5 additions & 0 deletions src/session/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,11 @@ impl SessionBuilder {
};
Ok(session)
}

pub fn commit_from_vv_bin(self, bin: &[u8]) -> Result<Session> {
ortsys![unsafe AddSessionConfigEntry(self.session_options_ptr.as_ptr(), c"session.decrypt_vv_model".as_ptr(), c"1".as_ptr())];
self.commit_from_memory(bin)
}
}

/// ONNX Runtime provides various graph optimizations to improve performance. Graph optimizations are essentially
Expand Down

0 comments on commit 16a0601

Please sign in to comment.