Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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