Description

Provides a map of what phoneme is said at what time in the synthesized speech.

Example

//@input Asset.TextToSpeechModule ttsModule

var onTTSComplete = function(audioTrackAsset, wordInfos, phonemeInfos) {
for (var i = 0; i < wordInfos.length; i++) {
print("word" + wordInfos[i].word);
print("startTime" + wordInfos[i].startTime.toString());
print("endTime" + wordInfos[i].endTime.toString());
}
for (var j = 0; j < phonemeInfos.length; j++) {
print("phoneme" + phonemeInfos[j].phoneme);
print("startTime" + phonemeInfos[j].startTime.toString());
print("endTime" + phonemeInfos[j].endTime.toString());
}
print(audioTrackAsset);
audioComponent = script.getSceneObject().createComponent('Component.AudioComponent');
audioComponent.audioTrack = audioTrackAsset;
audioComponent.play(1);
}

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

var options = TextToSpeech.TextToSpeechOptions.create();
options.languageCode = "en_US";
options.voiceName = TextToSpeech.VoiceNames.Sasha;
options.voiceStyle = TextToSpeech.VoiceStyles.One;
options.voicePace = 75;

script.ttsModule.synthesize("show me you love dogs, without telling me you love dogs",
options, onTTSComplete, onTTSError)
interface PhonemeInfo {
    endTime: number;
    isAbusive: boolean;
    phoneme: string;
    startTime: number;
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

endTime: number

Description

Phoneme end time in milliseconds.

isAbusive: boolean

Description

Is the phonemes part of an abusive word.

phoneme: string

Description

The phoneme found for the alloted time.

startTime: number

Description

Phoneme start time in milliseconds.

Methods

  • Returns string

    Description

    Returns the name of this object's type.

  • Parameters

    • type: string

    Returns boolean

    Description

    Returns true if the object matches or derives from the passed in type.

  • Parameters

    Returns boolean

    Description

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Generated using TypeDoc