# Text to Speech
Source: https://typecast.ai/docs/api-reference/endpoint/text-to-speech/text-to-speech
POST /v1/text-to-speech
Generate speech from text using the specified voice model. Supports emotion, volume, pitch, and tempo customization.
First, list all available voice models using the GET /v1/voices endpoint, then use the voice_id from the response to generate speech with this endpoint. Each voice model has its own unique characteristics. See [Listing all voices](/api-reference/endpoint/voices/voice) for available voices.
# Listing all voices
Source: https://typecast.ai/docs/api-reference/endpoint/voices/voice
GET /v1/voices
Lists all available voice models for text-to-speech conversion.
This endpoint returns a complete list of voices including each voice's ID, name, supported model type (ssfm-v21), and available emotion options (happy, sad, angry, normal, etc.).
Returned voices have unique identifiers starting with either 'tc_' prefix (Typecast voices) or 'uc_' prefix (User-created voices).
Optional query parameters can be used to filter results by specific model type.
# Get Voice by ID
Source: https://typecast.ai/docs/api-reference/endpoint/voices/voice-id
GET /v1/voices/{voice_id}
Get details of a specific voice model.
# AWS Marketplace
Source: https://typecast.ai/docs/bestpractice/aws-marketplace
Learn how to integrate Typecast SSFM with AWS Marketplace, a fully managed service that provides access to foundation models via API.
Get started with Typecast SSFM on AWS Marketplace in just a few steps:
Visit our [AWS Marketplace listing](https://aws.amazon.com/marketplace/seller-profile?id=seller-rauqp3qawr25s)
Click "Continue to Subscribe"
Review and accept the terms and conditions
Once subscribed, you can access Typecast SSFM through AWS API Gateway
Use your AWS credentials to authenticate API calls
Start generating high-quality speech with our state-of-the-art models
Deploy typecast ssfm Model Package from AWS Marketplace
Get started with Typecast SSFM on AWS Marketplace
# Prompting
Source: https://typecast.ai/docs/bestpractice/prompting
Learn how to maximize the potential of Typecast SSFM through various prompting techniques and discover advanced prompting strategies to enhance your text-to-speech outputs.
## Predefined style of speaking
\| `ssfm-v21`
Enhance your speech with preset emotional styles like `happy`, `sad`, or `angry`. You can customize how intense these emotions sound to get exactly the mood you want. These presets make it easy to add natural-sounding emotions to your text-to-speech output.
```bash cURL
curl -N -X POST "https://api.typecast.ai/v1/text-to-speech" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ssfm-v21",
"voice_id": "tc_62e7365cff29581c04133b34",
"text": "Hello there! I am your friendly text-to-speech agent.",
"prompt": {
"preset": "happy",
"preset_intensity": 2.0
}
}' > typecast.wav
```
```python Python
from typecast.client import Typecast
from typecast.models import Prompt, TTSRequest
cli = Typecast(api_key="YOUR_API_KEY")
response = cli.text_to_speech(TTSRequest(
model="ssfm-v21",
voice_id="tc_62e7365cff29581c04133b34",
text="Hello there! I am your friendly text-to-speech agent.",
prompt=Prompt(
emotion_preset="happy",
emotion_intensity=2.0,
)))
with open('typecast.wav', 'wb') as f:
f.write(response.audio_data)
```
```javascript Javascript
import { TypecastClient } from 'typecast-sdk';
import fs from 'fs';
const cli = new TypecastClient({apiKey: 'YOUR_API_KEY'});
const response = await cli.textToSpeech({
model: "ssfm-v21",
voice_id: "tc_62e7365cff29581c04133b34",
text: "Hello there! I am your friendly text-to-speech agent.",
prompt: {
emotion_preset: "happy",
emotion_intensity: 2.0
}
});
await fs.promises.writeFile('output.wav', Buffer.from(response.audioData));
```
{/*
## Style Transfer from Reference Audio
| `ssfm-v30`
Want to match a specific emotional tone? Simply upload a reference audio file, and our system will replicate that speaking style in your generated speech. It's like having a voice actor take cues from your favorite performance!
## Speed Control
| `ssfm-v20`, `ssfm-v21`, `ssfm-v30`
Control how fast or slow your audio plays back - whether you need a natural conversational pace or want to speed things up for time-sensitive content. Our flexible speed controls let you fine-tune the tempo to match your needs.
## Context-aware Tone Adjustment
| `ssfm-v30`
Our AI automatically adapts the speaking tone and pace to match the context of your content, just like a native English speaker would naturally vary their speech patterns in conversation.
*/}
# Models
Source: https://typecast.ai/docs/models
## About our foundation model SSFM
Typecast currently uses an advanced AI voice model, the Typecast Speech Synthesis Foundation Model, or Typecast SSFM for short, which is our next generation text-to-speech technology that brings text to life with unparalleled naturalness and expressiveness.
## Models overview
| Model | Release Date | Description |
| :-------------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ssfm-v21` | 2025.04 |
Best quality
Multilingual(27 languages)
Exceptional naturalness and expressiveness
Powerful Controllability of emotions and speaking styles
|
## ssfm-v21
* Various emotions: `Neutral`, `Happy`, `Sad`, and `Angry`
* Speaking languages: English, Korean, Chinese, Spanish, Arabic, Portuguese, Russian, Japanese, German, French, Indonesian, Italian, Malay, Polish, Dutch, Ukrainian, Greek, Tamil, Swedish, Czech, Danish, Finnish, Tagalog, Slovak, Bulgarian, Croatian, Romanian
# Overview
Source: https://typecast.ai/docs/overview
Typecast is a text-to-speech API that allows you to convert text into lifelike speech.
Typecast is a text-to-speech(TTS) platform that enables users to create natural-sounding voiceovers using AI technology. The service provides a variety of synthetic voices and allows users to convert text into speech in multiple languages.
Typecast's API enables developers to integrate text-to-speech capabilities into their applications, offering features such as voice customization, multiple language support, and various voice styles. The platform supports both male and female voices across different age ranges and accents, making it suitable for various applications including e-learning content, video narration, audiobook production, and more.
The service uses advanced deep learning models to generate human-like speech patterns, including appropriate intonation and emotional expression. Developers can access these features through RESTful API endpoints, with support for both synchronous and asynchronous processing of text-to-speech requests.
The platform provides comprehensive documentation for integration, including code examples in multiple programming languages, and offers various subscription tiers to accommodate different usage needs.
Get started with Typecast and create your first AI voice.
Learn about the models we offer.
Typecast has 530+ unique voices to choose from
Learn how to use the Typecast API
# Quickstart
Source: https://typecast.ai/docs/quickstart
Get started with Typecast and create your first AI voice.
## Get Started with Authentication
To use the Typecast API, you'll need to authenticate your requests with an API key. Follow these steps:
Visit your [Typecast Dashboard](https://typecast.ai/developers) to generate a new API key
Keep your API key secure - we recommend storing it as an environment variable
You can set up your API key in two ways:
{/* - Add it to your `.env` file */}
* Configure it directly in your application code
* Set it as a shell environment variable
```bash Shell (Linux/macOS)
# Set for current session
export TYPECAST_API_KEY='YOUR_API_KEY'
```
```bash Shell (Windows)
# Set for current session
set TYPECAST_API_KEY=YOUR_API_KEY
```
{/* ```bash .env
TYPECAST_API_KEY = 'YOUR_API_KEY';
``` */}
## List all voices
To use Typecast effectively, you need access to voice IDs. The `/v1/voices` endpoint provides a complete list of available voices with their unique identifiers, names, models, and supported emotions.
You can also filter voices by model type using the optional `model` query parameter.
You can explore our complete voice catalog in more detail on the [Voices](/voices) page, where you'll find additional information about each voice's characteristics, sample audio clips, and recommended use cases.
```python Python
import requests
import os
api_key = os.environ.get("TYPECAST_API_KEY", "YOUR_API_KEY")
url = "https://api.typecast.ai/v1/voices"
headers = {"X-API-KEY": api_key}
params = {"model": "ssfm-v21"} # Optional
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
voices = response.json()
print(f"Found {len(voices)} voices:")
for voice in voices[:5]:
print(f"ID: {voice['voice_id']}, Name: {voice['voice_name']}, Emotions: {', '.join(voice['emotions'])}")
else:
print(f"Error: {response.status_code} - {response.text}")
```
```javascript Javascript
const apiKey = process.env.TYPECAST_API_KEY || 'YOUR_API_KEY';
async function getVoices() {
const url = 'https://api.typecast.ai/v1/voices';
const params = new URLSearchParams({model: 'ssfm-v21'});
try {
const response = await fetch(`${url}?${params}`, {
method: 'GET',
headers: {'X-API-KEY': apiKey}
});
if (!response.ok) {
throw new Error(`Error: ${response.status} - ${await response.text()}`);
}
const voices = await response.json();
console.log(`Found ${voices.length} voices:`);
voices.slice(0, 5).forEach(voice => {
console.log(`ID: ${voice.voice_id}, Name: ${voice.voice_name}, Emotions: ${voice.emotions.join(', ')}`);
});
} catch (error) {
console.error('Error fetching voices:', error);
}
}
getVoices();
```
```bash cURL
curl -X GET "https://api.typecast.ai/v1/voices?model=ssfm-v21" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json"
```
The response will be a JSON array of voice objects, each containing:
```json
{
"voice_id": "tc_62a8975e695ad26f7fb514d1",
"voice_name": "Olivia",
"model": "ssfm-v21",
"emotions": ["tonemid", "toneup", "normal", "happy", "sad", "angry"]
}
```
You'll need a valid voice ID when making text-to-speech requests. Make sure to select a voice that supports your desired emotion for the best results.
## Make your first request
```python Python
import requests
import os
api_key = os.environ.get("TYPECAST_API_KEY", "YOUR_API_KEY")
url = "https://api.typecast.ai/v1/text-to-speech"
headers = {"X-API-KEY": api_key, "Content-Type": "application/json"}
payload = {
"text": "Hello there! I am your friendly text-to-speech agent.",
"model": "ssfm-v21",
"voice_id": "tc_62a8975e695ad26f7fb514d1"
}
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 200:
with open('typecast.wav', 'wb') as f:
f.write(response.content)
print("Audio file saved as typecast.wav")
else:
print(f"Error: {response.status_code} - {response.text}")
```
```javascript Javascript
const apiKey = process.env.TYPECAST_API_KEY || 'YOUR_API_KEY';
async function convertTextToSpeech() {
const url = 'https://api.typecast.ai/v1/text-to-speech';
const payload = {
text: "Hello there! I am your friendly text-to-speech agent.",
model: "ssfm-v21",
voice_id: "tc_62a8975e695ad26f7fb514d1"
};
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'X-API-KEY': apiKey,
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
if (!response.ok) {
throw new Error(`Error: ${response.status} - ${await response.text()}`);
}
const audioData = await response.arrayBuffer();
fs.writeFileSync('typecast.wav', Buffer.from(audioData));
console.log('Audio file saved as typecast.wav');
} catch (error) {
console.error('Error converting text to speech:', error);
}
}
convertTextToSpeech();
```
```bash cURL
curl -N -X POST "https://api.typecast.ai/v1/text-to-speech" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ssfm-v21",
"text": "Hello there! I am your friendly text-to-speech agent.",
"voice_id": "tc_62a8975e695ad26f7fb514d1"
}' > typecast.wav
```
{/*
```python Python
from typecast.client import Typecast
from typecast.models import TTSRequest
# Initialize client
cli = Typecast(api_key="YOUR_API_KEY")
# Convert text to speech
audio = cli.text_to_speech(TTSRequest(
text="Hello there! I am your friendly text-to-speech agent.",
model="ssfm-v21",
voice_id="tc_62a8975e695ad26f7fb514d1"
))
# Save audio file
with open('typecast.wav', 'wb') as f:
f.write(audio)
```
```javascript Javascript
import { TypecastClient } from 'typecast-sdk';
import fs from 'fs';
// Initialize client
const client = new TypecastClient({
apiKey: 'YOUR_API_KEY'
});
// Convert text to speech
const audio = await client.textToSpeech({
text: "Hello there! I am your friendly text-to-speech agent.",
model: "ssfm-v21",
voice_id: "tc_62a8975e695ad26f7fb514d1"
});
// Save audio file
await fs.promises.writeFile('typecast.wav', Buffer.from(audio));
```
```bash cURL
curl -N -X POST "https://api.typecast.ai/v1/text-to-speech" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ssfm-v21",
"text": "Hello there! I am your friendly text-to-speech agent.",
"voice_id": "tc_62a8975e695ad26f7fb514d1",
}' > typecast.wav
```
*/}
To browse and select available voice IDs for your requests, please refer to [Listing all voices](/api-reference/endpoint/voices/voice) in our API Reference.
## Next steps
Congratulations on creating your first AI voice! Here are some resources to help you dive deeper:
Learn how to use the Typecast API
Learn about the models we offer.
Typecast has 530+ unique voices to choose from
# Voices
Source: https://typecast.ai/docs/voices
Discover and cast your own voices
## Overview
Typecast's AI voice actors shine across various applications, from narrating audiobooks and adding depth to video games, to rap, announcements, and crafting compelling marketing messages.
Get started with Typecast and create your first AI voice.
## Use cases
AI Rapper Voice Generator
AI Commercial Voice Over Actors for Your Advertising Needs
AI Anime Voice Generator for Your Content Needs
Professional Narration Voices
AI Cartoon Character Voice Generator
Online TikTok Voice Generator
Publish Your Own Audiobook Content With Our Free Audiobook Recorder
Get instant access to our announcer voice generator via our new advanced AI text-to-speech model.