text-to-speech

TextToSpeech

textToSpeech


/

Usage and SDK Samples

curl -X GET "https://api.apieco.ir/text-to-speech/?r=&c=&f=&src=&hl=&key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TextToSpeechApi;

import java.io.File;
import java.util.*;

public class TextToSpeechApiExample {

    public static void main(String[] args) {
        
        TextToSpeechApi apiInstance = new TextToSpeechApi();
        String apiecoKey = apiecoKey_example; // String | 
        String src = src_example; // String | The textual content for converting to speech
        String hl = hl_example; // String | The textual content language
        String key = key_example; // String | The API key
        String r = r_example; // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
        String c = c_example; // String | The speech audio codec
        String f = f_example; // String | The speech audio formats
        try {
            'String' result = apiInstance.textToSpeech(apiecoKey, src, hl, key, r, c, f);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TextToSpeechApi#textToSpeech");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TextToSpeechApi;

public class TextToSpeechApiExample {

    public static void main(String[] args) {
        TextToSpeechApi apiInstance = new TextToSpeechApi();
        String apiecoKey = apiecoKey_example; // String | 
        String src = src_example; // String | The textual content for converting to speech
        String hl = hl_example; // String | The textual content language
        String key = key_example; // String | The API key
        String r = r_example; // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
        String c = c_example; // String | The speech audio codec
        String f = f_example; // String | The speech audio formats
        try {
            'String' result = apiInstance.textToSpeech(apiecoKey, src, hl, key, r, c, f);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TextToSpeechApi#textToSpeech");
            e.printStackTrace();
        }
    }
}
String *apiecoKey = apiecoKey_example; // 
String *src = src_example; // The textual content for converting to speech
String *hl = hl_example; // The textual content language
String *key = key_example; // The API key
String *r = r_example; // The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed) (optional)
String *c = c_example; // The speech audio codec (optional)
String *f = f_example; // The speech audio formats (optional)

TextToSpeechApi *apiInstance = [[TextToSpeechApi alloc] init];

[apiInstance textToSpeechWith:apiecoKey
    src:src
    hl:hl
    key:key
    r:r
    c:c
    f:f
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TextToSpeech = require('text_to_speech');

var api = new TextToSpeech.TextToSpeechApi()

var apiecoKey = apiecoKey_example; // {String} 

var src = src_example; // {String} The textual content for converting to speech

var hl = hl_example; // {String} The textual content language

var key = key_example; // {String} The API key

var opts = { 
  'r': r_example, // {String} The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
  'c': c_example, // {String} The speech audio codec
  'f': f_example // {String} The speech audio formats
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.textToSpeech(apiecoKey, src, hl, key, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class textToSpeechExample
    {
        public void main()
        {
            
            var apiInstance = new TextToSpeechApi();
            var apiecoKey = apiecoKey_example;  // String | 
            var src = src_example;  // String | The textual content for converting to speech
            var hl = hl_example;  // String | The textual content language
            var key = key_example;  // String | The API key
            var r = r_example;  // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed) (optional) 
            var c = c_example;  // String | The speech audio codec (optional) 
            var f = f_example;  // String | The speech audio formats (optional) 

            try
            {
                'String' result = apiInstance.textToSpeech(apiecoKey, src, hl, key, r, c, f);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TextToSpeechApi.textToSpeech: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TextToSpeechApi();
$apiecoKey = apiecoKey_example; // String | 
$src = src_example; // String | The textual content for converting to speech
$hl = hl_example; // String | The textual content language
$key = key_example; // String | The API key
$r = r_example; // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
$c = c_example; // String | The speech audio codec
$f = f_example; // String | The speech audio formats

try {
    $result = $api_instance->textToSpeech($apiecoKey, $src, $hl, $key, $r, $c, $f);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextToSpeechApi->textToSpeech: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TextToSpeechApi;

my $api_instance = WWW::SwaggerClient::TextToSpeechApi->new();
my $apiecoKey = apiecoKey_example; # String | 
my $src = src_example; # String | The textual content for converting to speech
my $hl = hl_example; # String | The textual content language
my $key = key_example; # String | The API key
my $r = r_example; # String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
my $c = c_example; # String | The speech audio codec
my $f = f_example; # String | The speech audio formats

eval { 
    my $result = $api_instance->textToSpeech(apiecoKey => $apiecoKey, src => $src, hl => $hl, key => $key, r => $r, c => $c, f => $f);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TextToSpeechApi->textToSpeech: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TextToSpeechApi()
apiecoKey = apiecoKey_example # String | 
src = src_example # String | The textual content for converting to speech
hl = hl_example # String | The textual content language
key = key_example # String | The API key
r = r_example # String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed) (optional)
c = c_example # String | The speech audio codec (optional)
f = f_example # String | The speech audio formats (optional)

try: 
    api_response = api_instance.text_to_speech(apiecoKey, src, hl, key, r=r, c=c, f=f)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TextToSpeechApi->textToSpeech: %s\n" % e)

Parameters

Header parameters
Name Description
apieco-key*
String
Required
Query parameters
Name Description
r
String
The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
c
String
The speech audio codec
f
String
The speech audio formats
src*
String
The textual content for converting to speech
Required
hl*
String
The textual content language
Required
key*
String
The API key
Required

Responses

Status: 200 - audio

Status: 401 - wrong code

Status: 405 - Invalid input


textToSpeechPost


/

Usage and SDK Samples

curl -X POST "https://api.apieco.ir/text-to-speech/?r=&c=&f=&src=&hl=&key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TextToSpeechApi;

import java.io.File;
import java.util.*;

public class TextToSpeechApiExample {

    public static void main(String[] args) {
        
        TextToSpeechApi apiInstance = new TextToSpeechApi();
        String src = src_example; // String | The textual content for converting to speech
        String hl = hl_example; // String | The textual content language
        String key = key_example; // String | The API key
        String r = r_example; // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
        String c = c_example; // String | The speech audio codec
        String f = f_example; // String | The speech audio formats
        try {
            'String' result = apiInstance.textToSpeechPost(src, hl, key, r, c, f);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TextToSpeechApi#textToSpeechPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TextToSpeechApi;

public class TextToSpeechApiExample {

    public static void main(String[] args) {
        TextToSpeechApi apiInstance = new TextToSpeechApi();
        String src = src_example; // String | The textual content for converting to speech
        String hl = hl_example; // String | The textual content language
        String key = key_example; // String | The API key
        String r = r_example; // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
        String c = c_example; // String | The speech audio codec
        String f = f_example; // String | The speech audio formats
        try {
            'String' result = apiInstance.textToSpeechPost(src, hl, key, r, c, f);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TextToSpeechApi#textToSpeechPost");
            e.printStackTrace();
        }
    }
}
String *src = src_example; // The textual content for converting to speech
String *hl = hl_example; // The textual content language
String *key = key_example; // The API key
String *r = r_example; // The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed) (optional)
String *c = c_example; // The speech audio codec (optional)
String *f = f_example; // The speech audio formats (optional)

TextToSpeechApi *apiInstance = [[TextToSpeechApi alloc] init];

[apiInstance textToSpeechPostWith:src
    hl:hl
    key:key
    r:r
    c:c
    f:f
              completionHandler: ^('String' output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var TextToSpeech = require('text_to_speech');

var api = new TextToSpeech.TextToSpeechApi()

var src = src_example; // {String} The textual content for converting to speech

var hl = hl_example; // {String} The textual content language

var key = key_example; // {String} The API key

var opts = { 
  'r': r_example, // {String} The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
  'c': c_example, // {String} The speech audio codec
  'f': f_example // {String} The speech audio formats
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.textToSpeechPost(src, hl, key, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class textToSpeechPostExample
    {
        public void main()
        {
            
            var apiInstance = new TextToSpeechApi();
            var src = src_example;  // String | The textual content for converting to speech
            var hl = hl_example;  // String | The textual content language
            var key = key_example;  // String | The API key
            var r = r_example;  // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed) (optional) 
            var c = c_example;  // String | The speech audio codec (optional) 
            var f = f_example;  // String | The speech audio formats (optional) 

            try
            {
                'String' result = apiInstance.textToSpeechPost(src, hl, key, r, c, f);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TextToSpeechApi.textToSpeechPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TextToSpeechApi();
$src = src_example; // String | The textual content for converting to speech
$hl = hl_example; // String | The textual content language
$key = key_example; // String | The API key
$r = r_example; // String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
$c = c_example; // String | The speech audio codec
$f = f_example; // String | The speech audio formats

try {
    $result = $api_instance->textToSpeechPost($src, $hl, $key, $r, $c, $f);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TextToSpeechApi->textToSpeechPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TextToSpeechApi;

my $api_instance = WWW::SwaggerClient::TextToSpeechApi->new();
my $src = src_example; # String | The textual content for converting to speech
my $hl = hl_example; # String | The textual content language
my $key = key_example; # String | The API key
my $r = r_example; # String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
my $c = c_example; # String | The speech audio codec
my $f = f_example; # String | The speech audio formats

eval { 
    my $result = $api_instance->textToSpeechPost(src => $src, hl => $hl, key => $key, r => $r, c => $c, f => $f);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TextToSpeechApi->textToSpeechPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TextToSpeechApi()
src = src_example # String | The textual content for converting to speech
hl = hl_example # String | The textual content language
key = key_example # String | The API key
r = r_example # String | The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed) (optional)
c = c_example # String | The speech audio codec (optional)
f = f_example # String | The speech audio formats (optional)

try: 
    api_response = api_instance.text_to_speech_post(src, hl, key, r=r, c=c, f=f)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TextToSpeechApi->textToSpeechPost: %s\n" % e)

Parameters

Query parameters
Name Description
r
String
The speech rate (speed). Allows values: from -10 (slowest speed) up to 10 (fastest speed). Default value: 0 (normal speed)
c
String
The speech audio codec
f
String
The speech audio formats
src*
String
The textual content for converting to speech
Required
hl*
String
The textual content language
Required
key*
String
The API key
Required

Responses

Status: 200 - audio

Status: 401 - wrong code

Status: 405 - Invalid input