darker model name text
This commit is contained in:
@ -43,16 +43,19 @@ pub fn transcribe_audio(
|
||||
args.push(lang);
|
||||
}
|
||||
|
||||
// Run Python script
|
||||
// Run Python script with timeout
|
||||
let output = Command::new(python_exe)
|
||||
.args(&args)
|
||||
.env("PYTHONPATH", crate::paths::project_root().join(".venv312").join("lib").join("python3.12").join("site-packages"))
|
||||
.output()
|
||||
.map_err(|e| format!("Failed to run Python script: {}", e))?;
|
||||
|
||||
// Check for timeout or other errors
|
||||
if !output.status.success() {
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
return Err(format!("Python script failed: {}", stderr));
|
||||
let stdout = String::from_utf8_lossy(&output.stdout);
|
||||
return Err(format!("Python script failed: {}\nStdout: {}\nStderr: {}",
|
||||
output.status, stdout, stderr));
|
||||
}
|
||||
|
||||
// Parse JSON output
|
||||
|
||||
Reference in New Issue
Block a user