whisper: use large-v3 model with Chinese language hint
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user