AnythingSpeech

This module allows developers to access the Anything World TTS (Text-to-speech) engine.

AnythingSpeech Class Reference

Public Member Functions

delegate void AWSpeechHandler (string testResponse)

delegate void AWSpeechDoneHandler (string testResponse)

void StartListening (AWSpeechHandler responseCallback, AWSpeechDoneHandler doneCallback)

void StartListening (AWSpeechDoneHandler doneCallback)

void StopListening ()

void Speak (string thingToSay, string voiceName="none")

void ListenForInterval (float time, AWSpeechDoneHandler doneCallBack)

void ListenForInterval (float time, AWSpeechHandler responseCallBack, AWSpeechDoneHandler doneCallBack)

Member Functions

AWSpeechDoneHandler()

delegate void AnythingWorld.Speech.AnythingSpeech.AWSpeechDoneHandler (string testResponse)

AWSpeechHandler()

delegate void AnythingWorld.Speech.AnythingSpeech.AWSpeechHandler (string testResponse)

ListenForInterval()

void AnythingWorld.Speech.AnythingSpeech.ListenForInterval (float time, AWSpeechDoneHandler doneCallBack)

Listen for a specified amount of time and receive a string to a callback.

ListenForInterval()

void AnythingWorld.Speech.AnythingSpeech.ListenForInterval (float time, AWSpeechHandler responseCallBack, AWSpeechDoneHandler doneCallBack)

Speak()

void AnythingWorld.Speech.AnythingSpeech.Speak (string thingToSay, string voiceName = "none")

Use speech synthesis to say input string.

StartListening()

void AnythingWorld.Speech.AnythingSpeech.StartListening (AWSpeechDoneHandler doneCallback)

StartListening()

void AnythingWorld.Speech.AnythingSpeech.StartListening (AWSpeechHandler responseCallback, AWSpeechDoneHandler doneCallback)

Activates voice input and starts listening to the user.

StopListening()

void AnythingWorld.Speech.AnythingSpeech.StopListening()

Deactivate voice input and stop listening.

Property

Instance

AnythingSpeech AnythingWorld.Speech.AnythingSpeech.Instance

Parameters

ParametersDefinition

time

Time in seconds to listen.

responseCallBack

Callback handling any detected changes to the input string during listening.

doneCallBack

Callback handling the final detected string once listening completed

thingToSay

String to vocalise

voiceName

Name of voice

Example

using AnythingWorld.Speech;

public class SpeechController: MonoBehaviour
{  
    void Start()
    {
        AnythingSpeech speech = AnythingSpeech.Instance;
        speech.Speak("Hello Anything World");
    }
}

Last updated