Skip to content

Conversation

donttouchmylancable
Copy link

added missing argument for recognize_from_audio (did not compile) +
Testrun on Macbook air M1 with time measurement.
I can provide the code if needed

added missing argument for recognize_from_audio (did not compile)
+
Testrun on Macbook air  M1 with time measurement.
I can provide the code if needed
@donttouchmylancable
Copy link
Author

Code for the time measurement

use rusty_whisper::Whisper;
use std::time::{SystemTime};

fn main() {
    let now = SystemTime::now();
    let whisper = Whisper::new(
        ".../weights/encoder.onnx",
        ".../weights/decoder.onnx",
        ".../weights/multilingual.tiktoken",
        ".../weights/positional_embedding.npz",
        ".../weights/mel_filters.npz",
    );
     match now.elapsed() {
       Ok(elapsed) => {
           println!("{} sec for init", elapsed.as_millis()/1000);
       }
       Err(e) => {
           println!("Error: {e:?}");
       }
    }
    let now = SystemTime::now();
    let result = whisper.recognize_from_audio(".../Rusty.wav","en");
     match now.elapsed() {
       Ok(elapsed) => {
           println!("{} sec for transcription", elapsed.as_millis()/1000);
       }
       Err(e) => {
           println!("Error: {e:?}");
       }
    }

    println!("{}", result);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant