drop unused
This commit is contained in:
@@ -263,19 +263,6 @@ 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>>,
|
||||
@@ -374,16 +361,4 @@ 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