
Inworld
- 54 installs
- 22 repo stars
- Updated August 1, 2026
- itechmeat/llm-code
Integrate the Inworld text-to-speech API for voice cloning, emotion-controlled audio markups, and word/phoneme timestamp alignment.
About
Covers the Inworld TTS API for generating speech, cloning voices from short samples, emotion markups, and viseme/word timestamps. A developer uses it when adding text-to-speech or lip-sync audio to an app.
- Voice cloning from 5-15 seconds of audio
- Emotion markups and word/phoneme timestamps for lip sync
Inworld by the numbers
- 54 all-time installs (skills.sh)
- Ranked #877 of 1,335 Generative Media skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/itechmeat/llm-code --skill inworldAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 54 |
|---|---|
| repo stars | ★ 22 |
| Last updated | August 1, 2026 |
| Repository | itechmeat/llm-code ↗ |
What it does
Integrate the Inworld text-to-speech API for voice cloning, emotion-controlled audio markups, and word/phoneme timestamp alignment.
Files
Inworld AI
Text-to-Speech platform with voice cloning, audio markups, and timestamp alignment.
Quick Navigation
| Topic | Reference |
|---|---|
| Installation | installation.md |
| Voice Cloning | cloning.md |
| Voice Control | voice-control.md |
| API Reference | api.md |
When to Use
- Text-to-speech audio generation
- Voice cloning from 5-15 seconds of audio
- Emotion-controlled speech (
[happy],[sad], etc.) - Word/phoneme timestamps for lip sync
- Custom pronunciation with IPA
Models
| Model | ID | Latency | Price |
|---|---|---|---|
| TTS-2 | inworld-tts-2 | latest | see pricing |
| TTS 1.5 Max | inworld-tts-1.5-max | legacy | legacy |
| TTS 1.5 Mini | inworld-tts-1.5-mini | legacy | legacy |
Minimal Example
import requests, base64, os
response = requests.post(
"https://api.inworld.ai/tts/v1/voice",
headers={"Authorization": f"Basic {os.getenv('INWORLD_API_KEY')}"},
json={"text": "Hello!", "voiceId": "Ashley", "modelId": "inworld-tts-1.5-max"}
)
audio = base64.b64decode(response.json()['audioContent'])Key Features
- 15 languages — en, zh, ja, ko, ru, it, es, pt, fr, de, pl, nl, hi, he, ar
- Instant cloning — 5-15 seconds audio, no training
- Audio markups —
[happy],[laughing],[sigh](English only) - Timestamps — word, phoneme, viseme timing for lip sync
- Streaming —
/voice:streamendpoint - TTS-2 steering — natural-language bracketed directions such as
[say excitedly]or[whisper in a hushed style] - Delivery mode —
STABLE,BALANCED,CREATIVEtrade consistency for emotional range - Cross-lingual synthesis — reuse one voice across multiple languages; voice localization improves native-sounding output
Release Highlights (TTS-2)
Realtime TTS-2becomes the new primary model line viamodelId="inworld-tts-2".- Steering moves beyond the older fixed emotion tags: free-form bracketed directions can control style, pitch, speed, intensity, and non-verbals.
- Multilingual coverage expands with production quality across 15 languages and broader experimental coverage beyond that.
deliveryModeadds a stability-vs-creativity knob, and specifyinglanguagematters more for cross-lingual output quality.
Prohibitions
- Audio markups work only in English
- Use ONE emotion markup at text beginning
- Match voice language to text language
- Instant cloning may not work for children's voices or unique accents
Links
API Reference
Base URL
https://api.inworld.ai/tts/v1Authentication
Authorization: Basic {INWORLD_API_KEY}Endpoints
Synthesize Speech
POST /voice
{
"text": "Hello, world!",
"voiceId": "Ashley",
"modelId": "inworld-tts-2"
}Response:
{
"audioContent": "base64-encoded-audio",
"timestampInfo": {...}
}Streaming
POST /voice:stream
Same body. Returns chunked audio + alignment per chunk.
Audio Formats
| Format | Sample Rate | Use Case |
|---|---|---|
| MP3 (default) | 16-48kHz | Broad compatibility |
| LINEAR16 | 8-48kHz | Low latency streaming |
| OPUS | 8-48kHz | Web/mobile |
| MULAW/ALAW | 8kHz | Telephony |
{ "audio_config": { "audio_encoding": "LINEAR16", "sample_rate_hertz": 48000 } }Request Parameters
| Parameter | Default | Description |
|---|---|---|
text | required | Text to synthesize |
voiceId | required | Voice ID (built-in or cloned) |
modelId | required | Model ID |
audio_config.audio_encoding | MP3 | MP3, LINEAR16, OPUS, MULAW, ALAW |
audio_config.sample_rate_hertz | varies | 8000-48000 |
temperature | 1.1 | Expressiveness (0.0-2.0) |
talking_speed | 1.0 | Speed (0.5-1.5) |
timestampType | none | WORD, CHARACTER |
deliveryMode | varies | STABLE, BALANCED, CREATIVE |
language | auto | Target language / locale hint |
Models
| Model | ID | Latency | Price |
|---|---|---|---|
| TTS-2 | inworld-tts-2 | latest | see docs |
| TTS 1.5 Max | inworld-tts-1.5-max | legacy | legacy |
| TTS 1.5 Mini | inworld-tts-1.5-mini | legacy | legacy |
Languages: en, zh, ja, ko, ru, it, es, pt, fr, de, pl, nl, hi, he, ar
TTS-2 notes:
deliveryModelets you choose consistency vs expressiveness.- Set
languageexplicitly when reusing a voice across multiple languages or when localizing a voice for a specific target language.
Integrations
| Platform | Type |
|---|---|
| Pipecat | InworldTTSService |
| LiveKit | Agents plugin |
| Ultravox | Native |
| Vapi | Native |
| Voximplant | Native |
Audio Generation
Supported Formats
| Format | Sample Rate | Notes |
|---|---|---|
| MP3 (default) | 16-48kHz, 32-320kbps | Broad compatibility |
| LINEAR16 | 8-48kHz, 16-bit | Low latency streaming |
| OPUS | 8-48kHz, 32-192kbps | Web/mobile apps |
| MULAW | 8kHz | Telephony |
| ALAW | 8kHz | Telephony |
Audio Config
{
"audio_config": {
"audio_encoding": "LINEAR16",
"sample_rate_hertz": 48000
}
}Voice Parameters
| Parameter | Default | Range | Effect |
|---|---|---|---|
temperature | 1.1 | 0.0-2.0 | Higher = more expressive |
talking_speed | 1.0 | 0.5-1.5 | 0.5 = half speed, 1.5 = 1.5x |
Emphasis
Use asterisks to emphasize words:
{ "text": "I *really* need this done today" }Languages
en, ar, zh, nl, fr, de, he, hi, it, ja, ko, pl, pt, ru, esBest Practice: Match voice language to text language for best quality.
TTS-2 notes:
- Cross-lingual synthesis lets you reuse one voice across multiple languages, but quality is best when you also provide the
languagehint explicitly. - Voice localization is the preferred path when you want the same voice identity to sound native in a target language instead of merely reading cross-lingually.
Built-in Voices
Available in TTS Playground. For custom voices, use voice cloning (min 5 seconds audio).
Voice Cloning
Cloning Types
| Type | Audio Required | Availability |
|---|---|---|
| Instant (zero-shot) | 5-15 seconds | All users via Portal |
| Professional | 30+ minutes | Contact sales |
Instant Cloning via Portal
1. Go to TTS Playground → Clone Voice 2. Choose Upload audio or Record audio 3. Name voice, select matching language 4. Upload/record up to 3 samples (5-15 seconds each) 5. Enable "Remove background noise" if needed 6. Click Continue → wait for validation 7. Test and copy voiceId for API use
Audio Requirements
- Formats: WAV, MP3, WebM
- Max total size: 16MB
- Samples > 15 seconds are auto-trimmed
- Match language to text you'll synthesize
Recording Tips
- Find quiet environment
- Keep reasonable mic distance
- Speak expressively (varied emotions)
- Use suggested scripts (Math Tutor, AI companion, etc.)
API Usage
response = requests.post(
"https://api.inworld.ai/tts/v1/voice",
headers={"Authorization": f"Basic {os.getenv('INWORLD_API_KEY')}"},
json={
"text": "Hello!",
"voiceId": "your-cloned-voice-id", # From TTS Playground
"modelId": "inworld-tts-1.5-max"
}
)Limitations
- Instant cloning may not perform well for:
- Children's voices
- Unique accents
- Use professional cloning for these cases
Installation & Quickstart
API Key
1. Sign up at https://platform.inworld.ai/ 2. Go to Settings → API Keys 3. Create and copy Base64 credentials
export INWORLD_API_KEY='your-base64-api-key-here'Basic Request (Python)
import requests
import base64
import os
response = requests.post(
"https://api.inworld.ai/tts/v1/voice",
headers={
"Authorization": f"Basic {os.getenv('INWORLD_API_KEY')}",
"Content-Type": "application/json"
},
json={
"text": "Hello, world!",
"voiceId": "Ashley",
"modelId": "inworld-tts-1.5-max"
}
)
audio_content = base64.b64decode(response.json()['audioContent'])
with open("output.mp3", "wb") as f:
f.write(audio_content)Streaming Request
import requests
import base64
import os
import json
response = requests.post(
"https://api.inworld.ai/tts/v1/voice:stream",
headers={
"Authorization": f"Basic {os.getenv('INWORLD_API_KEY')}",
"Content-Type": "application/json"
},
json={
"text": "Your text here...",
"voiceId": "Ashley",
"modelId": "inworld-tts-1.5-max",
"audio_config": {
"audio_encoding": "LINEAR16",
"sample_rate_hertz": 48000,
}
},
stream=True
)
for line in response.iter_lines():
chunk = json.loads(line)
audio_chunk = base64.b64decode(chunk["result"]["audioContent"])
# Process audio_chunk (skip first 44 bytes WAV header)Voice Control
Audio Markups (English only, experimental)
Emotion & Delivery Style
Place at beginning of text. Use only ONE per request:
[happy] I can't believe this is happening!
[sad] I really miss those days.
[angry] This is unacceptable!
[surprised] You did what?!
[fearful] I heard something outside...
[disgusted] That's revolting.
[laughing] Oh that's hilarious!
[whispering] Don't let them hear us.Split multiple emotions into separate API calls.
TTS-2 Natural Language Steering
TTS-2 expands voice control beyond the older fixed markup set. You can use bracketed natural-language instructions such as:
[say excitedly] We finally shipped it.
[whisper in a hushed style] Keep your voice down.
[speak as if barely holding back rage] I said stop.Use this when you need broader control over articulation, volume, pitch, pacing, vocal texture, or non-verbal delivery than the old fixed emotion tags provide.
deliveryMode guidance:
STABLEfor consistent production narration.BALANCEDfor a middle ground.CREATIVEwhen you want more expressive range and can tolerate more variation.
Non-Verbal Sounds
Can be used anywhere in text:
[clear_throat] Did you hear me? [sigh] You never listen!
[breathe] Let me think... [cough] Excuse me.
[laugh] That's so funny! [yawn] I'm tired.Custom Pronunciation (IPA)
Use /phonemes/ for uncommon words:
{ "text": "Your adventure in /kri:t/ begins today." }Finding IPA:
- Ask LLM: "What are the IPA phonemes for Crete, pronounced like kreet?"
- Use Vocabulary.com IPA guide
Timestamps (English only)
Enable with timestampType:
| Type | Returns | Use Case |
|---|---|---|
WORD | Word timing + phonemes + visemes | Lip sync |
CHARACTER | Character timing | Karaoke |
Note: Increases latency (especially non-streaming).
Request
{
"text": "Hello, world!",
"voiceId": "Ashley",
"modelId": "inworld-tts-1.5-max",
"timestampType": "WORD"
}Response (TTS 1.5)
{
"timestampInfo": {
"wordAlignment": {
"words": ["Hello,", "world!"],
"wordStartTimeSeconds": [0, 0.28],
"wordEndTimeSeconds": [0.28, 0.8],
"phoneticDetails": [
{
"wordIndex": 0,
"phones": [
{ "phoneSymbol": "h", "startTimeSeconds": 0, "durationSeconds": 0.07, "visemeSymbol": "aei" },
{ "phoneSymbol": "l", "startTimeSeconds": 0.1, "durationSeconds": 0.09, "visemeSymbol": "l" }
],
"isPartial": false
}
]
}
}
}Viseme Symbols
| Viseme | Sounds |
|---|---|
aei | Open vowels (a, e, i, ə) |
o | Rounded vowels (o, ʊ) |
ee | Front vowels (i, ɪ) |
bmp | Bilabial (b, m, p) |
fv | Labiodental (f, v) |
l | Lateral (l) |
r | Rhotic (r, ɝ) |
th | Dental (θ, ð) |
qw | Rounded (w) |
cdgknstxyz | Alveolar/velar consonants |