Lens Scripting API

    The voice style on which the TextToSpeech will be synthesized, Varying from neutral style, to a more elaborated styles depending on the voice. Note that Sam’s voice still doesn’t have more than the neutral style, this will be added throughout the coming releases.

    //@input Asset.TextToSpeechModule ttsModule

    var onTTSComplete = function(audioTrackAsset, eventArgs) {
    print("Synthesis complete!");
    }

    var onTTSError = function(error, description) {
    print("Synthesis error!");
    }

    // Change to the voice name you want to use.
    var options = TextToSpeech.Options.create();
    options.voiceName = TextToSpeech.VoiceNames.Sam;

    script.ttsModule.synthesize("Text to speech example", options, onTTSComplete, onTTSError);
    Index

    Constructors

    Constructors

    MMNEPVFCICPMFPCPTTAAATR