@creativeorange/azure-text-to-speech 3.0.1 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,8 +19,6 @@ export declare class TextToSpeech {
19
19
  player: any;
20
20
  synthesizer: any;
21
21
  previousWordBoundary: any;
22
- interval: any;
23
- wordEncounters: number[];
24
22
  originalHighlightDivInnerHTML: string;
25
23
  currentWord: string;
26
24
  currentOffset: number;
@@ -34,6 +32,8 @@ export declare class TextToSpeech {
34
32
  playbackSegments: any[];
35
33
  private readonly authorizationManager;
36
34
  private stopPromise?;
35
+ private playbackSessionId;
36
+ private highlightInterval?;
37
37
  constructor(options: TextToSpeechOptions);
38
38
  start(): Promise<void>;
39
39
  setVoice(voice: string): this;
@@ -56,11 +56,11 @@ export declare class TextToSpeech {
56
56
  text: any;
57
57
  start: number;
58
58
  end: any;
59
- highlightDiv: any;
60
- originalHighlightDivInnerHTML: any;
59
+ highlightDiv: HTMLElement | undefined;
60
+ originalHighlightDivInnerHTML: string;
61
61
  }[];
62
62
  preparePlaybackChain(chain: any[]): void;
63
- getHighlightDivForNode(node: any): any;
63
+ getHighlightDivForNode(node: any): HTMLElement | undefined;
64
64
  resetPlaybackSegments(): void;
65
65
  updateChainedHighlight(wordBoundary: any): void;
66
66
  getNodeText(node: any, attr?: Attr | null): any;
@@ -68,12 +68,26 @@ export declare class TextToSpeech {
68
68
  clearPrefetchedAudio(): void;
69
69
  prefetchNextNode(node: any): Promise<void>;
70
70
  playPrefetchedNode(node: any): Promise<boolean>;
71
- clearInterval(): Promise<void>;
72
- createInterval(): Promise<void>;
73
- getPosition(string: string, subString: string, textOffset: number): number;
71
+ private createPlaybackSession;
72
+ private isActivePlaybackSession;
73
+ private invalidatePlaybackSession;
74
+ private stopHighlightingInterval;
75
+ private startHighlightingInterval;
76
+ private updateHighlightForCurrentTime;
77
+ private highlightTextRange;
78
+ private getSpokenTextDomOffset;
79
+ private isRangeVisuallyVisible;
80
+ private getClippingRect;
81
+ private isClippingElement;
82
+ private isClippingOverflowValue;
83
+ private rectsOverlap;
84
+ private setHighlightTargetFromNode;
85
+ private shouldHighlight;
86
+ private resetHighlightState;
87
+ private ensurePlaybackTextOffsetBase;
88
+ private resetCurrentHighlight;
74
89
  buildSSML(text: string): string;
75
90
  convertHtmlEntities(input: string): string;
76
- private closeSynthesizer;
77
91
  private closeResource;
78
92
  private dispatchError;
79
93
  }