refactor: remove deprecated fn

This commit is contained in:
jiahua 2024-04-30 13:47:05 +08:00
parent e316c08f14
commit 85edf85e5f
2 changed files with 0 additions and 36 deletions

View file

@ -51,21 +51,6 @@ impl WhisperContext {
Ok(Self::wrap(ctx))
}
/// Create a new WhisperContext from a buffer.
///
/// # Arguments
/// * buffer: The buffer containing the model.
///
/// # Returns
/// Ok(Self) on success, Err(WhisperError) on failure.
///
/// # C++ equivalent
/// `struct whisper_context * whisper_init_from_buffer_no_state(void * buffer, size_t buffer_size)`
#[deprecated = "Use `new_from_buffer_with_params` instead"]
pub fn new_from_buffer(buffer: &[u8]) -> Result<Self, WhisperError> {
let ctx = WhisperInnerContext::new_from_buffer(buffer)?;
Ok(Self::wrap(ctx))
}
/// Convert the provided text into tokens.
///