Developer Documentation

asticaVoice TTS API

Voice Synthesis ‐ Public Preview v1.0
asticaVoice - Human Voice TTS API

This asticaVoice API allows you to easily generate realistic text-to-speech (TTS) audio from any given text. W ith AsticaVoice, you can make your applications, chatbots, or virtual assistants sound more natural and human-like, creating a better user experience.

With asticaVoice, you can choose from a variety of different voices, languages, and accents to fit your needs. Using the asticaVoice API is easy, simply pass in the text you want to generate audio for, and the API will return a URL pointing to an audio file that you can use in your application.


Getting Started

asticaVoice is a text-to-speech (TTS) API that allows you to generate realistic audio from any given text. Integrate in seconds and add natural voice to your application.

Ways to Integrate asticaVoice - Text to Speech API
Javascript Text to Speech API

asticaVoice is included within the core astica Javascript API. After including the necessary script, you can begin to use asticaVoice in one line of code using Javascript.

Designed for realtime voice synthesis, asticaVoice is capable of providing interactive text to speech suitable for live user engagement and two-way conversation.

Jump down to Javascript Documentation
Rest API Endpoint

Unlike other astica ai, asticaVoice is currently not available via REST API. We are working to begin making this available for public usage. If you require the the asticaVoice REST API for production use, please contact us to request early access.

Integrating the Javascript Text to Speech API

You can copy and paste the working sample code found below. You can also following along for a step by step integration tutorial.

<script src="https://astica.ai/javascript-sdk/2023-07-09/astica.api.js"></script>
function asticaVoice_example(string) {
    asticaVoice(
        '1.0_full'
        string,
        'en-US', 
        0, 
       your_astica_CallBack
    );               
} 
function your_astica_CallBack(data) {
    if(typeof data.error != 'undefined') { alert(data.error); }         
    console.log(data); //view all data
}
setTimeout(function() { 
     asticaAPI_start('API KEY HERE'); //only needs to be called once.   
     asticaVoice_example('Hi! How are you doing?'); 
}, 1000);

Step #1:
Include the Javascript Library:

Start by including the astica API javascript library with the following script tag.

This should be added before the closing </head> tag of your website.

<script src="https://astica.ai/javascript-sdk/2023-07-09/astica.api.js"></script>

Step #2:
Authenticate with the astica Javascript API:

Next, start the API by calling asticaAPI_start('API KEY HERE');
You only need to call this function once. Make sure to add a valid API key generated from your dashboard.

asticaAPI_start('API KEY HERE');
  • You only need to call this function once.
  • You can generate API keys from the astica dashboard.

  • Step #3:
    Generating Natural Voice with Javascript

    You are now ready to use javascript text to speech with asticaVoice. You can use the simple version to quickly integrate and begin generating natural voice inside of your application..

    asticaVoice('I love to hear myself talk!');

    Optional
    asticaVoice ‐ Selecting a Voice

    To specify a voice ID, add a number after the text to be spoken. The full list of voice ID is found in a list at the bottom of this documentation. Jump down to Voice List

    asticaVoice('My name could be Dennis',4);

    Optional
    asticaVoice ‐ Custom Callback Parameters

    You can use a custom callback to acknowledge the API response from asticaVision by specifying a function after the voice ID. This can be used to determine when the synthesized speech result has started to play, and can be used to track usage data.

    asticaVoice_speak('Hi! How are you doing today?', 5, your_astica_CallBack);   
    function your_astica_CallBack(data) {     
        if(typeof data.error != 'undefined') { alert(data.error); return; }      
        console.log(data);
    }

    In this following example, we generate text to speech using voice id 5 and specify our own callback function that will generate an alert if an error is found.


    Optional
    asticaVoice ‐ Advanced Parameters

    asticaVoice allows you to specify different model versions, and also a language code to use. Jump down to Voice List

    asticaVoice(
        '1.0_full'
        'My favorite color is blue',
        'en-US', 
        0, 
        your_astica_CallBack
    );
    function your_astica_CallBack(data) {     
        if(typeof data.error != 'undefined') { alert(data.error); return; }      
        console.log(data);
    }

    By specifying the correct language code for your input, you can receive more grammatically correct and fluent vocabulary and announciation.


    Voice ID List - Customize Your Text to Speech Voice

    asticaVoice offers many different voices to help you customize your application and create engaging experiences. You can choose from different speakers, genders, and dialects used to match your brand. Voices are sorted by region/dialect and are identified using a voice id.

    USA (us-EN)
    Voice ID Voice Name
    0 Default Voice (US Female)
    1 Jenny (US Female)
    2 Nancy (US Female)
    3 Jane (US Female)
    4 *Davis (US Male)
    5 Jerry (US Male)
    6 Christopher (US Male)
    7 Brandon (US Male)
    8 Roger (US Male)
    9 Steffan (US Male)

    Children Voices
    Voice ID Voice Name
    501 Ana (US Female) (Child)
    502 Maisie (UK Female) (Child)
    503 Carly (AU Female) (Child)

    Austrailian Voices (au-EN)
    Voice ID Voice Name
    10 Darren (AU Male)
    11 Ken (AU Male)
    12 Neil (AU Male)
    13 Tim (AU Male)
    14 Elsie (AU Female)
    15 Kim (AU Female)
    16 Natasha (AU Female)
    17 Tina (AU Female)

    Great Britain / England Voices (en-GB)
    Voice ID Voice Name
    18 Olivia (UK Female)
    19 Sonia (UK Female)
    20 Bella (UK Female)
    21 Abbi (UK Female)
    22 Alfie (UK Male)
    23 Elliot (UK Male)
    24 Ethan (UK Male)
    25 Oliver (UK Male)
    26 Ryan (UK Male)
    27 Thomas (UK Male)

    French Voices (fr-FR)
    Voice ID Voice Name
    2000 Alaine (Male) (French)
    2001 Henri (Male) (French)
    2002 Denise (Female) (French)
    2003 Coralie (Female) (French)

    French Canadian Voices(fr-CA)
    Voice ID Voice Name
    3000 Jean (Male) (French Canadian)
    3001 Antoine (Male) (French Canadian)
    3002 Sylvie (Female) (French Canadian)

    Indian Voices (en-IN)
    Voice ID Voice Name
    4000 Prabhat (Indian Male) (English)
    4001 Neerja (Indian Female) (English)

    Nigerian Voices (en-NG)
    Voice ID Voice Name
    5000 Abeo (Nigerian Male) (English)
    5001 Ezinne (Nigerian Female) (English)