Skip to content

Add local voice model transcription#1

Open
pdufour wants to merge 16 commits intomainfrom
paul.dufour/test-local-trans
Open

Add local voice model transcription#1
pdufour wants to merge 16 commits intomainfrom
paul.dufour/test-local-trans

Conversation

@pdufour
Copy link
Owner

@pdufour pdufour commented Mar 15, 2026

Description

This adds the ability to do transcription using a local LLM model for the in-development transcription
There are already some ways to load local models (i.e. you can run with ollama using --local-provider ollama) so this extends that theme with the ability to also do transcription locally. It can be useful for instance if you are temporarily offline.

output.mp4

Specific Changes

  • Add new /voicemodel slash command that lets you switch between remote transcription and local
  • Change space to record to use above model section for transcription
  • Add ability to download models on the fly with hf_hub

Test Plan

Test recording with onnx model

  • Add voice-input feature
  • Edit codex-rs/tui/BUILD.bazel
  • Add in crate_features voice-input like so:
codex_rust_crate(
    name = "tui",
    crate_name = "codex_tui",
    crate_features = ["voice-input"],
  • Run the app with the voice transcription active:
RUST_LOG=error,transcribe_rs=debug,codex_tui::voice=debug bazel run //codex-rs/cli:codex -- --enable voice_transcription --enable realtime_conversation
  • Select a voice-model:
/voice-model
  • Select Parakeet
  • Look at logs in another terminal:
tail -f ~/.codex/log/codex-tui.log
  • Hold down space and record something
  • See the transcription come through and see that it used Parakeet
  • Verify the logs
2026-03-16T00:59:43.065655Z DEBUG codex_tui::voice: transcribe_bytes route: parakeet

Test recording with remote openai selection

  • Repeat same steps but select openai model (this is already the default)
  • Hold down space and record something
  • See the transcription come through and see that it used OpenAI:

Verify the logs:

2026-03-16T00:59:43.065655Z DEBUG codex_tui::voice: transcribe_bytes route: openai

Test recording with no voice-model selected

  • Repeat above steps but don't go to the /voice-model input
  • See that it selects openai when you record (view logs)
  • View logs and see openai logs
2026-03-16T00:59:43.065655Z DEBUG codex_tui::voice: transcribe_bytes route: openai

@pdufour pdufour force-pushed the paul.dufour/test-local-trans branch from 1ae3151 to b7b0c33 Compare March 15, 2026 18:30
@pdufour pdufour changed the title Paul.dufour/test local trans Add local voice model transcription Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant