use mirror::{
builder::{LLMBackend, LLMBuilder}, };
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let api_key = std::env::var("OPENAI_API_KEY").unwrap_or("sk-TESTKEY".into());
let llm = LLMBuilder::new()
.backend(LLMBackend::OpenAI) .api_key(api_key) .model("whisper-1") .max_tokens(512) .temperature(0.7) .stream(false) .build()
.expect("Failed to build LLM (OpenAI)");
match llm.transcribe_file("audio2.m4a").await {
Ok(text) => println!("Audio transcription:\n{}", text),
Err(e) => eprintln!("Audio transcription error: {}", e),
}
Ok(())
}