Files
codex/codex-rs/backend-client/Cargo.toml
T
Ax 83c46d0a58 Add audio transcription to the backend client (#62142)
## What changed

Add `Client::transcribe_audio` to send a single audio clip to the
`/transcribe` dictation endpoint as an authenticated multipart upload
and return the transcript text. Accept WAV, MP3, M4A, WebM, and Ogg,
and cap the response body at 64 KiB.

## Testing

Add a mock-server test that checks the bearer token, the exact multipart
body for an M4A clip, and the returned transcript text.

GitOrigin-RevId: 50ab00d932aefda942c730a8b037b53d4f5003c2
2026-11-18 00:33:23 +00:00

40 lines
1.1 KiB
TOML

[package]
name = "codex-backend-client"
version.workspace = true
edition.workspace = true
license.workspace = true
publish = false
[lib]
path = "src/lib.rs"
doctest = false
[lints]
workspace = true
[dependencies]
anyhow = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
http = { workspace = true }
url = { workspace = true }
codex-backend-openapi-models = { path = "../codex-backend-openapi-models" }
codex-api = { workspace = true }
codex-features = { workspace = true }
codex-http-client = { workspace = true }
codex-utils-absolute-path = { workspace = true }
codex-login = { workspace = true }
codex-model-provider = { workspace = true }
codex-runtime-agent-instance = { workspace = true }
codex-protocol = { workspace = true }
codex-response-debug-context = { workspace = true }
tokio = { workspace = true, features = ["time"] }
uuid = { workspace = true, features = ["v4"] }
[dev-dependencies]
base64 = { workspace = true }
pretty_assertions = "1"
tempfile = { workspace = true }
tokio = { workspace = true, features = ["macros", "rt"] }
wiremock = { workspace = true }