Type alias WillowClientEvents

WillowClientEvents: {
    onClose: (() => void);
    onError: ((msg) => void);
    onInfer: ((results) => void);
    onLog: ((msg) => void);
    onMessage: ((msg) => void);
    onOpen: (() => void);
}

Type declaration

  • onClose: (() => void)
      • (): void
      • Emitted when the WebRTC connection is closed for any reason.

        Returns void

  • onError: ((msg) => void)
      • (msg): void
      • Emitted whenever the client encounters an error.

        Parameters

        • msg: string

        Returns void

  • onInfer: ((results) => void)
      • (results): void
      • Emitted whenever the client receives a speech to text inference result from the server

        Parameters

        • results: {
              text: string;
              time: number;
          }
          • text: string
          • time: number

        Returns void

  • onLog: ((msg) => void)
      • (msg): void
      • Emitted whenever the client wants to log something. This is verbose.

        Parameters

        • msg: string

        Returns void

  • onMessage: ((msg) => void)
      • (msg): void
      • Emitted whenever the client receives a data channel message from the server

        Parameters

        Returns void

  • onOpen: (() => void)
      • (): void
      • Emitted when the WebRTC connection is first opened.

        Returns void

Generated using TypeDoc