UNPKG

ng-voice-inputs

Version:

This library provides Voice Recognition service to fill the form input fields (text, datepicker, textarea, button-click) for Angular application.

29 lines (28 loc) 1.28 kB
import { ElementRef } from '@angular/core'; import { Subject } from 'rxjs'; import VuiResponse from './vui-response'; export declare class VuiVoiceRecognitionService { response: Subject<VuiResponse>; inputRefs: Array<ElementRef>; currentRef: number; isInputSwitch(speechKeys: any[], inputType: string): boolean; findInstructionType(speechText: string, inputType: string): string; interpretSpeech(speechText: string, inputType: string): string | number | any[]; dateParser(dateStr: string): Date; dateBuilder(datePartObj: any): string; /** * * @param datePart Incomplete date part eg, '21st' is the date part for the date '21st July 2020' * @param datePartObj // Inherited from caller & updated with parsed object. Can be year, month or date */ parseDatePart(datePart: string, datePartObj: any): any; isDateType(datePart: string): boolean; parseDateVal(datePart: any, datePartObj: any): void; isMonthType(datePart: any): boolean; parseMonthVal(datePart: any, datePartObj: any): void; isYearType(datePart: any): boolean; parseYearVal(datePart: any, datePartObj: any): void; wordsToNumber(word: any): number; parseColloquialWords(wordsArr: any): any; eliminateString(word: any): any; }