@pie-players/pie-tool-tts-inline 1.0.0-beta.0 → 1.0.0-beta.1

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/README.md CHANGED
@@ -38,8 +38,9 @@ content to read. Section players provide both; around a plain item player, the
38
38
  host writes the toolkit and the scope. The packaged
39
39
  `textToSpeech` capability in `@pie-players/pie-default-tool-loaders` creates
40
40
  this element in item and passage toolbars, takes `catalog-id` and `size` from
41
- the toolbar, and takes `layout-mode`, `speedOptions` and
42
- `showSingleSpeedOption` from the toolkit's `textToSpeech` tool configuration.
41
+ the toolbar, takes `layout-mode`, `speedOptions` and `showSingleSpeedOption` from
42
+ the toolkit's `textToSpeech` tool configuration, and takes `base-rate`, `pitch`
43
+ and `volume` from the policy's `textToSpeech` tool parameters.
43
44
 
44
45
  ```javascript
45
46
  import '@pie-players/pie-tool-tts-inline';
@@ -80,6 +81,17 @@ passageHeader.append(ttsButton);
80
81
  the first keeps the controls row reserved and the second expands it while the
81
82
  panel is open. `'floating-overlay'` and `'left-aligned'` open the panel as an
82
83
  overlay to the left of the trigger.
84
+ - `base-rate` - Multiplies every speed option, so a learner's normal speed
85
+ can differ from the provider's (default: `1`). A value that is not a
86
+ positive number means `1`.
87
+ - `pitch` - The pitch this element's reads start at, `0`–`2` with `1` normal,
88
+ clamped to that range (default: the service's).
89
+ - `volume` - The volume this element's reads start at, `0`–`1`, clamped
90
+ (default: the service's).
91
+
92
+ Pitch and volume stay the service's after a read, so a read started
93
+ elsewhere, such as the annotation toolbar's read-selection, uses the last
94
+ values set.
83
95
 
84
96
  ### JavaScript Properties
85
97
 
@@ -55,6 +55,34 @@
55
55
  },
56
56
  "default": "'left-aligned'",
57
57
  "attribute": "layout-mode"
58
+ },
59
+ {
60
+ "kind": "field",
61
+ "name": "baseRate",
62
+ "type": {
63
+ "text": "number"
64
+ },
65
+ "default": "1",
66
+ "description": "Multiplies every speed choice's rate, so 1× reads at this rate.",
67
+ "attribute": "base-rate"
68
+ },
69
+ {
70
+ "kind": "field",
71
+ "name": "pitch",
72
+ "type": {
73
+ "text": "number"
74
+ },
75
+ "description": "The pitch each read starts at, 0–2 with 1 normal.",
76
+ "attribute": "pitch"
77
+ },
78
+ {
79
+ "kind": "field",
80
+ "name": "volume",
81
+ "type": {
82
+ "text": "number"
83
+ },
84
+ "description": "The volume each read starts at, 0–1.",
85
+ "attribute": "volume"
58
86
  }
59
87
  ],
60
88
  "attributes": [
@@ -96,6 +124,31 @@
96
124
  },
97
125
  "default": "'left-aligned'",
98
126
  "fieldName": "layoutMode"
127
+ },
128
+ {
129
+ "name": "base-rate",
130
+ "type": {
131
+ "text": "number"
132
+ },
133
+ "default": "1",
134
+ "description": "Multiplies every speed choice's rate, so 1× reads at this rate.",
135
+ "fieldName": "baseRate"
136
+ },
137
+ {
138
+ "name": "pitch",
139
+ "type": {
140
+ "text": "number"
141
+ },
142
+ "description": "The pitch each read starts at, 0–2 with 1 normal.",
143
+ "fieldName": "pitch"
144
+ },
145
+ {
146
+ "name": "volume",
147
+ "type": {
148
+ "text": "number"
149
+ },
150
+ "description": "The volume each read starts at, 0–1.",
151
+ "fieldName": "volume"
99
152
  }
100
153
  ],
101
154
  "events": [