@pie-players/pie-tts 0.3.65 → 0.3.67

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
@@ -49,8 +49,12 @@ import type {
49
49
  } from '@pie-players/pie-tts';
50
50
 
51
51
  class MyTTSImplementation implements ITTSProviderImplementation {
52
+ onPlaybackStart?: () => void;
53
+
52
54
  async speak(text: string): Promise<void> {
53
- // Your implementation
55
+ await myEngine.speak(text, {
56
+ onStart: () => this.onPlaybackStart?.(),
57
+ });
54
58
  }
55
59
 
56
60
  pause(): void { /* ... */ }
@@ -18,8 +18,12 @@ export interface StandardTTSConfig {
18
18
  /**
19
19
  * Voice identifier (provider-specific)
20
20
  *
21
+ * For the Browser provider, prefer `SpeechSynthesisVoice.voiceURI`; the
22
+ * exposed voice `name` is also accepted. An explicit Browser identifier must
23
+ * resolve to a voice exposed by that browser.
24
+ *
21
25
  * @standard W3C Web Speech API (concept)
22
- * @example "Joanna" (Polly), "en-US-Standard-A" (Google), browser voice name
26
+ * @example "Joanna" (Polly), "en-US-Standard-A" (Google), browser voiceURI or name
23
27
  */
24
28
  voice?: string;
25
29
  /**
@@ -172,6 +176,12 @@ export interface ITTSProviderImplementation {
172
176
  * Check if paused
173
177
  */
174
178
  isPaused(): boolean;
179
+ /**
180
+ * Playback-start callback (optional).
181
+ * Providers that expose it call it only when native/media playback actually
182
+ * begins, allowing service state and highlighting to follow audible playback.
183
+ */
184
+ onPlaybackStart?: () => void;
175
185
  /**
176
186
  * Word boundary callback (optional)
177
187
  * Called during speech for word highlighting
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-tts",
3
- "version": "0.3.65",
3
+ "version": "0.3.67",
4
4
  "author": "PIE Framework",
5
5
  "repository": {
6
6
  "type": "git",