2
0

fix(voice): move API key from URL query to x-goog-api-key header

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 07:36:12 +09:00
parent 2df28d13b2
commit d5452bdcba

View File

@@ -141,10 +141,11 @@ fn transcribe(config: &VoiceConfig, audio: &[i16]) -> Result<String, String> {
}
});
let url = format!("https://speech.googleapis.com/v1/speech:recognize?key={api_key}");
let url = "https://speech.googleapis.com/v1/speech:recognize";
let client = reqwest::blocking::Client::new();
let resp = client.post(&url)
let resp = client.post(url)
.header("x-goog-api-key", &api_key)
.json(&body)
.send()
.map_err(|e| format!("STT request: {e}"))?;