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:
@@ -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}"))?;
|
||||
|
||||
Reference in New Issue
Block a user