Skip to content

Commit 5504a37

Browse files
fix
1 parent 3894273 commit 5504a37

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

codex-rs/tui/src/voice.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,8 @@ fn encode_wav_normalized(audio: &RecordedAudio) -> Result<Vec<u8>, String> {
324324

325325
async fn resolve_auth() -> Result<(String, Option<String>), String> {
326326
let codex_home = find_codex_home().map_err(|e| format!("failed to find codex home: {e}"))?;
327-
let auth_opt = CodexAuth::from_codex_home(
328-
&codex_home,
329-
AuthMode::ChatGPT,
330-
codex_core::default_client::DEFAULT_ORIGINATOR,
331-
)
332-
.map_err(|e| format!("failed to read auth.json: {e}"))?;
327+
let auth_opt = CodexAuth::from_codex_home(&codex_home, AuthMode::ChatGPT)
328+
.map_err(|e| format!("failed to read auth.json: {e}"))?;
333329
match auth_opt {
334330
Some(auth) => {
335331
let token = auth
@@ -363,7 +359,7 @@ async fn transcribe_bytes(wav_bytes: Vec<u8>) -> Result<String, String> {
363359
.post("https://api.openai.com/v1/audio/transcriptions")
364360
.bearer_auth(bearer_token)
365361
.multipart(form)
366-
.header("User-Agent", get_codex_user_agent(None));
362+
.header("User-Agent", get_codex_user_agent());
367363

368364
if let Some(acc) = chatgpt_account_id {
369365
req = req.header("chatgpt-account-id", acc);

0 commit comments

Comments
 (0)