Skip to main content

Voice input for exoclaw — listen + transcribe via audio-capable LLM. Cross-runtime (CPython + MicroPython).

Project description

exoclaw-tools-voice

Voice input for exoclaw — capture microphone audio and transcribe via an audio-capable LLM. Cross-runtime (CPython + MicroPython).

What it does

ListenAndTranscribeTool is the agent surface. When the agent calls listen():

  1. Opens a board-supplied AudioCapture (file-backed on the unix sim, I2S PDM mic on the reTerminal E1001).
  2. Streams PCM bytes through a chunked base64 encoder into a chat-completions request body — never materialising the whole recording in memory.
  3. Routes the request to a dedicated audio-capable model (e.g. openai/gpt-audio-mini on OpenRouter), separate from the agent's main chat model.
  4. Returns the transcription as plain text.

The agent's main loop never sees audio — it just gets text back from a tool call, the same way web_search returns grounded text.

Architecture

The package is a Protocol seam:

  • AudioCapture Protocol — what each board implements
  • ListenAndTranscribeTool — cross-runtime tool that consumes the Protocol
  • stream_audio_request_body — chunked JSON body generator
  • B64StreamEncoder — chunked base64 with mid-stream-padding-safe semantics

Concrete AudioCapture impls live in the firmware board tree:

  • boards/unix/audio.pyWavFileCapture (reads a pre-staged WAV)
  • boards/reterminal_e1001/audio.pyI2SCapture (PDM mic via machine.I2S, mic-power-enable on GPIO38, button K0 trigger)

Configuration

The firmware wires the tool when OPENAI_AUDIO_MODEL is set:

# mise.local.toml
[env]
OPENAI_AUDIO_MODEL = "openai/gpt-audio-mini"

Same pattern as OPENAI_SEARCH_MODEL for web_search. Unset → no listen tool surface.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exoclaw_tools_voice-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exoclaw_tools_voice-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file exoclaw_tools_voice-0.1.0.tar.gz.

File metadata

  • Download URL: exoclaw_tools_voice-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for exoclaw_tools_voice-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d78a37532fe716de50e2cf00b6c3ab6da77274130bddfdff3b0e9e0b9daedca
MD5 449aba7beab6b51f809818f4ffb915b4
BLAKE2b-256 d96dfffcfaceb47b5c14b029d343e2be7b53f9160b8c62046e76f4ec9fb75b81

See more details on using hashes here.

File details

Details for the file exoclaw_tools_voice-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: exoclaw_tools_voice-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for exoclaw_tools_voice-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bf4137e856c3d67f6750afdd0b054d900eaa38086e77f57488c71dd789796af
MD5 de1287b8926ab7a97c45dd09beb9f84c
BLAKE2b-256 c5a52182116e8af8007f3584f887ce24351c8c421104edc8923870053ad13123

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page