@viviedu/applet-sdk
    Preparing search index...

    Class ClientTts<Msg>

    The tts namespace on a ClientApplet.

    Sends requests to the Vivi client, which has the TTS engines. Obtained via clientApplet.tts.

    Type Parameters

    • Msg
    Index

    Methods

    • Stop a request started by speak, or every request when no requestId is given. Does nothing if the request has already finished.

      Parameters

      • OptionalrequestId: string

      Returns Promise<void>

    • What the client's TTS engine can do.

      Returns Promise<
          UndefinedToOptional<
              {
                  locales: string[];
                  returnsAudio: boolean;
                  supportsOffline: boolean;
                  supportsStreaming: boolean;
              },
          >,
      >

    • Speak request.text on the client's device. Resolves once the speech finishes.

      Parameters

      • request: UndefinedToOptional

      Returns Promise<void>

    • The voices the client can speak with.

      Returns Promise<
          UndefinedToOptional<
              { id: string; local: boolean; locale: string; name: string },
          >[],
      >