diff --git a/src/voice/stt.rs b/src/voice/stt.rs index 262f6e9..1841db0 100644 --- a/src/voice/stt.rs +++ b/src/voice/stt.rs @@ -141,10 +141,11 @@ fn transcribe(config: &VoiceConfig, audio: &[i16]) -> Result { } }); - 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}"))?;