whisper: use large-v3 model with Chinese language hint

This commit is contained in:
Fam Zheng
2026-04-11 18:13:54 +01:00
parent ffa71ac2d9
commit daed6c9d37

View File

@@ -533,7 +533,8 @@ async fn transcribe_audio(whisper_url: &str, file_path: &Path) -> Result<String>
.mime_str("audio/ogg")?;
let form = reqwest::multipart::Form::new()
.part("file", part)
.text("model", "base");
.text("model", "large-v3")
.text("language", "zh");
let resp = client.post(&url).multipart(form).send().await?.error_for_status()?;
let json: serde_json::Value = resp.json().await?;
Ok(json["text"].as_str().unwrap_or("").to_string())