# qwen3-tts/text-to-speech

> Qwen3 TTS: Multi-language, multi-voice text-to-speech synthesis with style control. Supports 11 languages and 9 voice characters. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.

- **Provider:** AirCube
- **Category:** text-to-audio
- **Price:** $0.0500 per run

## Key Features

- High-quality audio generation with natural, human-like voice output.
- Multiple voice options — choose from a variety of voice styles, accents and tones.
- Fine-grained control over speed, pitch, and emphasis.
- Low-latency streaming suitable for real-time applications.
- Support for multiple languages and accents.
- Consistent quality across short and long-form audio.

## Parameters

| Parameter | Required | Description |
| --- | --- | --- |
| `prompt` | Yes | Text or description for audio generation. |
| `voice` | No | Voice ID or style to use. |
| `speed` | No | Playback speed multiplier (0.5-2.0, default: 1.0). |
| `format` | No | Output format: mp3, wav, ogg (default: mp3). |

## How to Use

1. Enter the text you want to convert to audio or describe the audio to generate.
2. Select a voice style if the model supports multiple voices.
3. Adjust speed and format settings as needed.
4. Generate and download your audio file.

## Code Examples

### Python

```python
import os
import requests

response = requests.post(
    "https://aircube.ai/api/v3/qwen3-tts/text-to-speech",
    headers={
        "Authorization": "Bearer " + os.environ["AIRCUBE_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
    "prompt": "Hello, welcome to AirCube AI.",
    "voice": "default"
},
    timeout=300,
)
data = response.json()

if data["success"]:
    print("ID:", data["data"]["id"], "Status:", data["data"]["status"])
else:
    print("Error:", data["error"]["message"])
```

### Node.js

```javascript
const response = await fetch("https://aircube.ai/api/v3/qwen3-tts/text-to-speech", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.AIRCUBE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "prompt": "Hello, welcome to AirCube AI.",
  "voice": "default"
}),
});

const data = await response.json();

if (data.success) {
  console.log("ID:", data.data.id, "Status:", data.data.status);
} else {
  console.error("Error:", data.error.message);
}
```

### cURL

```curl
curl -X POST "https://aircube.ai/api/v3/qwen3-tts/text-to-speech" \
  -H "Authorization: Bearer $AIRCUBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Hello, welcome to AirCube AI.",
  "voice": "default"
}'
```

### Python (Async)

```python
import os
import time
import requests

# 1. Submit
response = requests.post(
    "https://aircube.ai/api/v3/qwen3-tts/text-to-speech",
    headers={
        "Authorization": "Bearer " + os.environ["AIRCUBE_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
    "prompt": "Hello, welcome to AirCube AI.",
    "voice": "default"
},
    timeout=300,
)
data = response.json()

if not data["success"]:
    print("Error:", data["error"]["message"])
    exit(1)

generation_id = data["data"]["id"]
print(f"Submitted: {generation_id}")

# 2. Poll until completed
while True:
    time.sleep(5)
    r = requests.get(
        f"https://aircube.ai/api/v3/status/{generation_id}",
        headers={"Authorization": "Bearer " + os.environ["AIRCUBE_API_KEY"]},
    )
    result = r.json()["data"]

    if result["status"] == "completed":
        print(result["output_url"])
        break
    elif result["status"] == "failed":
        print("Generation failed")
        break
```

### Node.js (Async)

```javascript
// 1. Submit
const response = await fetch("https://aircube.ai/api/v3/qwen3-tts/text-to-speech", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.AIRCUBE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "prompt": "Hello, welcome to AirCube AI.",
  "voice": "default"
}),
});
const data = await response.json();

if (!data.success) {
  console.error("Error:", data.error.message);
  process.exit(1);
}

const generationId = data.data.id;
console.log("Submitted:", generationId);

// 2. Poll until completed
while (true) {
  await new Promise((r) => setTimeout(r, 5000));
  const res = await fetch(
    `https://aircube.ai/api/v3/status/${generationId}`,
    { headers: { "Authorization": "Bearer " + process.env.AIRCUBE_API_KEY } },
  );
  const result = (await res.json()).data;

  if (result.status === "completed") {
    console.log(result.output_url);
    break;
  } else if (result.status === "failed") {
    console.error("Generation failed");
    break;
  }
}
```

### cURL (Async)

```curl
# 1. Submit
RESPONSE=$(curl -s -X POST "https://aircube.ai/api/v3/qwen3-tts/text-to-speech" \
  -H "Authorization: Bearer $AIRCUBE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Hello, welcome to AirCube AI.",
  "voice": "default"
}')

ID=$(echo "$RESPONSE" | jq -r '.data.id')
echo "Submitted: $ID"

# 2. Poll until completed
while true; do
  sleep 5
  STATUS_RES=$(curl -s "https://aircube.ai/api/v3/status/$ID" \
    -H "Authorization: Bearer $AIRCUBE_API_KEY")
  STATUS=$(echo "$STATUS_RES" | jq -r '.data.status')

  if [ "$STATUS" = "completed" ]; then
    echo "$STATUS_RES" | jq -r '.data.output_url'
    break
  elif [ "$STATUS" = "failed" ]; then
    echo "Generation failed"; break
  fi
done
```

## Pricing

| Resolution | Duration | Cost |
| --- | --- | --- |
| Standard | per generation | $0.05 |

### Billing Rules

- Failed generations are not charged.

## Best Use Cases

- Voiceover production — generate narration for videos, podcasts and presentations.
- Accessibility — create audio versions of written content.
- Character voices — produce unique voices for games, apps and interactive media.
- Multilingual content — generate audio in multiple languages from the same script.

## Pro Tips

- Use punctuation and line breaks in your text to control pacing and pauses.
- Experiment with different voices to find the best match for your content's tone.
- For longer content, break it into segments for more consistent quality.
- Preview at 1.0x speed before adjusting — subtle changes often sound most natural.

## Notes

- Maximum text length varies by model — check parameters for specific limits.
- Audio output is typically MP3 format with configurable bitrate.
- Content policy applies — harmful or prohibited content will be filtered.

## FAQ

**Q: What is the qwen3-tts/text-to-speech API?**

Qwen3 TTS: Multi-language, multi-voice text-to-speech synthesis with style control. Supports 11 languages and 9 voice characters. Ready-to-use REST inference API, best performance, no cold starts, affordable pricing.

**Q: What audio formats are supported?**

Most models output MP3 by default, with WAV and OGG as alternatives.

**Q: Can I use qwen3-tts/text-to-speech for commercial voiceover?**

Yes — generated audio is yours to use commercially. Review the Pricing page for plan-specific limits.

**Q: How do I control the speaking style?**

Use the voice parameter to select a style, and adjust speed for pacing. Some models also accept SSML-like markup in the text.
