curl --request POST \
--url https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>",
"reference_id": "9a9cf47702da476aa4629e2506d4a857",
"format": "mp3"
}
'import requests
url = "https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3"
payload = {
"text": "[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>",
"reference_id": "9a9cf47702da476aa4629e2506d4a857",
"format": "mp3"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>',
reference_id: '9a9cf47702da476aa4629e2506d4a857',
format: 'mp3'
})
};
fetch('https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>',
'reference_id' => '9a9cf47702da476aa4629e2506d4a857',
'format' => 'mp3'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3"
payload := strings.NewReader("{\n \"text\": \"[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>\",\n \"reference_id\": \"9a9cf47702da476aa4629e2506d4a857\",\n \"format\": \"mp3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>\",\n \"reference_id\": \"9a9cf47702da476aa4629e2506d4a857\",\n \"format\": \"mp3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>\",\n \"reference_id\": \"9a9cf47702da476aa4629e2506d4a857\",\n \"format\": \"mp3\"\n}"
response = http.request(request)
puts response.read_body"<string>"Fish Audio TTS Drama 3
Synthesize directed speech with Fish Audio Drama 3 over one-shot HTTP. Returns binary audio in the requested format.
Direct the performance in plain language inside square brackets, such as [breathless, urgent] or [voice drops to a terrified whisper]. A direction applies from where it appears, so one line can change tone partway through. Paired tags such as <emphasis>...</emphasis> or <whisper>...</whisper> change only the words they wrap, and markers such as [sigh], [laugh] or [pause] place a sound or pause exactly where you put it.
For a multi-speaker scene, start each line with <|speaker:N|> and pass reference_id as an array with one voice ID per speaker, in speaker order. Every speaker keeps their own voice across the scene.
{
"text": "<|speaker:0|>You were there that night.<|speaker:1|>[defensive] I was home. [pause] Asleep.",
"reference_id": ["9a9cf47702da476aa4629e2506d4a857", "fbe02f8306fc4d3d915e9871722a39d5"],
"format": "mp3"
}
curl --request POST \
--url https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>",
"reference_id": "9a9cf47702da476aa4629e2506d4a857",
"format": "mp3"
}
'import requests
url = "https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3"
payload = {
"text": "[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>",
"reference_id": "9a9cf47702da476aa4629e2506d4a857",
"format": "mp3"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>',
reference_id: '9a9cf47702da476aa4629e2506d4a857',
format: 'mp3'
})
};
fetch('https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>',
'reference_id' => '9a9cf47702da476aa4629e2506d4a857',
'format' => 'mp3'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3"
payload := strings.NewReader("{\n \"text\": \"[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>\",\n \"reference_id\": \"9a9cf47702da476aa4629e2506d4a857\",\n \"format\": \"mp3\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>\",\n \"reference_id\": \"9a9cf47702da476aa4629e2506d4a857\",\n \"format\": \"mp3\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us-east.api.slng.ai/v1/tts/fish/tts:drama-3")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"[breathless, urgent] Turn off the lights. [slow, deadly serious] <emphasis>Do not open that door.</emphasis>\",\n \"reference_id\": \"9a9cf47702da476aa4629e2506d4a857\",\n \"format\": \"mp3\"\n}"
response = http.request(request)
puts response.read_body"<string>"Authorizations
Body
Fish Audio TTS request. Shared by one-shot and streaming synthesis.
Text to synthesize. S2-family and Drama 3 variants support <|speaker:N|> multi-speaker dialogue markers. Drama 3 also follows bracketed natural-language direction such as [whispering] and paired word-level tags such as <emphasis>...</emphasis>.
1Output sample rate in Hz. This enum is the union across formats; the gateway rejects a rate the selected format does not accept before contacting the provider. wav and pcm accept 8000, 16000, 24000, 32000, and 44100; mp3 accepts 32000 and 44100; opus accepts 48000 only. Omit or send null for the format default (48000 for opus, 44100 otherwise).
8000, 16000, 24000, 32000, 44100, 48000 Response
Synthesis successful. Returns binary audio in the format requested via format.
Binary audio data.