rust-whisper-lib imports whisper-burn@432ef86ec1cb9d57406b9fab4e2a13155b10d74b
This commit is contained in:
4034
rust-whisper-lib/Cargo.lock
generated
4034
rust-whisper-lib/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,7 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
whisper-rs = { path = "../gitea-whisper-rs", version = "0.8.0" }
|
||||
whisper = { path = "../whisper-burn", version = "0.1.0", features = ["wgpu-backend"] }
|
||||
wav = "1"
|
||||
tokio = "1.27"
|
||||
byteorder = "1.5.0"
|
||||
|
||||
@@ -257,6 +257,19 @@ impl Engine {
|
||||
}
|
||||
}
|
||||
|
||||
struct Engine2 {
|
||||
}
|
||||
|
||||
fn new_engine_2() -> Result<Engine2, String> {
|
||||
Ok(Engine2{})
|
||||
}
|
||||
|
||||
impl Engine2 {
|
||||
fn transcribe(&self, data: &Vec<f32>) -> Result<Transcribed, String> {
|
||||
Err(format!("not impl"))
|
||||
}
|
||||
}
|
||||
|
||||
struct ATranscribe {
|
||||
data: Vec<f32>,
|
||||
ack: Option<std::sync::mpsc::SyncSender<bool>>,
|
||||
@@ -355,4 +368,16 @@ mod tests {
|
||||
"../gitea-whisper-rs/sys/whisper.cpp/bindings/go/samples/jfk.wav".to_string(),
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_transcribe_tiny_jfk_wav_candle() {
|
||||
let wav_path = "../gitea-whisper-rs/sys/whisper.cpp/bindings/go/samples/jfk.wav".to_string();
|
||||
let audio_data = f32_from_wav_file(&wav_path).unwrap();
|
||||
let engine = new_engine_2().unwrap();
|
||||
let result = engine.transcribe(&audio_data);
|
||||
assert_eq!(
|
||||
" And so my fellow Americans ask not what your country can do for you ask what you can do for your country.".to_string(),
|
||||
result.unwrap().to_string(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user