@readium/speech 0.1.1 → 0.2.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.
@@ -1,4 +1,4 @@
1
- import { ReadiumSpeechVoice } from './types';
1
+ import { ReadiumSpeechJSONVoice } from './types';
2
2
  export interface LanguageWithRegions {
3
3
  baseLang: string;
4
4
  regions: string[];
@@ -15,9 +15,9 @@ export declare const normalizeLanguageCode: (lang: string) => string;
15
15
  /**
16
16
  * Get all voices for a specific language
17
17
  * @param {string} lang - Language code (e.g., "en", "fr", "zh-CN")
18
- * @returns {Promise<ReadiumSpeechVoice[]>} Promise resolving to array of voices for the specified language
18
+ * @returns {Promise<ReadiumSpeechJSONVoice[]>} Promise resolving to array of voices for the specified language
19
19
  */
20
- export declare const getVoices: (lang: string) => Promise<ReadiumSpeechVoice[]>;
20
+ export declare const getVoices: (lang: string) => Promise<ReadiumSpeechJSONVoice[]>;
21
21
  /**
22
22
  * Get all available language codes
23
23
  * @returns {string[]} Array of available language codes
@@ -46,13 +46,6 @@ export interface ReadiumSpeechJSONVoice {
46
46
  browser?: TBrowser[];
47
47
  preloaded?: boolean;
48
48
  }
49
- export interface VoiceFilterData {
50
- voices: Array<{
51
- name: string;
52
- altNames?: string[];
53
- [key: string]: any;
54
- }>;
55
- }
56
49
  export interface ReadiumSpeechVoice {
57
50
  source: TSource;
58
51
  label: string;
@@ -77,11 +70,14 @@ export interface ReadiumSpeechVoice {
77
70
  nativeID?: string | string[];
78
71
  note?: string;
79
72
  provider?: string;
80
- [key: string]: any;
73
+ isDefault?: boolean;
74
+ offlineAvailability?: boolean;
75
+ isNovelty?: boolean;
76
+ isLowQuality?: boolean;
81
77
  }
82
78
  export interface VoiceData {
83
79
  language: string;
84
80
  defaultRegion: string;
85
81
  testUtterance: string;
86
- voices: ReadiumSpeechVoice[];
82
+ voices: ReadiumSpeechJSONVoice[];
87
83
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@readium/speech",
3
- "version": "0.1.1",
3
+ "version": "0.2.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": [
7
- "readium",
8
- "speech",
9
- "tts",
10
- "text-to-speech",
11
- "read-aloud",
7
+ "readium",
8
+ "speech",
9
+ "tts",
10
+ "text-to-speech",
11
+ "read-aloud",
12
12
  "accessibility"
13
13
  ],
14
14
  "homepage": "https://readium.org/speech/",
@@ -54,6 +54,8 @@
54
54
  "vite-plugin-dts": "^4.5.4"
55
55
  },
56
56
  "dependencies": {
57
+ "@readium/decorator": "^1.0.1",
58
+ "@readium/shared": "^2.3.1",
57
59
  "string-strip-html": "^13.4.23"
58
60
  }
59
61
  }