#7258: feat(tts): add Inworld AI TTS provider
Cluster:
Text-to-Speech Provider Enhancements
## Summary
This PR adds Inworld AI as a new TTS provider for OpenClaw, offering:
- **65 voices** across 15 languages (English, German, Chinese, French, Spanish, etc.)
- **Two quality tiers**: `inworld-tts-1` (faster) and `inworld-tts-1-max` (higher quality)
- **Multiple output formats**: MP3, WAV, and Opus
- **Low latency**: ~130-250ms typical response time
- **Competitive pricing**: ~$5-10 per million characters
## Features
- Case-insensitive voice lookup
- Comprehensive error handling (401, 402, 429, network errors)
- Environment variable support (`INWORLD_API_KEY`)
- Full unit test coverage (22 tests)
## Configuration Example
```json
{
"tts": {
"provider": "inworld",
"inworld": {
"voiceId": "Dennis",
"modelId": "inworld-tts-1"
}
}
}
```
## Test Plan
- [x] Unit tests pass (22/22)
- [x] Integration tests pass (9/9)
- [x] Tested with real Inworld API
- [x] Verified audio output quality
---
🤖 Co-authored with Claude
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a new Inworld AI Text-to-Speech provider implementation (`src/tts/inworld.ts`), including a voice/model catalog, request construction against Inworld’s `/tts/v1/voice` endpoint, decoding base64 audio content, writing the audio file to a temp directory, and mapping common HTTP/network failures to friendlier error messages.
It also adds a Vitest suite intended to cover voice/model validation, API key selection, payload formatting, and several error paths.
<h3>Confidence Score: 3/5</h3>
- Mostly safe to merge, but fix the broken test import first.
- Core provider logic is straightforward and defensive, but the added test file currently imports a non-existent module (`./inworld-provider`), which will fail CI. There are also a couple of type-safety/style issues (`any` casts) that are easy to tighten up.
- src/tts/inworld.test.ts (import path + header comment), src/tts/inworld.ts (type consistency, `any` usage)
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#7965: feat(tts): add Speechify as TTS provider
by chaerla · 2026-02-03
79.1%
#20794: feat(tts): add Fish Audio provider with full docs, tests & gateway ...
by twangodev · 2026-02-19
77.9%
#19073: feat(voice-call): streaming TTS, barge-in, silence filler, hangup, ...
by odrobnik · 2026-02-17
75.0%
#11745: ui: add server-side TTS for web chat via gateway endpoint
by wjlgatech · 2026-02-08
74.5%
#8922: feat(voice-call): Add ElevenLabs WebSocket streaming TTS
by mikiships · 2026-02-04
74.2%
#7485: TTS: add Resemble AI provider support
by devshahofficial · 2026-02-02
73.8%
#6677: fix(tts): always load fresh config for voice selection
by Jinqiao · 2026-02-01
73.6%
#19210: feat(tts): add OpenAI instructions parameter support
by keenranger · 2026-02-17
73.3%
#22086: fix(tts): honor explicit config provider and model/voice settings
by AIflow-Labs · 2026-02-20
73.2%
#22618: feat(tts): add OpenAI TTS speed parameter support
by useramuser · 2026-02-21
73.1%