Change Voice Speed
curl --request POST \
--url https://api.example.com/tts/change-voice \
--header 'Content-Type: application/json' \
--data '
{
"speed": 123,
"api_key": "<string>"
}
'import requests
url = "https://api.example.com/tts/change-voice"
payload = {
"speed": 123,
"api_key": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({speed: 123, api_key: '<string>'})
};
fetch('https://api.example.com/tts/change-voice', 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://api.example.com/tts/change-voice",
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([
'speed' => 123,
'api_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/tts/change-voice"
payload := strings.NewReader("{\n \"speed\": 123,\n \"api_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/tts/change-voice")
.header("Content-Type", "application/json")
.body("{\n \"speed\": 123,\n \"api_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tts/change-voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"speed\": 123,\n \"api_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyText-to-Speech
Change Voice Speed
Adjust the playback speed of an audio file
POST
/
tts
/
change-voice
Change Voice Speed
curl --request POST \
--url https://api.example.com/tts/change-voice \
--header 'Content-Type: application/json' \
--data '
{
"speed": 123,
"api_key": "<string>"
}
'import requests
url = "https://api.example.com/tts/change-voice"
payload = {
"speed": 123,
"api_key": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({speed: 123, api_key: '<string>'})
};
fetch('https://api.example.com/tts/change-voice', 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://api.example.com/tts/change-voice",
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([
'speed' => 123,
'api_key' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/tts/change-voice"
payload := strings.NewReader("{\n \"speed\": 123,\n \"api_key\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.example.com/tts/change-voice")
.header("Content-Type", "application/json")
.body("{\n \"speed\": 123,\n \"api_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/tts/change-voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"speed\": 123,\n \"api_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body
Change the playback speed of an existing audio file without affecting pitch. Useful for creating faster or slower versions of audio content.
Request
file
required
Audio file to modify (MP3, WAV, etc.)
number
default:"1.0"
Playback speed multiplier. Range: 0.25 to 4.0
- 0.25 = 4x slower
- 1.0 = normal speed
- 2.0 = 2x faster
- 4.0 = 4x faster
string
Your GistMag API key (optional, but recommended for rate limiting)
Response
Returns the modified audio file as MP3.Credit Cost
No credits charged - This is a free operation for adjusting playback speed.Example Request
curl -X POST https://api.gistmag.co.uk/tts/change-voice \
-F "audio=@speech.mp3" \
-F "speed=1.5" \
-F "api_key=your_api_key_here" \
--output faster_speech.mp3
const formData = new FormData();
formData.append('audio', audioFile);
formData.append('speed', '1.5');
formData.append('api_key', 'your_api_key_here');
const response = await fetch('https://api.gistmag.co.uk/tts/change-voice', {
method: 'POST',
body: formData
});
const audioBlob = await response.blob();
// Use the audio blob
import requests
with open('speech.mp3', 'rb') as audio_file:
files = {'audio': audio_file}
data = {
'speed': 1.5,
'api_key': 'your_api_key_here'
}
response = requests.post(
'https://api.gistmag.co.uk/tts/change-voice',
files=files,
data=data
)
with open('faster_speech.mp3', 'wb') as f:
f.write(response.content)
Use Cases
- Create faster versions for time-constrained content
- Slow down speech for better comprehension
- Adjust speed for different audience preferences
- Create variations of existing audio content
⌘I