UNPKG

@huluvu424242/honey-speaker

Version:

Text to Speech component wich is reading texts from DOM elements.

152 lines (151 loc) 3.64 kB
import { EventEmitter } from "../../stencil-public-runtime"; import { Sprachausgabe } from "../../libs/sprachausgabe"; import { SpeakerOptions } from "./speaker-options"; export declare class HoneySpeaker { /** * Modul zur Sprachausgabe */ sprachAusgabe: Sprachausgabe; /** * initiale class from host tag */ initialHostClass: string; options: SpeakerOptions; /** * Host Element */ hostElement: HTMLElement; /** * Id des Host Elements, falls nicht verfügbar wird diese generiert */ ident: string; /** * true wenn das Tag ohne alt Attribute deklariert wurde */ createAltText: boolean; /** * true wenn das Tag ohne title Attribut deklariert wurde */ createTitleText: boolean; /** * initial computed taborder */ taborder: string; /** * texte to speech out */ texts: string[]; /** * if the toggle button is pressed */ isPressed: boolean; /** * use pure speaker symbol for silence state */ pure: boolean; /** * An comma separated list with ids of DOM elements * which inner text should be speech. */ textids: string; /** * An url to download an text file to speech. */ texturl: string; /** * enable console logging */ verbose: boolean; /** * icon width */ iconwidth: string; /** * icon height */ iconheight: string; /** * i18n language ident for Web Speech API: de-DE or en or de ... */ audiolang: string; /** * pitch for Web Speech API */ audiopitch: number; /** * rate for Web Speech API */ audiorate: number; /** * volume for Web Speech API */ audiovolume: number; /** * voice name used of Web Speech API */ voicename: string; /** * Fired if the voice is speaking. */ honeySpeakerStarted: EventEmitter<string>; /** * Fired if the voice has finished with speaking. */ honeySpeakerFinished: EventEmitter<string>; /** * Fired if the voice is paused with speaking. */ honeySpeakerPaused: EventEmitter<string>; /** * Fired if the voice is resumed after paused with speaking. */ honeySpeakerResume: EventEmitter<string>; /** * Fired if the voice has failed to speak. */ honeySpeakerFailed: EventEmitter<string>; connectedCallback(): void; componentWillLoad(): Promise<void>; /** * Update speaker options * @param options : SpeakerOptions plain object to set the options */ updateOptions(options: SpeakerOptions): Promise<void>; /** * bricht laufende oder pausierende Ausgaben ab und startet dia Ausgabe von vorn */ startSpeaker(): Promise<void>; /** * paused the speaker */ pauseSpeaker(): Promise<void>; /** * continue speaker after paused */ resumeSpeaker(): Promise<void>; /** * cancel the speaker */ cancelSpeaker(): Promise<void>; /** * call the toggle speaker action */ toggleSpeaker(): Promise<void>; protected hasNoTexts(): boolean; protected createNewTitleText(): string; protected getTitleText(): string; protected createNewAltText(): string; protected getAltText(): string; protected loadDOMElementTexte(): void; protected loadAudioUrlText(): Promise<void>; protected updateTexte(): Promise<void>; textidsChanged(newValue: string, oldValue: string): void; texturlChanged(newValue: string, oldValue: string): Promise<void>; protected getTexte(): string[]; protected textVorlesen(text: string): void; protected toggleAction(): Promise<void>; protected onClick(): Promise<void>; protected onKeyDown(ev: KeyboardEvent): Promise<void>; protected getHostClass(): string; render(): any; }