@readium/speech 0.18.0 → 0.19.0
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.
- package/build/Fallback/fallbackSpeechEngine.d.ts +2 -1
- package/build/SpeechServer/speechServerEngine.d.ts +0 -2
- package/build/WebSpeech/webSpeechEngine.d.ts +5 -7
- package/build/engine.d.ts +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +1670 -1576
- package/build/preferences/SpeechSettings.d.ts +1 -5
- package/build/speechNavigator.d.ts +31 -1
- package/build/voices/defaultVoice.d.ts +13 -0
- package/build/voices/languageCode.d.ts +9 -0
- package/build/voices/languages.d.ts +2 -9
- package/build/voices/voiceForLanguage.d.ts +6 -0
- package/package.json +3 -3
- package/build/voices/languageMatching.d.ts +0 -3
|
@@ -34,7 +34,7 @@ export declare class FallbackSpeechEngine implements ReadiumSpeechPlaybackEngine
|
|
|
34
34
|
loadUtterances(contents: ReadiumSpeechUtterance[], startIndex?: number): void;
|
|
35
35
|
setVoice(voice: ReadiumSpeechVoice | string): void;
|
|
36
36
|
getCurrentVoice(): ReadiumSpeechVoice | null;
|
|
37
|
-
getAvailableVoices(): Promise<ReadiumSpeechVoice[]>;
|
|
37
|
+
getAvailableVoices(languages?: string[], voiceIds?: string[]): Promise<ReadiumSpeechVoice[]>;
|
|
38
38
|
speak(utteranceIndex?: number): void;
|
|
39
39
|
pause(): void;
|
|
40
40
|
resume(): void;
|
|
@@ -61,6 +61,7 @@ export declare class FallbackSpeechEngine implements ReadiumSpeechPlaybackEngine
|
|
|
61
61
|
private swapToFallback;
|
|
62
62
|
private recoverToPrimary;
|
|
63
63
|
private performSwap;
|
|
64
|
+
private reachableVoices;
|
|
64
65
|
private pickBestFallbackVoice;
|
|
65
66
|
destroy(): Promise<void>;
|
|
66
67
|
}
|
|
@@ -25,7 +25,6 @@ export declare class SpeechServerEngine implements ReadiumSpeechPlaybackEngine {
|
|
|
25
25
|
private voices;
|
|
26
26
|
private voicesRequest;
|
|
27
27
|
private initializing;
|
|
28
|
-
private languageVoiceCache;
|
|
29
28
|
private serviceInfo;
|
|
30
29
|
private serviceInfoPromise;
|
|
31
30
|
private currentUtterances;
|
|
@@ -62,7 +61,6 @@ export declare class SpeechServerEngine implements ReadiumSpeechPlaybackEngine {
|
|
|
62
61
|
private bufferUntilReady;
|
|
63
62
|
private indexCoveringChars;
|
|
64
63
|
private voiceFor;
|
|
65
|
-
private pickLanguageVoice;
|
|
66
64
|
setVoice(voice: ReadiumSpeechVoice | string): void;
|
|
67
65
|
getCurrentVoice(): ReadiumSpeechVoice | null;
|
|
68
66
|
getAvailableVoices(): Promise<ReadiumSpeechVoice[]>;
|
|
@@ -13,9 +13,8 @@ export declare class WebSpeechEngine implements ReadiumSpeechPlaybackEngine {
|
|
|
13
13
|
private readonly events;
|
|
14
14
|
private voiceManager;
|
|
15
15
|
private defaultVoice;
|
|
16
|
-
private
|
|
16
|
+
private initializing;
|
|
17
17
|
private loadedOwnVoiceLanguages;
|
|
18
|
-
private warmingLanguages;
|
|
19
18
|
private speakGeneration;
|
|
20
19
|
private resumeInfinityTimer?;
|
|
21
20
|
private isSpeakingInternal;
|
|
@@ -42,20 +41,19 @@ export declare class WebSpeechEngine implements ReadiumSpeechPlaybackEngine {
|
|
|
42
41
|
interval?: number;
|
|
43
42
|
maxLengthExceeded?: "error" | "none" | "warn";
|
|
44
43
|
}): Promise<boolean>;
|
|
44
|
+
private load;
|
|
45
45
|
private validateText;
|
|
46
|
-
private
|
|
47
|
-
private languageCacheKey;
|
|
46
|
+
private findVoice;
|
|
48
47
|
private ownVoice;
|
|
48
|
+
private browserVoiceLanguage;
|
|
49
49
|
private unloadedOwnVoiceLanguage;
|
|
50
|
-
private voiceForUtteranceSync;
|
|
51
50
|
private voiceForUtterance;
|
|
52
|
-
private warmLanguageVoiceCache;
|
|
53
51
|
getCurrentVoice(): ReadiumSpeechVoice | null;
|
|
54
52
|
private toPlainText;
|
|
55
53
|
loadUtterances(contents: ReadiumSpeechUtterance[], startIndex?: number): void;
|
|
56
54
|
setVoice(voice: ReadiumSpeechVoice | string): Promise<void>;
|
|
57
55
|
private get voices();
|
|
58
|
-
getAvailableVoices(): Promise<ReadiumSpeechVoice[]>;
|
|
56
|
+
getAvailableVoices(languages?: string[], voiceIds?: string[]): Promise<ReadiumSpeechVoice[]>;
|
|
59
57
|
speak(utteranceIndex?: number): void;
|
|
60
58
|
private cancelCurrentSpeech;
|
|
61
59
|
private speakNextTask;
|
package/build/engine.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface ReadiumSpeechPlaybackEngine {
|
|
|
6
6
|
loadUtterances(contents: ReadiumSpeechUtterance[], startIndex?: number): void;
|
|
7
7
|
setVoice(voice: ReadiumSpeechVoice | string): void;
|
|
8
8
|
getCurrentVoice(): ReadiumSpeechVoice | null;
|
|
9
|
-
getAvailableVoices(): Promise<ReadiumSpeechVoice[]>;
|
|
9
|
+
getAvailableVoices(languages?: string[], voiceIds?: string[]): Promise<ReadiumSpeechVoice[]>;
|
|
10
10
|
speak(utteranceIndex?: number): void;
|
|
11
11
|
pause(): void;
|
|
12
12
|
resume(): void;
|
package/build/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { extractLangRegionFromBCP47, valueForLanguage } from './utils/language.j
|
|
|
9
9
|
export * from './voices/types.js';
|
|
10
10
|
export * from './voices/filters.js';
|
|
11
11
|
export * from './voices/sorting.js';
|
|
12
|
+
export * from './voices/defaultVoice.js';
|
|
12
13
|
export * from './voices/voiceId.js';
|
|
13
14
|
export * from './engine.js';
|
|
14
15
|
export * from './navigator.js';
|