← Back to PRs

#7088: feat: add Camb AI extension

by neilruaro-camb open 2026-02-02 11:21 View on GitHub →
agents
## Summary Adds a new extension plugin that integrates [Camb AI](https://camb.ai/)'s audio capabilities into OpenClaw. ## Agent Tools AI agents can use these tools via the gateway: | Tool | Description | |------|-------------| | `camb_tts` | Text-to-speech with MARS models (Flash/Pro/Instruct) | | `camb_transcribe` | Speech-to-text with speaker ID support | | `camb_translate` | 140+ language text translation | | `camb_translated_tts` | Translate + speak in one step | | `camb_voice_clone` | Clone voice from audio sample (2+ sec) | | `camb_create_voice` | Generate voice from text description | | `camb_sound_generate` | Generate music/SFX from prompt | | `camb_audio_separate` | Isolate vocals from background | | `camb_list_voices` | List available TTS voices | | `camb_list_languages` | List supported languages | ## CLI Commands ```bash openclaw camb status # Check config & connectivity openclaw camb voices # List available voices openclaw camb languages # List supported languages openclaw camb tts "Hello" # Text-to-speech openclaw camb transcribe file.mp3 # Transcribe audio openclaw camb translate "Hello" --to 14 # Translate text openclaw camb sound-generate "rain ambience" # Generate sound openclaw camb voice-clone file.mp3 --name "my-voice" # Clone voice openclaw camb create-voice "warm British female" # Create voice openclaw camb translated-tts "Hello" --to 14 # Translate + speak openclaw camb audio-separate file.mp3 # Separate vocals ``` ## Configuration ```yaml # openclaw.yml plugins: entries: camb-ai: enabled: true config: apiKey: ${CAMB_API_KEY} tts: model: mars-flash # mars-flash | mars-pro | mars-instruct defaultLanguage: en-us defaultVoiceId: 123 # Get IDs from `openclaw camb voices` voiceCloning: enabled: true # Opt-in for safety soundGeneration: enabled: true ``` ## Features - All tools accept both URLs and local file paths - Audio files saved to `~/.openclaw/media/camb-ai/` - Lazy client initialization (only connects when needed) - Polling with configurable timeout for async operations ## Test Plan - [x] `pnpm build` passes - [x] `pnpm check` passes - [x] `pnpm test extensions/camb-ai/` passes - [x] CLI commands tested manually - [x] Agent tools tested via TUI <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new `camb-ai` extension under `extensions/camb-ai/`, including a plugin entrypoint (`index.ts`), config schema + validation, a Camb client wrapper, a fairly extensive `openclaw camb ...` CLI surface, and a suite of tool implementations/tests for TTS, transcription, translation, voice cloning, sound generation, etc. The extension registers tools with the OpenClaw plugin API and exposes a few gateway methods (e.g. `camb.tts`, `camb.voices`, `camb.languages`). Main issue found is in the CLI’s async task polling: it checks for a failure status string (`"FAILURE"`) that doesn’t match the status string used elsewhere in this extension (`"FAILED"`), causing failed tasks to be misreported as timeouts. There’s also a broken CLI contract where `openclaw camb voices --language ...` is defined but ignored. <h3>Confidence Score: 3/5</h3> - This PR is close to mergeable, but the CLI has a definite failure-handling bug that will affect real users. - Most of the change is additive and well-tested, but the CLI polling loops use a failure status string that conflicts with the client wrapper’s `FAILED` handling, which will cause failed async operations to spin until timeout and misreport the error. There is also a defined-but-unused `--language` option in the `voices` command that breaks expected behavior. - extensions/camb-ai/src/cli.ts <!-- greptile_other_comments_section --> <sub>(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!</sub> <!-- /greptile_comment -->

Most Similar PRs