/** * Live Transcription service * @module LiveTranscription */ import { Service } from '../../services/service'; import { Subscription } from 'rxjs'; import { Bubble, LiveTranscription, RBEvent } from '../../models'; /** @internal */ export declare const LIVE_TRANSCRIPTION_SVC = "LiveTranscriptionService"; /** * TranscriptionService events list * @eventProperty */ export declare enum LiveTranscriptionServiceEvents { /** * @eventProperty * This RBEvent is send when a liveTranscription + Data Channel is available (but not yet active) */ ON_LIVE_TRANSCRIPTION_CHANNEL_AVAILABLE = "ON_LIVE_TRANSCRIPTION_CHANNEL_AVAILABLE", /** * @eventProperty * This RBEvent is send when a liveTranscription is available */ ON_LIVE_TRANSCRIPTION_AVAILABLE = "ON_LIVE_TRANSCRIPTION_AVAILABLE", /** * @eventProperty * This RBEvent is send when a liveTranscription is stopped */ ON_LIVE_TRANSCRIPTION_STOPPED = "ON_LIVE_TRANSCRIPTION_STOPPED" } export interface LiveTranscriptionService { /** * Subscribe to transcription service events * @param handler - The handler function that will be called on events * @param eventNames - The events to subscribe to */ subscribe(handler: (event: RBEvent) => any, eventNames?: LiveTranscriptionServiceEvents | LiveTranscriptionServiceEvents[]): Subscription; /** * Returns existing live transcription for a conversation * @param source - the sourse */ getLiveTranscriptions(source: Bubble): LiveTranscription[]; /** * This methods start speechToText transcription portal * @param source - the conversation bubble * @param language - the output language to be translated */ startTranscription(source: Bubble, language?: string): Promise; /** * This methods stop speechToText transcription portal * @param source - the conversation bubble */ stopTranscription(source: Bubble): Promise; /** * This methods send a message on transcription datachannel (DEBUG) * @param source - the conversation bubble * @param message - the message to send via transcription message * @internal */ sendTranscriptionMessage(source: Bubble, message: string): Promise; } /** * @internal */ export declare class LiveTranscriptionServiceRB extends Service implements LiveTranscriptionService { private logger; private dataChannelService; private authService; private settingsService; private errorHelperService; private xmppService; private bubbleConferenceService; private subscriptions; private eventsSubject; private transcriptions; private conferenceEventListener; private promiseQueue; static getInstance(): LiveTranscriptionServiceRB; static build(): LiveTranscriptionServiceRB; private constructor(); start(): Promise; stop(): Promise; reconnect(): Promise; private attachEventListeners; subscribe(handler: (event: RBEvent) => any, eventNames?: LiveTranscriptionServiceEvents | LiveTranscriptionServiceEvents[]): Subscription; sendEvent(name: LiveTranscriptionServiceEvents, data?: any): void; startTranscription(source: Bubble, language?: string): Promise; stopTranscription(source: Bubble): Promise; sendTranscriptionMessage(source: Bubble, message: string): Promise; getLiveTranscriptions(source: Bubble): LiveTranscription[]; private onConferenceInfo; } //# sourceMappingURL=liveTranscription.service.d.ts.map