Skip to main content
POST
/
api
/
fsmstexttospeech
Converts text to speech using specified parameters.
curl --request POST \
  --url https://converter.fineshare.com/api/fsmstexttospeech \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "AppId": "107",
  "FeatureId": "22",
  "speech": "<string>",
  "voice": "<string>",
  "Parameter": {
    "Speed": "1.0",
    "LanguageCode": "<string>",
    "Pitch": "0.0"
  }
}
'
import requests

url = "https://converter.fineshare.com/api/fsmstexttospeech"

payload = {
"AppId": "107",
"FeatureId": "22",
"speech": "<string>",
"voice": "<string>",
"Parameter": {
"Speed": "1.0",
"LanguageCode": "<string>",
"Pitch": "0.0"
}
}
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({
AppId: '107',
FeatureId: '22',
speech: '<string>',
voice: '<string>',
Parameter: {Speed: '1.0', LanguageCode: '<string>', Pitch: '0.0'}
})
};

fetch('https://converter.fineshare.com/api/fsmstexttospeech', 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://converter.fineshare.com/api/fsmstexttospeech",
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([
'AppId' => '107',
'FeatureId' => '22',
'speech' => '<string>',
'voice' => '<string>',
'Parameter' => [
'Speed' => '1.0',
'LanguageCode' => '<string>',
'Pitch' => '0.0'
]
]),
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://converter.fineshare.com/api/fsmstexttospeech"

payload := strings.NewReader("{\n \"AppId\": \"107\",\n \"FeatureId\": \"22\",\n \"speech\": \"<string>\",\n \"voice\": \"<string>\",\n \"Parameter\": {\n \"Speed\": \"1.0\",\n \"LanguageCode\": \"<string>\",\n \"Pitch\": \"0.0\"\n }\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://converter.fineshare.com/api/fsmstexttospeech")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"AppId\": \"107\",\n \"FeatureId\": \"22\",\n \"speech\": \"<string>\",\n \"voice\": \"<string>\",\n \"Parameter\": {\n \"Speed\": \"1.0\",\n \"LanguageCode\": \"<string>\",\n \"Pitch\": \"0.0\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://converter.fineshare.com/api/fsmstexttospeech")

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 \"AppId\": \"107\",\n \"FeatureId\": \"22\",\n \"speech\": \"<string>\",\n \"voice\": \"<string>\",\n \"Parameter\": {\n \"Speed\": \"1.0\",\n \"LanguageCode\": \"<string>\",\n \"Pitch\": \"0.0\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "message": "Text-to-speech processing successful."
}
{
"error": "Bad Request"
}

Headers

Authorization
string
required

Bearer token for authentication.

Body

application/json
Engine
enum<string>

The engine to use for text-to-speech.

Available options:
v1,
v5,
v7
AppId
enum<string>

The application identifier.

Available options:
107
FeatureId
enum<string>

The feature identifier.

Available options:
22
speech
string

The input text to convert to speech.

voice
string

The voice configuration.

platform
enum<string>

The platform for which the speech is generated.

Available options:
web,
win,
mac,
phone
Parameter
object

Response

Successfully processed the text-to-speech request.

message
string
Example:

"Text-to-speech processing successful."