By default, parakeet-rs attempts to use GPU acceleration and falls back to CPU if it fails. You can explicitly request an execution provider via ExecutionConfig.
Setup: Enable the appropriate feature in Cargo.toml (e.g., cuda, tensorrt, webgpu, directml, migraphx).
Note for Apple Users: CoreML is unstable. Use the webgpu feature (which uses Metal under the hood) or standard cpu.
Advanced Configuration: You can use with_custom_configure to access the underlying ort SessionBuilder for fine-grained control, such as disabling the memory pattern.
use parakeet_rs::{Parakeet, ExecutionConfig, ExecutionProvider};
// Explicitly request CUDA
let config = ExecutionConfig::new().with_execution_provider(ExecutionProvider::Cuda);
let mut parakeet = Parakeet::from_pretrained(".", Some(config))?;
// Advanced configuration via ort SessionBuilder
let config = ExecutionConfig::new()
.with_custom_configure(|builder| builder.with_memory_pattern(false));