# DramaBox Text-to-Speech

> Run DramaBox Text-to-Speech by infsh online or via API. GPU time, billed per millisecond, no setup.

**URL:** https://inference.sh/apps/infsh/dramabox
**Last updated:** 2026-09-09

---

Expressive text-to-speech with voice cloning. The prompt controls emotion, laughs, sighs, pauses and delivery.

- app: `infsh/dramabox`
- maker: [infsh](https://inference.sh/apps/infsh.md)
- category: [audio](https://inference.sh/apps/category/audio.md)
- input → output: text → speech
- tasks: [text to speech](https://inference.sh/apps/tag/text-to-speech.md), [voice cloning](https://inference.sh/apps/tag/voice-cloning.md)
- price: GPU time, billed per millisecond
- runs via: api, javascript and python sdk, belt cli, mcp

## dramabox API Guide

### About
expressive text-to-speech with voice cloning. the prompt controls emotion, laughs, sighs, pauses and delivery.

### 1. Calling the API

#### Install the Client

```bash
pip install inferencesh
```

#### Setup Your API Key
Set `INFERENCE_API_KEY` as an environment variable. Get your key from settings → api keys.

```bash
export INFERENCE_API_KEY="inf_your_key"
```

#### Run and Get Result

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])


result = client.run({
        "app": "infsh/dramabox@5we098m9",
        "input": {
            "prompt": "A woman speaks warmly, \"Hello, how are you today?\" She laughs, \"Hahaha, it is so good to see you!\""
        }
    })

print(result["output"])
```

#### Stream Live Updates

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])


## stream=True yields updates as they arrive
for update in client.run({
        "app": "infsh/dramabox@5we098m9",
        "input": {
            "prompt": "A woman speaks warmly, \"Hello, how are you today?\" She laughs, \"Hahaha, it is so good to see you!\""
        }
    }, stream=True):
    if update.get("progress"):
        print(f"progress: {update['progress']}%")
    if update.get("output"):
        print(f"output: {update['output']}")
```

### 2. Authentication
The API uses API keys for authentication. See the authentication docs for detailed setup instructions.

### 3. Files

#### Automatic Upload

```python
## local file paths are automatically uploaded
result = client.run({
    "app": "infsh/dramabox@5we098m9",
    "input": {
        "image": "/path/to/local/image.png",  # detected & uploaded
        "audio": "https://example.com/audio.mp3",  # url passed through
    }
})
```

#### Manual Upload

```python
## upload and get a hosted URL
file = client.files.upload("/path/to/file.png")
print(file.uri)  # https://cloud.inference.sh/...
```

### 4. Schema

#### Input
- **prompt** (string) *required*: Scene-style prompt: <speaker description>, "<dialogue>" <stage direction> "<more dialogue>". Text inside quotes is spoken; text outside quotes directs delivery (e.g. She sighs deeply.). Laughs and sounds go inside quotes as one word ("Hahaha", "Mmmm", "Ugh"). End the prompt at the last closing quote. Long prompts are chunked automatically.
- **voice_reference** (string): Optional voice reference to clone (10+ seconds recommended; first 10 s are used). Match the speaker description to the reference's gender and age.
- **cfg_scale** (number): Classifier-free guidance. Lower = more natural, higher = more text-faithful.
- **stg_scale** (number): Skip-token guidance scale.
- **duration** (number): Target output length in seconds. 0 = estimate automatically from the prompt.
- **duration_multiplier** (number): Headroom applied to the auto-estimated duration (ignored when duration is set).
- **seed** (integer): Random seed for reproducible output.

#### Output
- **audio** (string): Generated speech (WAV, 48 kHz, watermarked with Resemble Perth)
- **duration_seconds** (number): Length of the generated audio in seconds

## other audio apps

- [Fish Audio Drama 3](https://inference.sh/apps/fish-audio/drama-3.md): $50.00/1M UTF-8 bytes
- [Eleven Flash v2.5](https://inference.sh/apps/elevenlabs/eleven-flash-v2-5.md): $0.04/1K characters
- [Eleven Multilingual v2](https://inference.sh/apps/elevenlabs/eleven-multilingual-v2.md): $0.08/1K characters
- [Eleven v3](https://inference.sh/apps/elevenlabs/eleven-v3.md): $0.08/1K characters
- [Eleven v4 Turbo](https://inference.sh/apps/elevenlabs/eleven-v4-turbo.md): $0.04/1K characters

## faq

### how much does DramaBox Text-to-Speech cost?

GPU time, billed per millisecond. you pay per run from your inference shell credits. no subscription is required.

### how do I run DramaBox Text-to-Speech via api?

call infsh/dramabox with the javascript or python sdk, the rest api, or `belt app run infsh/dramabox` from a terminal. the api reference on this page lists every input.

### who makes DramaBox Text-to-Speech?

DramaBox Text-to-Speech is made by infsh and runs on inference shell. every infsh app is listed at https://inference.sh/apps/infsh.

### can my agent use DramaBox Text-to-Speech?

yes. agents call it as a tool through the inference shell mcp server (https://api.inference.sh/mcp), the belt cli or the sdk, and pay per run like you do.

### what are the alternatives to DramaBox Text-to-Speech?

other audio apps on inference shell include Fish Audio Drama 3, Eleven Flash v2.5, Eleven Multilingual v2, Eleven v3. they run through the same api, so switching is a one-line change.
