@cisl/io-speaker
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@cisl/io-speaker

Plugin for @cisl/io for interfacing with the speaker-worker

Installation

npm install @cisl/io-speaker

Usage

const io = require('@cisl/io')();
require('@cisl/io-speaker');

io.speaker.speak('test');
import cislio from '@cisl/io';
import '@cisl/io-speaker';

const io = cislio();
io.speaker.speak('test');

API

speak

  • speak(text: string, options: {duration?: number, voice?: string} = {}): Promise<RabbitMessage>
  • clearCache(): void
  • changeVolume(change: number): void
  • increaseVolume(change: number = 20): void
  • reduceVolume(change: number = 20): void
  • stop(): Promise<RabbitMessage>
  • beginSpeak(msg: Record<string, unknown>): void
  • endSpeak(msg: Record<string, unknown>): void
  • onBeginSpeak(handler: SpeakSubscriptionCallback): void
  • onEndSpeak(handler: SpeakSubscriptionCallback): void

Readme

Keywords

none

Package Sidebar

Install

npm i @cisl/io-speaker

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

9.95 kB

Total Files

5

Last publish

Collaborators

  • masterodin
  • masterodinbot