@readium/speech 0.17.0 → 0.18.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.
@@ -10,6 +10,7 @@ export interface ISpeechDefaults {
10
10
  language?: LanguageMode | null;
11
11
  languageOverrides?: Record<string, string> | null;
12
12
  segmentation?: Segmentation | null;
13
+ reconstruct?: boolean | null;
13
14
  voice?: VoicePreference | null;
14
15
  pauseDuration?: number | null;
15
16
  autoPause?: AutoPauseScope | null;
@@ -26,6 +27,7 @@ export declare class SpeechDefaults {
26
27
  readonly language: LanguageMode;
27
28
  readonly languageOverrides: Record<string, string>;
28
29
  readonly segmentation: Segmentation;
30
+ readonly reconstruct: boolean;
29
31
  readonly voice: VoicePreference | null;
30
32
  readonly pauseDuration: number;
31
33
  readonly autoPause: AutoPauseScope;
@@ -13,6 +13,7 @@ export interface ISpeechPreferences {
13
13
  language?: LanguageMode | null;
14
14
  languageOverrides?: Record<string, string> | null;
15
15
  segmentation?: Segmentation | null;
16
+ reconstruct?: boolean | null;
16
17
  voice?: VoicePreference | null;
17
18
  pauseDuration?: number | null;
18
19
  autoPause?: AutoPauseScope | null;
@@ -29,6 +30,7 @@ export declare class SpeechPreferences implements ISpeechPreferences, Configurab
29
30
  language: LanguageMode | null | undefined;
30
31
  languageOverrides: Record<string, string> | null | undefined;
31
32
  segmentation: Segmentation | null | undefined;
33
+ reconstruct: boolean | null | undefined;
32
34
  voice: VoicePreference | null | undefined;
33
35
  pauseDuration: number | null | undefined;
34
36
  autoPause: AutoPauseScope | null | undefined;
@@ -1,6 +1,6 @@
1
1
  import { GndRole } from '@readium/guided-navigation';
2
2
  import { IPreferencesEditor } from './PreferencesEditor.js';
3
- import { EnumPreference, Preference, RangePreference, StringArrayPreference } from './Preference.js';
3
+ import { BooleanPreference, EnumPreference, Preference, RangePreference, StringArrayPreference } from './Preference.js';
4
4
  import { SpeechPreferences, VerbosityPreset, AutoPauseScope, VoicePreference } from './SpeechPreferences.js';
5
5
  import { SpeechSettings } from './SpeechSettings.js';
6
6
  import { ExtractionFormat, Interruption, LanguageMode, Segmentation } from '../utterances/types.js';
@@ -18,6 +18,7 @@ export declare class SpeechPreferencesEditor implements IPreferencesEditor {
18
18
  get language(): EnumPreference<LanguageMode>;
19
19
  get languageOverrides(): Preference<Record<string, string>>;
20
20
  get segmentation(): EnumPreference<Segmentation>;
21
+ get reconstruct(): BooleanPreference;
21
22
  get voice(): Preference<VoicePreference>;
22
23
  get pauseDuration(): RangePreference<number>;
23
24
  get autoPause(): EnumPreference<AutoPauseScope>;
@@ -14,6 +14,7 @@ export declare class SpeechSettings implements ConfigurableSettings {
14
14
  readonly language: LanguageMode;
15
15
  readonly languageOverrides: Record<string, string>;
16
16
  readonly segmentation: Segmentation;
17
+ readonly reconstruct: boolean;
17
18
  readonly voice: VoicePreference | null;
18
19
  readonly pauseDuration: number;
19
20
  readonly autoPause: AutoPauseScope;
@@ -81,6 +81,7 @@ export declare class ReadiumSpeechNavigator implements ReadiumSpeechNavigatorCon
81
81
  get preferencesEditor(): SpeechPreferencesEditor;
82
82
  submitPreferences(preferences: SpeechPreferences): Promise<void>;
83
83
  private applyPreferences;
84
+ private extractionValue;
84
85
  private sameSettingValue;
85
86
  destroy(): Promise<void>;
86
87
  }
@@ -21,6 +21,7 @@ export type SubstitutionRule = string | {
21
21
  export type SubstitutionTable = Record<string, SubstitutionRule>;
22
22
  export interface SegmentationOptions {
23
23
  mode?: Segmentation;
24
+ reconstruct?: boolean;
24
25
  suppressions?: Record<string, string[]>;
25
26
  segmenter?: SentenceSegmenter;
26
27
  }
@@ -18,6 +18,7 @@ export interface WalkContext {
18
18
  languageOverrides: Record<string, string>;
19
19
  contentLanguage?: string;
20
20
  segmentation: Segmentation;
21
+ segmentationReconstruct: boolean;
21
22
  segmentationSuppressions: Record<string, string[]>;
22
23
  segmenter: SentenceSegmenter;
23
24
  substitutions: SubstitutionTable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readium/speech",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "A TypeScript library for implementing read aloud features with Web technologies, following best practices for digital publishing.",
5
5
  "author": "Readium Foundation",
6
6
  "keywords": [