2.0.0 • Published 3 years ago
@cisl/io-speaker v2.0.0
@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
2.0.0
3 years ago
1.4.5
3 years ago
1.4.3
3 years ago
1.4.0
4 years ago
1.0.0
5 years ago
1.0.0-dev.4
5 years ago
1.0.0-dev.3
5 years ago
1.0.0-dev.2
5 years ago
1.0.0-dev.1
5 years ago