Skip to main content
POST
/
api
/
changeaudiofile
Change Audio File
curl --request POST \
  --url https://voiceai.fineshare.com/api/changeaudiofile \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "uuid": "task_id",
  "voice": "spongebob",
  "pitch": 0,
  "speed": 1,
  "from": "fv-file-changer",
  "outputFormat": ".mp3",
  "audioName": "sample_audio",
  "platform": "web",
  "pitch_control": "semi-tone",
  "operation": "FVC",
  "engine": "v5",
  "auto_f0_adjust": true
}
'
import requests

url = "https://voiceai.fineshare.com/api/changeaudiofile"

payload = {
"uuid": "task_id",
"voice": "spongebob",
"pitch": 0,
"speed": 1,
"from": "fv-file-changer",
"outputFormat": ".mp3",
"audioName": "sample_audio",
"platform": "web",
"pitch_control": "semi-tone",
"operation": "FVC",
"engine": "v5",
"auto_f0_adjust": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
uuid: 'task_id',
voice: 'spongebob',
pitch: 0,
speed: 1,
from: 'fv-file-changer',
outputFormat: '.mp3',
audioName: 'sample_audio',
platform: 'web',
pitch_control: 'semi-tone',
operation: 'FVC',
engine: 'v5',
auto_f0_adjust: true
})
};

fetch('https://voiceai.fineshare.com/api/changeaudiofile', 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://voiceai.fineshare.com/api/changeaudiofile",
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([
'uuid' => 'task_id',
'voice' => 'spongebob',
'pitch' => 0,
'speed' => 1,
'from' => 'fv-file-changer',
'outputFormat' => '.mp3',
'audioName' => 'sample_audio',
'platform' => 'web',
'pitch_control' => 'semi-tone',
'operation' => 'FVC',
'engine' => 'v5',
'auto_f0_adjust' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://voiceai.fineshare.com/api/changeaudiofile"

payload := strings.NewReader("{\n \"uuid\": \"task_id\",\n \"voice\": \"spongebob\",\n \"pitch\": 0,\n \"speed\": 1,\n \"from\": \"fv-file-changer\",\n \"outputFormat\": \".mp3\",\n \"audioName\": \"sample_audio\",\n \"platform\": \"web\",\n \"pitch_control\": \"semi-tone\",\n \"operation\": \"FVC\",\n \"engine\": \"v5\",\n \"auto_f0_adjust\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<authorization>")
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://voiceai.fineshare.com/api/changeaudiofile")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"task_id\",\n \"voice\": \"spongebob\",\n \"pitch\": 0,\n \"speed\": 1,\n \"from\": \"fv-file-changer\",\n \"outputFormat\": \".mp3\",\n \"audioName\": \"sample_audio\",\n \"platform\": \"web\",\n \"pitch_control\": \"semi-tone\",\n \"operation\": \"FVC\",\n \"engine\": \"v5\",\n \"auto_f0_adjust\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://voiceai.fineshare.com/api/changeaudiofile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuid\": \"task_id\",\n \"voice\": \"spongebob\",\n \"pitch\": 0,\n \"speed\": 1,\n \"from\": \"fv-file-changer\",\n \"outputFormat\": \".mp3\",\n \"audioName\": \"sample_audio\",\n \"platform\": \"web\",\n \"pitch_control\": \"semi-tone\",\n \"operation\": \"FVC\",\n \"engine\": \"v5\",\n \"auto_f0_adjust\": true\n}"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "Audio file transformed successfully.",
  "data": {
    "audioUrl": "http://example.com/transformed_audio.mp3",
    "processingTime": 1500
  }
}
{
"error": "Invalid parameters.",
"details": "The 'pitch' parameter must be a positive number."
}
{
"error": "Invalid parameters.",
"details": "The 'pitch' parameter must be a positive number."
}
{
"error": "Invalid parameters.",
"details": "The 'pitch' parameter must be a positive number."
}

Headers

Authorization
string
required

Bearer token for authentication.

Body

application/json
uuid
string

Unique identifier of the audio file.

Example:

"task_id"

voice
string

Voice type for transformation.

Example:

"spongebob"

pitch
number<float>

Pitch adjustment value.

Example:

0

speed
number<float>

Speed adjustment value.

Example:

1

from
enum<string>

Source format or language.

Available options:
fv-file-changer
Example:

"fv-file-changer"

outputFormat
string

Desired output format for the audio file.

Example:

".mp3"

audioName
string

Name of the audio file.

Example:

"sample_audio"

platform
string

Platform information for the transformation.

Example:

"web"

pitch_control
string

Advanced pitch control settings.

Example:

"semi-tone"

operation
enum<string>

Type of operation to perform.

Available options:
FVC
Example:

"FVC"

engine
enum<string>

Engine used for processing.

Available options:
v5,
v7
Example:

"v5"

auto_f0_adjust
boolean

Indicates if automatic F0 adjustment is applied.

Example:

true

Response

Audio file transformed successfully.

status
string
Example:

"success"

message
string
Example:

"Audio file transformed successfully."

data
object