RecognizeManager

plugins/speech-recognize.RecognizeManager

Class for adding event handling capability

class SomeClass extends Eventify<{ start: (node: Node) => boolean; }> {
  constructor() {
    super();
    setTimeout(() => {
      if (this.emit('start', document.body)) {
        console.log('yes');
      };
    }, 100);
  }
}

const sm = new SomeClass();
sm.on('start', (node) => {
  console.log(node);
  return true;
})

Hierarchy

  • Eventify<{ pulse: (enable: boolean) => void ; result: (text: string) => void ; progress: (text: string) => void ; error: () => void ; sound: (type: number) => void }>

    RecognizeManager

Implements

constructor

new RecognizeManager(async, api): RecognizeManager

Parameters

Name Type
async IAsync
api ISpeechRecognize

Returns

RecognizeManager

Overrides

Eventify.constructor

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#63

sound

sound: boolean = true

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#61

lang

get lang(): CanUndef<string>

Returns

CanUndef<string>

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#39

set lang(v): void

Parameters

Name Type
v CanUndef<string>

Returns

void

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#35


continuous

get continuous(): boolean

Returns

boolean

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#48

set continuous(v): void

Parameters

Name Type
v boolean

Returns

void

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#44


interimResults

get interimResults(): boolean

Returns

boolean

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#57

set interimResults(v): void

Parameters

Name Type
v boolean

Returns

void

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#53


isEnabled

get isEnabled(): boolean

Returns

boolean

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#81

on

on(name, func): this

Parameters

Name Type
name "progress" | "error" | "pulse" | "result" | "sound"
func (enable: boolean) => void | (text: string) => void | (text: string) => void | () => void | (type: number) => void

Returns

this

Inherited from

Eventify.on

Defined in

src/core/event-emitter/eventify.ts#42


off

off(name, func): this

Parameters

Name Type
name "progress" | "error" | "pulse" | "result" | "sound"
func (enable: boolean) => void | (text: string) => void | (text: string) => void | () => void | (type: number) => void

Returns

this

Inherited from

Eventify.off

Defined in

src/core/event-emitter/eventify.ts#52


destruct

destruct(): void

Returns

void

Implementation of

IDestructible.destruct

Overrides

Eventify.destruct

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#74


start

start(): void

Returns

void

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#85


stop

stop(): void

Returns

void

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#112


toggle

toggle(): void

Returns

void

Defined in

src/plugins/speech-recognize/helpers/recognize-manager.ts#131


restart

restart(): void

Returns

void

Defined in

jodit/src/plugins/speech-recognize/helpers/recognize-manager.ts:139