Interface nsISpeechServiceType

The main interface of a speech synthesis service.

A service is responsible for outputting audio. The service dispatches events, starting with dispatchStart() and ending with dispatchEnd or dispatchError(). A service must also respond with the currect actions and events in response to implemented callback methods.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Speak the given text using the voice identified byu the given uri. See W3C Speech API spec for information about pitch and rate. https://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#utterance-attributes

    Parameters

    • aText: string

      text to utter.

    • aUri: string

      unique voice identifier.

    • aVolume: number

      volume to speak voice in. Only relevant for indirect audio.

    • aRate: number

      rate to speak voice in.

    • aPitch: number

      pitch to speak voice in.

    • aTask: nsISpeechTask

      task instance for utterance, used for sending events or audio data back to browser.

    Returns void

Generated using TypeDoc