Update cloned voice (partial update)
curl --request PATCH \
--url https://supertoneapi.com/v1/custom-voices/{voice_id} \
--header 'Content-Type: application/json' \
--header 'x-sup-api-key: <api-key>' \
--data '
{
"name": "My Updated Voice",
"description": "An updated warm and friendly voice for customer service"
}
'import requests
url = "https://supertoneapi.com/v1/custom-voices/{voice_id}"
payload = {
"name": "My Updated Voice",
"description": "An updated warm and friendly voice for customer service"
}
headers = {
"x-sup-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-sup-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Updated Voice',
description: 'An updated warm and friendly voice for customer service'
})
};
fetch('https://supertoneapi.com/v1/custom-voices/{voice_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://supertoneapi.com/v1/custom-voices/{voice_id}"
payload := strings.NewReader("{\n \"name\": \"My Updated Voice\",\n \"description\": \"An updated warm and friendly voice for customer service\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-sup-api-key", "<api-key>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://supertoneapi.com/v1/custom-voices/{voice_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Updated Voice',
'description' => 'An updated warm and friendly voice for customer service'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-sup-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://supertoneapi.com/v1/custom-voices/{voice_id}")
.header("x-sup-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Updated Voice\",\n \"description\": \"An updated warm and friendly voice for customer service\"\n}")
.asString();{
"voice_id": "voice_123456789",
"name": "My Updated Voice",
"description": "An updated warm and friendly voice for customer service"
}{
"status": "error",
"message": {
"message": "Invalid API Key",
"error": "Unauthorized"
}
}{
"status": "error",
"message": {
"message": "Voice not found",
"error": "Not Found"
}
}{
"status": "error",
"message": {
"message": "Failed to convert text to speech",
"error": "Internal Server Error"
}
}Custom voices
Edit custom voice
カスタム(クローン)ボイスの名前または説明を更新します。
PATCH
/
v1
/
custom-voices
/
{voice_id}
Update cloned voice (partial update)
curl --request PATCH \
--url https://supertoneapi.com/v1/custom-voices/{voice_id} \
--header 'Content-Type: application/json' \
--header 'x-sup-api-key: <api-key>' \
--data '
{
"name": "My Updated Voice",
"description": "An updated warm and friendly voice for customer service"
}
'import requests
url = "https://supertoneapi.com/v1/custom-voices/{voice_id}"
payload = {
"name": "My Updated Voice",
"description": "An updated warm and friendly voice for customer service"
}
headers = {
"x-sup-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-sup-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'My Updated Voice',
description: 'An updated warm and friendly voice for customer service'
})
};
fetch('https://supertoneapi.com/v1/custom-voices/{voice_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://supertoneapi.com/v1/custom-voices/{voice_id}"
payload := strings.NewReader("{\n \"name\": \"My Updated Voice\",\n \"description\": \"An updated warm and friendly voice for customer service\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-sup-api-key", "<api-key>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://supertoneapi.com/v1/custom-voices/{voice_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'My Updated Voice',
'description' => 'An updated warm and friendly voice for customer service'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-sup-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://supertoneapi.com/v1/custom-voices/{voice_id}")
.header("x-sup-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"My Updated Voice\",\n \"description\": \"An updated warm and friendly voice for customer service\"\n}")
.asString();{
"voice_id": "voice_123456789",
"name": "My Updated Voice",
"description": "An updated warm and friendly voice for customer service"
}{
"status": "error",
"message": {
"message": "Invalid API Key",
"error": "Unauthorized"
}
}{
"status": "error",
"message": {
"message": "Voice not found",
"error": "Not Found"
}
}{
"status": "error",
"message": {
"message": "Failed to convert text to speech",
"error": "Internal Server Error"
}
}このドキュメントは英語の原文から自動翻訳されています。表現に不自然な箇所がある場合があります。正確な内容は英語の原文もあわせてご確認ください。
name と description のみです。
エンドポイント
PATCH https://supertoneapi.com/v1/custom-voices/{voice_id}
パスパラメータ
| Name | Required | Description |
|---|---|---|
voice_id | ✅ | 編集対象のカスタムボイスの ID です。 |
リクエストボディ
| Field | Required | Description |
|---|---|---|
name | — | 新しいボイス名です。最大 100 文字。 |
description | — | 新しい説明です。 |
注意事項
voice_idは変更されません。既存の参照は引き続き有効です。- ボイスが別アカウントに属している場合は
403 Forbiddenを返します。
関連項目
Docs: Custom voices
カスタムボイスのライフサイクル全体。
Delete custom voice
カスタムボイスを完全に削除します。
Authorizations
Path Parameters
Body
application/json
⌘I